Hi All,
Source structure:
<DESDAV>
<IDOC>
<E1EDL20>
---
---
<E1EDL37> 0 to unbounded
<VHART/>
<EXIDV/>
<E1EDL44>
<EXIDV/>
</E1EDL44>
</E1EDL37>
</EIEDL20>
</IDOC>
Target structure:
<Containers>
<Container>
<F1>
<F2>
<Item>
<F1>
<F2>
Here I have 3 conditions
1) if all the E1EDL37-VHART field values are '002' then <container> needs to be generated the same number of times as E1EDL37-VHART occurs.(container = line item)
2) if any one of the E1EDL37-VHART is 'ZPAL' then the <Container> needs to be generated only once all E1EDL37's(002) becomes line itmes where E1EDL37(ZPAL) :E1EDL44-EXIDV=E1EDL37-EXIDV
3) If any two or more of the E1EDL37-VHART values are 'ZPAL' then <Container> needs to be generated as same number of E1EDL37: ZPAL and the corresponding E1EDL37 (002) will be added as the line items using this condition again E1EDL44-EXIDV=E1EDL37-EXIDV
Could any one please suggest how can we achieve this the mapping.
Thanks in Advance!