Skip to Content

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

how to map the source and target of below structures?

error shows in the below mapping is "Cannot produce target element /ns0:Messages/ns0:Message2/ns1:MT_SALESITEM_IN/SALESITEM[2]/SALESDOCNO. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".

the source and target structures are

SOURCE STRUCTURE

-


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_SALES_OUT xmlns:ns1="http://sap.com/bpmsplit">

<SALES>

<HEADER>

<DOCNO>1000</DOCNO>

<ORG>2000</ORG>

<PLANT>3000</PLANT>

</HEADER>

<ITEM>

<ITEMNO>10</ITEMNO>

<QTY>100</QTY>

<PRICE>100000</PRICE>

</ITEM>

<ITEM>

<ITEMNO>20</ITEMNO>

<QTY>200</QTY>

<PRICE>200000</PRICE>

</ITEM>

</SALES>

</ns1:MT_SALES_OUT>

</ns0:Message1>

</ns0:Messages>

TARGET STRUCTURE

-


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><ns1:MT_SALESHEADER_IN xmlns:ns1="http://sap.com/bpmsplit">

<SALESHEADER>

<SALESDOCNO>1000</SALESDOCNO>

<ORG>2000</ORG>

<PLANT>3000</PLANT>

</SALESHEADER>

</ns1:MT_SALESHEADER_IN></ns0:Message1><ns0:Message2><ns1:MT_SALESITEM_IN xmlns:ns1="http://sap.com/bpmsplit">

<SALESITEM>

<SALESDOCNO>1000</SALESDOCNO>

<ITEMNO>10</ITEMNO>

<QTY>100</QTY>

<PRICE>100000</PRICE>

</SALESITEM>

</ns1:MT_SALESITEM_IN></ns0:Message2></ns0:Messages>

My Question is

_____________

For the above only one instance is created in Target if we give only one Instance in Source ITEM otherwise it shows an error like

I want SALESITEM in Target Structure should generate multiple instances for every ITEM Details in Source structure .

Can anyone suggest me how to create multiple SALESITEM Instances in Target for every Instance of ITEM in SOurce Structure?

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