Skip to Content
0
Former Member
Jan 04, 2006 at 11:00 PM

Mapping question

13 Views

Hi,

Can anyone help me with the following mapping issue?

I am only giving the segments concerning the issue.

Input

<E1EDP01>

<E1EDP19>

<QUALF> 002 </QUALF>

<IDTNR> 111 </IDTNR>

</E1EDP19>

<E1EDP19>

<QUALF> 001</QUALF>

<KTEXT> XXX </KTEXT>

</E1EDP19>

</E1EDP01>

<E1EDP01>

<E1EDP19>

<QUALF> 002 </QUALF>

<IDTNR> 222 </IDTNR>

</E1EDP19>

<E1EDP19>

<QUALF> 001</QUALF>

<KTEXT> YYY </KTEXT>

</E1EDP19>

</E1EDP01>

Output

<ItemDetail 0..unbounded>

<PartNumbers 0...1>

<SellerPartNumber 0...1>

<Part ID 1..1/>

</sellerPartNumber>

</PartNumbers

<ItemDescription 0..1/>

</ItemDetail>

This is the mapping I did.

E1EDP01 ==> ItemDetial

If QUALF=002[Context=E1EDP01] then E1EDP19[Context=E1EDP01]=SellerPartNumber

If QUALF=002[Context=E1EDP01] then IDTNR[Context=E1EDP01] = PartID

If QUALF=001[Context=E1EDP01] then KTEXT[Context=E1EDP01] = ItemDescription

But the problem is it is missing some occurances.I have 3 items in my input, but I am getting only two in the output.The second occurance is completely missed and the third shows as the second. I tried different techniques like changing the contexts in different combinations.The solution may be fairly simple,but obviously I miss something here.

Any help is appreciated.

Thanks

Raju