Skip to Content
0

Split the Invoice line Items are more than 999

Jan 11, 2017 at 01:45 PM

133

avatar image

Hi,

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.

mapping.png

Reference Document structure attached:

reference.png

Awaiting for the response.

Regards

Arun

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

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.

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Supriya Parab Jan 19, 2017 at 09:57 AM
0

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.

Regards,
Supriya.

Share
10 |10000 characters needed characters left characters exceeded