cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Multiple line item. Target node generation problem

Former Member
0 Kudos

Hi,

I am trying to create a mapping to handle multiline items.

my source structure is

ns0:OrderCreate>

<ns0:Header>

<ns0:OrderCreateBody>

-<ns0:OrderCreateProperties>

-<ns0:PurchaseOrderNumber>

-<ns0:OrderCreatePartners>

-<ns0:OrderCreateDetails>

--<ns0:OrderCreateProductLineItem>

-</ns0:OrderCreateDetails>

</ns0:OrderCreateBody>

</ns0:OrderCreate>

Here <ns0:OrderCreateProductLineItem> is the node which will occure multiple time in new requirment (which is mapped to E1EDP01).

my target structure is

<ORDERS05>

<IDOC>

<EDI_DC40>

<E1EDK01>

<E1EDK14>

<E1EDK05>

<E1EDK02>

<E1EDKA1>

<E1EDKT1>

<E1EDK36>

<E1EDP01>

- - POSEX

- - MENGE

- - MENEE

- - <E1EDP02>

- - <E1EDP19>

- - <E1EDP35>

Currently for each line item ( <ns0:OrderCreateProductLineItem>) target structure contains one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode ).

In Multiline Scenario for each occurance of node <ns0:OrderCreateProductLineItem> target structure should have one <E1EDP01> segment (having two <E1EDP02> and one <E1EDP19> subnode for every line item ).

For example if source is ::

ns0:OrderCreate>

<ns0:Header>

<ns0:OrderCreateBody>

- <ns0:OrderCreateProperties>

- <ns0:PurchaseOrderNumber>

- <ns0:OrderCreatePartners>

- <ns0:OrderCreateDetails>

- - <ns0:OrderCreateProductLineItem>

- - <ns0:OrderCreateProductLineItem>

- - <ns0:OrderCreateProductLineItem>

</ns0:OrderCreateDetails>

</ns0:OrderCreateBody>

Then target should be ::

<ORDERS05>

<IDOC>

<EDI_DC40>

<E1EDK01>

<E1EDP01>

- - POSEX

- - <E1EDP02>

- - <E1EDP02>

- - <E1EDP19>

<E1EDP01>

- - POSEX

- - <E1EDP02>

- - <E1EDP02>

- - <E1EDP19>

<E1EDP01>

- - POSEX

- - <E1EDP02>

- - <E1EDP02>

- - <E1EDP19>

How to acheive this mapping please suggest ?

Edited by: gumshu on Oct 4, 2011 2:26 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

The details you have provided are incomplete, e.g where do you get

- - POSEX

- - <E1EDP02>

- - <E1EDP02>

- - <E1EDP19>

But if you want E1EDP01 to appear multiple times, you can use this mapping


OrderCreateProductLineItem -> removeContext -> E1EDP01

Hope this helps,

Mark