Skip to Content
avatar image
Former Member

Mapping in SAP PI



     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.


Deepthi Premnath.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 24, 2012 at 04:54 PM


    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?


    Amit Srivastava

    Add comment
    10|10000 characters needed characters exceeded