cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping failed in runtimeRuntime Exception when executing application mapping program

PallaviU
Participant
0 Kudos

Hi Experts,

I have developed a Mail to RFC Scenario. The Mail attachment(XML) need to be sent to ERP system based on the data Purchase Order need to be created using RFC in ERP system. I am using version 7.5 single stack. In the message monitoring I could  see Mapping: General Error. When I check in the Logs and Traces it says MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program.Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.


Can any one suggest the solution for this?


Thanks in Advance

Pallavi

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

Pallavi,

First query Have you used Payloadswapbean in sender mail channel ? if yes then can you see the xml attachment as the main payload before mapping ?

Br,

Manoj

PallaviU
Participant
0 Kudos

Hi Manoj,

I have used Payloadswapbean in sender mail channel.In the message monitoring I could see the attachment (Main Document.xml) in the attachment tab. When I tried to test the attachment xml in message mapping it throws the following error.

Cannot create target element /ns1:BAPI_PO_CREATE1/POHEADER. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD.

Thanks
Pallavi
manoj_khavatkopp
Active Contributor
0 Kudos

Pallavi,

It does mean that the mandatory filed is missing check which source filed is mapped to the target field POHEADER and i guess this source filed is not existing in your input xml file, you can use mapwithDefault for mandatory fields if needed.

After SwaPBean the attachment tab should have your main document and your payload tab should have the xml attachment , this verifies that swapping is done successfully.

Br,

Manoj

Answers (0)