Skip to Content

Split the Invoice line Items are more than 999


Need logic to setup the scenario file to Proxy for Invoice posting.

1. Split the Documents when line items count exceed 999.

2. First line of Line item should contain Sum of Amount of particular Document and then write remaining 998 lines.

I tried to create the Document when line items exceed 999 with below logic. But while replicate Amount and line items am getting error.

Please help me to fulfill the logic, Please provide the code in case UDF required.


Reference Document structure attached:


Awaiting for the response.



reference.png (27.1 kB)
mapping.png (27.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Personally I would just map the file to a structure to send to the proxy, and then do the rest of the logic in ABAP in your proxy class. I find it is better practice to leave as much logic outside of the integration layer as possible.

  • Get RSS Feed

1 Answer

  • Jan 19, 2017 at 09:57 AM

    Hi Arun,

    I recently have worked on the same interfaces wherein I mapped the data as it is in PI from source to target and in proxy class I had written complete logic of handling 999 line items and everything else. This approach is far better and cleaner compared to doing the same in PI. This way you can put control and error handling points as well in your code wherever desired.

    Still if you wish to do it in PI, I would suggest to handle complete logic in JAVA mapping instead of graphical mapping as there would few conditional loops involved here. The output of JAVA mapping can be the number of documents each with 999 line items.


    Add comment
    10|10000 characters needed characters exceeded