Skip to Content
0
Apr 06, 2018 at 06:08 AM

SAP PI mapping issue SAP ORDERS IDOC

234 Views

Hi everybody,

I would need your input regarding a mapping issue.

My source message looks like this:

The OrderLineItems segment is on the same hierarchy level as the CouponItems segment.The OrderLineItem segment is used to create an E1EDP01 segment for each OrderLineItem segment (in this case 2). This is the content of the OrderLineItem segment:

There may be one or more discount(s) for the each order line item. This is the content of CouponItem:

If the content of ProductId in OrderLineItem (pos. 1: 139; pos. 2: 71) matches the content of Description in CouponItem a E1EDP05 segment (child segment of E1EDP01) should be created in the corresponding line.

In my example the second discount (31.65) belongs to the first position and the first discount (8.33) belongs to the second position.

The target message should look like this:

E1EDP01 (pos. 1)

E1EDP05 (discount 31.65)

E1EDP01 (pos. 2)

E1EDP05 (discount 8.33)

Does anyone have an idea how to map it properly?

Thanks in advance!

Christian

Attachments

same-level.jpg (23.1 kB)
coupon-items.jpg (27.7 kB)
line-level.jpg (70.4 kB)