cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC split if line item count is >100

yeshuaq
Explorer
0 Kudos

Hi Team,

I had a requirement to split IDOC data to multiple IDOC's. source system is sending 1000 records to SAP PI75 and i have to group them based on customer ID field and create IDOC's.

And as i have limitation that each IDOC will have maximum 100 Line Items, i have to split IDOC's based on line item count.

Example: Out of 1000 records, Customer_ID1 has 300 records, Cust_ID2 has 300 records and Cust_ID3 has 400 records.

Now because of Line item limitation in IDOC, i have to create 10 IDOC's for those 1000 records.

So 3 IDOC's for Cust_ID1.

Please let me now how to split IDOC's based on line item count.

I had verified existing blogs and links and not able to split IDOC's with those inputs. so could you please suggest how to create split in Message mapping.

- if need UDF, please share sample UDF code and will it be context/Queue

- needs to perform multi mapping (message tab) or changing IDOC occurrence 1-unbound is fine?

- logic needs to apply only on IDOC node or at line item level / field level as well?

Best Regards,YQ

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi Getesh!

I would suggest using XSL transormation to fulfill your requirement.

Regards, Evgeniy.

yeshuaq
Explorer
0 Kudos

Hi Evgeniy,

Thank you for response.

Can you please elaborate steps to do in XSLT to get above mentioned logic. or please share XSL code to implement as i am not used xsl transformation for group and split logic.

Also please suggest possible alternative option to do with graphical mapping by context handling/UDF if possible. (as i have complex grouping logic which was implanted with graphical mapping, i have to apply split logic for same mapping)

Thank you

Best Regards,YQ