cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error - Multi Recordset to Single Recordset

Former Member
0 Kudos

Good Day Everybody...

I have a error mapping shown in the following picture

<a href="http://img46.imageshack.us/img46/4089/mappingerrorer8.jpg">Mapping Error</a>

When i test the mapping all seems to be fine...

<b>heres is the source...</b>


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

<ns0:ZFILEINPUT xmlns:ns0="urn:sea.com:TESTE_ARQUIVO">
   <RECORD>
      <ROW>
         <ROW1>
            <FIELD1>value1</FIELD1>
         </ROW1>
         <ROW2>
            <FIELD2>value2</FIELD2>
         </ROW2>
      </ROW>
   </RECORD>
</ns0:ZFILEINPUT>

<b>and here is the target</b>


<?xml version="1.0" encoding="UTF-8"?>
 <ns0:ZFILEOUTPUT xmlns:ns0="urn:sea.com:TESTE_ARQUIVO">
 <RECORD>
 <ROW>
<FIELD1>value1</FIELD1>
<FIELD2>value2</FIELD2>
</ROW>
</RECORD>
</ns0:ZFILEOUTPUT>

the more detailed error that i could get is the following

********************************************************

RuntimeException in Message-Mapping transformation:

Cannot produce target element <b>/ns0:ZFILEOUTPUT/RECORD/ROW. </b>

Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at

....

***************************************************

ill really apreciate any help on this...

Thanks in Advance.

Message was edited by:

Luis Melgar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

this is the Payload

-Main Document

from SXMB_MONI


  <?xml version="1.0" encoding="utf-8" ?> 
- <ns:ZFILEINPUT xmlns:ns="urn:aes.com:TESTE_ARQUIVO">
- <ROW>
- <ROW1>
  <FIELD1>NUMBERONE</FIELD1> 
  </ROW1>
- <ROW2>
  <FIELD2>NUMBERTWO</FIELD2> 
  </ROW2>
  </ROW>
  </ns:ZFILEINPUT>

prabhu_s2
Active Contributor
0 Kudos

<ns:ZFILEINPUT xmlns:ns="urn:aes.com:TESTE_ARQUIVO">

change to

<ns0:ZFILEINPUT xmlns:ns0="urn:aes.com:TESTE_ARQUIVO"> and check

Former Member
0 Kudos

Is solved!

all your responses where very helpful

i did check at the SXMB_MONI

and i noticed that the payload didnt match the datatype structure.

basically i removed that ROW : 1..unbounded

and let the mapping as follows...

SOURCE :-------


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

<ns0:ZFILEINPUT xmlns:ns0="urn:aes.com:TESTE_ARQUIVO">
   <RECORD>
      <ROW1>
         <FIELD1>xx</FIELD1>
      </ROW1>
      <ROW2>
         <FIELD2>xx</FIELD2>
      </ROW2>
   </RECORD>
</ns0:ZFILEINPUT>

TARGET:-------

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

<ns0:ZFILEOUTPUT xmlns:ns0="urn:aes.com:TESTE_ARQUIVO"><RECORD><ROW1><FIELD1>xx</FIELD1></ROW1><ROW2><FIELD2>xx</FIELD2></ROW2></RECORD></ns0:ZFILEOUTPUT>

Answers (1)

Answers (1)

Former Member
0 Kudos

The mapping looks good. Is the XML you have provided above taken from the payload of the incoming msg?

If not copy the payload from the Inound msg in SXMB_MONI and give us the XML file. I guess, your input file is different

Regards,

Jai Shankar

Former Member
0 Kudos

Hi ,

As Jai said pls copy the payload from XMB_MONI( right click view source ) and paste that test in mapping and check your mapping pgm . Alog with this also check if while mapping

Filed1( from source ) to Field1( from target) you have done the remove context .

Thanks ,

Suvarna

Former Member
0 Kudos

Hi,

Mapping is fine and I don't think that there is a need for the RemoveContext function. As has been already pointed out the actual payload could be an issue.

Thanks,

Anand