cancel
Showing results for 
Search instead for 
Did you mean: 

EXCEPTION_DURING_EXECUTE - Cannot create target element

Former Member
0 Kudos

Hi all,

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

I have taken the MONI data (payload) 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.

this is the messagge error in SXMB_MONI:

RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_EntrateASYNC_OUT_to_Entrate_ASYNC_IN_ Thrown: com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /MBGMCR02/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:369) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:411) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:504) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:134) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:637) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep

The strange thing is that in the MM and OM the payload get right result, but in the runtime... no!!

I have to create  many idoc as there are occurrences of tracciabilita

I don't have missing mandatory fields

Please help me in this problem.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

This is very common issue , when you dont have a value in source data for Tracciabillita field then IDoc segemnt will not get created but IDoc segment occurance mandatory.

So make sure that your source data has values for all mandatory fields.

Former Member
0 Kudos

This is xml source...

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

<ns:MT_EntrateAcquisto xmlns:ns="http://.....">

<row>

    <Header>

        <DATA_CONTABILE>121109</DATA_CONTABILE>

        <NUMERO_DOCUMENTO_MOVIMENTO>0679642368</NUMERO_DOCUMENTO_MOVIMENTO>

        <CODICE_MAGAZZINO_FISICO>000000000328</CODICE_MAGAZZINO_FISICO>

        <TIPO_RECORD>01</TIPO_RECORD>

        <CODICE_AZIENDA_COMMITTENTE>645</CODICE_AZIENDA_COMMITTENTE>

        <TIPO_FLUSSO>F</TIPO_FLUSSO>

        <CODICE_FLUSSO>9414637</CODICE_FLUSSO>

        <CODICE_CAUSALE>00001</CODICE_CAUSALE>

        <SEGNO_CAUSALE>C</SEGNO_CAUSALE>

        <MOTIVAZIONE_RETTIFICA></MOTIVAZIONE_RETTIFICA>

        <DOCUMENTO_RIFERIMENTO>0001678106</DOCUMENTO_RIFERIMENTO>

        <DATA_DOCUMENTO_RIFERIMENTO>121109</DATA_DOCUMENTO_RIFERIMENTO>

        <DOCUMENTO_ESTERNO>ODA1</DOCUMENTO_ESTERNO>

        <DATA_DOCUMENTO_ESTERNO>121109</DATA_DOCUMENTO_ESTERNO>

        <STATO_INIZIALE>000</STATO_INIZIALE>

        <STATO_FINALE>001</STATO_FINALE>

        <CODICE_BLOCCO>00000</CODICE_BLOCCO>

        <NOTA_BLOCCO></NOTA_BLOCCO>

        <NUMERO_RIFERIMENTO_BLOCCO>0000000000</NUMERO_RIFERIMENTO_BLOCCO>

        <TIPO_DOCUMENTO_ESTERNO>1</TIPO_DOCUMENTO_ESTERNO>

        <NUMERO_BOLLA>ODA1</NUMERO_BOLLA>

        <DATA_BOLLA>121109</DATA_BOLLA>

        <CODICE_CAUSALE_ESTERNA></CODICE_CAUSALE_ESTERNA>

        <FILLER></FILLER>

        <DATA_REGISTRAZIONE>121116</DATA_REGISTRAZIONE>

        <ORA_REGISTRAZIONE>174758</ORA_REGISTRAZIONE>

    </Header>

    <Tracciabilita>

        <DATA_CONT>121109</DATA_CONT>

        <NRO_DOCUM>0679642368</NRO_DOCUM>

        <CODMAG_FIS>000000000328</CODMAG_FIS>

        <TIPO_RECORD>05</TIPO_RECORD>

        <CODITM_N1>106576</CODITM_N1>

        <SOCIETA>0000000645</SOCIETA>

        <CODITM_AZT>486404</CODITM_AZT>

        <NOTUSED1></NOTUSED1>

        <PROGRESSIVO>0000000001</PROGRESSIVO>

        <EAN_13>8076800105011</EAN_13>

        <EAN_14>08076809000641</EAN_14>

        <LOTTO>123456</LOTTO>

    </Tracciabilita>

</row>

</ns:MT_EntrateAcquisto>

Answers (2)

Answers (2)

Former Member
0 Kudos

OK, I found my error, in the communication channel sender i set Document Name wrong (MT_EntrateAcquisto instead MT_EntrataAcquisto...)

former_member201264
Active Contributor
0 Kudos

Hi Michelino,

Try to assign row to IDOC, then Check and post the response.

Regards,

Sreeni.

Former Member
0 Kudos

This is message mapping for field IDOC