cancel
Showing results for 
Search instead for 
Did you mean: 

EXCEPTION_DURING_EXECUTE - Cannot create target element

Former Member
0 Kudos

Hi,

I am working on file (EDI file) to IDOC scenario using SAP PI 7.1. I am getting the below error while posting the data.

I have taken the MONI data and executed in message mapping and Operational Mapping and it is working fine. But when i try in run time i am getting the below exception.

I am using the external definition for the target IDOC.

Seeburger functionality for the EDI is working fine. It is converting the EDI data into EDI-XML data and creating the functional acknowledgment.

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_A_850_V4010_to_I_ORDERS_ORDERS0~</SAP:P1>

<SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti;/SAP:P2>

<SAP:P3>on: Cannot create target element /ORDERS05/IDOC. V</SAP:P3>

<SAP:P4>alues missing in queue context. Target XSD requir~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_A_850_V4010_to_I_ORDERS_ORDERS0; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ORDERS05/IDOC. Values missing in queue context. Target XSD requir</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Please help him in this... mean time i will search more forum in SDN and try to get the solution!!!

Thanks,

Vasantha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This error ccomes when the mapping is not properly done, check at the target side if all the mandatory fileds are mapped.

-Supriya.

Former Member
0 Kudos

Hi Vasantha,

It idicates that some of the mandatory field values are missing. So, throwing Mapping Exception.

Take the inbound payload and test in your Message Mapping and check. It would show the same error.

Thanks,

Former Member
0 Kudos

Hi,

Thanks for the response. I have tested the Message Mapping and Operational mapping with the payload from the SXMB_MONI and it is working fine.

Now i am checking for all the mandatory fields... Hopefully i have not missed any mandatory!!!

Regards,

Vasantha

Former Member
0 Kudos

I have tested the interface in Interface Detrmination and i am able to get the correct output. But when i execute in run time it is failing. Below is the error description from trace:

RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_A_850_V4010_to_I_ORDERS_ORDERS05_ Thrown: com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ORDERS05/IDOC. 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 at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:368) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:410) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:502) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:632) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:92) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:119) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor504.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)

Regards,

Vasantha

Former Member
0 Kudos

Hi Vasantha,

The trace indicates that the Values are missing in the queue context.

The context should be handled correctly. Refer the below blog regarding context handling in Message Mapping:

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

Thanks,

Former Member
0 Kudos

Hi,

Thanks for the input. I have corrected it and it is working now!!!

Regards,

Vasantha