cancel
Showing results for 
Search instead for 
Did you mean: 

Structural mapping - recurring data types under different header

Former Member
0 Kudos

Dear experts,

I'm am trying to perform a mapping from 4 different elements containing the same sub-structure into a re-iterated element at the target side. How can I map the fields in such a way that the target header will appear three times, according to the number of different headers in the source.

As the following:

Source:

<headerA>

<itemA>bla</itemA>

<itemB>bla</itemB>

<itemC>bla</itemC>

</headerA>

<headerB>

<itemA>blb</itemA>

<itemB>blb</itemB>

<itemC>blb</itemC>

</headerB>

<headerC>

<itemA>blc</itemA>

<itemB>blc</itemB>

<itemC>blc</itemC>

</headerC>

Target:

<header>

<itemA>bla</itemA>

<itemB>bla</itemB>

<itemC>bla</itemC>

</header>

<header>

<itemA>blb</itemA>

<itemB>blb</itemB>

<itemC>blb</itemC>

</header>

<header>

<itemA>blc</itemA>

<itemB>blc</itemB>

<itemC>blc</itemC>

</header>

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Hello,

From source you will always get only HeaderA, HeaderB, HeaderC? or you will get more?

If it's only three, then in target also u will get only three.

So right click on Header in target and say Duplicate Subtree - two times. Now you will have three Header structure in target.

Now map

HeaderA to Header

Item A to Item A

Item B to Item B

Item C to Item C

Duplicated Target

HeaderB to Header

Item A to Item A

Item B to Item B

Item C to Item C

Duplicated Target

HeaderC to Header

Item A to Item A

Item B to Item B

Item C to Item C

If the requirement is different, let me know.

raj.

Answers (0)