Hi Experts,
We have a scenario in SAP PI 7.1 where we give the item as input to RFC. The RFC checks for the item and returns the corresponding material . In case the corresponding material is not found the material value is populated with the source item. The problem we are facing is at times the RFC call fails for some unknown reason and the material code comes as blank. The material belongs to a standard idoc and hence cannot be made mandatory. I have created the below UDF to handle the issue but it seems not to work.
if (inputValue == null || "".equals(inputValue)){
throw new RuntimeException ("The value cannot be blank .");
}else {
return inputValue;
}
I am unable to find the flaw in the code. Please help me.