cancel
Showing results for 
Search instead for 
Did you mean: 

Getting syntax error in udf after transporting from XI to PI

former_member255627
Participant
0 Kudos

Hi friends,

There is a simple udf in one of the mapping in XI and it is giving syntax errors after transporting to PI environment.

its just 2 lines of code as shown below:

the errors are:

Could you help me in resolving these errors?

Thanks,

Pushpa

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Pushpa,

You need to use && operator not and.


if (a.equals("DE") && b.trim().length() > 0)

  return b;

  if (a.equals("DE") && c.trim().length() > 0)

  return c;

  return "";

Regards,

Praveen.

former_member255627
Participant
0 Kudos

Thanks Praveen, your suggestion resolved this syntax error.

Thank you all for your suggestions.

Regards,

Pushpa

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Pushpalatha,

Also the trim text function is available like standard function, you should use the standard functions instead of the own development https://help.sap.com/saphelp_nwpi71/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

You should think that the SP or PI upgrades are better supported if you have the less own development possible.

Regards.

AlexanderApel
Participant
0 Kudos

Hi Pushpa,

try this please

Regards,

Alex