Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Mapping of repeating structure to nested structure

Hi I have a mapping issue.

My Data type look like this

MT_RcicRecords

-TRNH 1-1

-RECH 0-Unb

-RECL 0-Unb

-ENDT 0-Unb

-TRLR 1-1

In above structure pattern of RECH, RECL and ENDT can occur multiple type.

My output after File content conversion look like

<ns:MT_RcicRecords xmlns:ns="urn:amgen-com:pts:rcic">

<TRNH>

<RECORD_ID>TRNH</RECORD_ID>

</TRNH>

<RECH>

<RECORD_ID>RECH</RECORD_ID>

<ACTION>C</ACTION>

</RECH>

<RECL>

<RECORD_ID>RECL</RECORD_ID>

<ACTION>C</ACTION>

</RECL>

<ENDT>

<RECORD_ID>ENDT</RECORD_ID>

<COMP_CODE>EL</COMP_CODE>

</ENDT>

<RECH>

<RECORD_ID>RECH</RECORD_ID>

<ACTION>C</ACTION>

</RECH>

<RECL>

<RECORD_ID>RECL</RECORD_ID>

<ACTION>C</ACTION>

</RECL>

<ENDT>

<RECORD_ID>ENDT</RECORD_ID>

<COMP_CODE>EL</COMP_CODE>

</ENDT>

<TRLR>

<RECORD_ID>TRLR</RECORD_ID>

</TRLR>

</ns:MT_RcicRecords>

Now i want to map this to another data type whose structure is as follows

MT_RcicRecords_temp

-TRNH 1-1

-RCIC 0-Unb

--RECH 0-Unb

--RECL 0-Unb

--ENDT 0-Unb

-TRLR 1-1

I want to map earlier data in such way that for each pattern of RECH,RECL and ENDT there should be corresponding RCIC node created in target structure.

Any help

Not what you were looking for? View more on this topic or Ask a question