Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

java user defined function

Hi,

We have written a user defined function with the simple 'if' condition.

But the code will not be compiled without an 'else' statement.

What if we do not want to return any values for the else condition.?

See our simple code below

if (a.equals("AG") && b.equals("Y990028") && c.equals("A3"))

return "X1";

else if (a.equals("AG") && b.equals("Y990033") && c.equals("A3"))

return "X2";

else if (a.equals("AG") && b.equals("Y990108") && c.equals("A9"))

return "X3";

It is giving an error since there is no else condition.

We do not want to generate the element for an else condition.

Please help.

Thanks,

John

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question