Skip to Content
0
Former Member
Jan 18, 2011 at 12:42 PM

Help on mapping problem

15 Views

Hi All

I have the following challenge

I have to map one field once for the header and as many times as it occurs for the item

This is the source structure

<segmen20>

<segmen24>

<belnr>10</belnr>

</segmen24>

<segmen24>

<belnr>10</belnr>

</segmen24>

<segmen24>

<belnr>10</belnr>

</segmen24>

</segmen20>

<segmen20>

<segmen24>

<belnr>20</belnr>

</segmen24>

<segmen24>

<belnr>20</belnr>

</segmen24>

<segmen24>

<belnr>20</belnr>

</segmen24>

</segmen20>

I have to map the field belnr once for the header and as many times as it occurs for the Item

like this

belnr 10 should be mapped once for the header and 3 times for the item

<Header>

<poheader>10</poheader>

</Header>

<Item>

<poitem>10</poitem>

</Item>

<Item>

<poitem>10</poitem>

</Item>

<Item>

<poitem>10</poitem>

</Item>

and belnr 20 the same

<Header>

<poheader>20</poheader>

</Header>

<Item>

<poitem>20</poitem>

</Item>

<Item>

<poitem>20</poitem>

</Item>

<Item>

<poitem>20</poitem>

</Item>

any help kindelly

Thanks