cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping in SAP PI

Former Member
0 Kudos

Hi,

    

     I am working on File to IDoc scenario. I am getting a string with 480 characters from the scource side.

I need to search for a value 'LN' in the string and populate the next character after LN into the POSEX field in IDoc. The index where LN appears always differ.

The next character of LN consists of the Item Number.

Can i achieve this using standard functions in sap PI?

If yes, how do i map this  else how do i achieve this using user defined function.

Regards,

Deepthi Premnath.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

you can check below UDF:

int index = var1.indexOf("LN");

return (var1.substring (index+2, index+3));

Above UDF will search for LN string and will return the next character after this string, but are you sure that the item number will always be single character?

Thanks

Amit Srivastava