Skip to Content
avatar image
Former Member

EXCEPTION_DURING_EXECUTE - Cannot create target element

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

pastedImage_2.png (20.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 21, 2012 at 05:52 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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>

  • avatar image
    Former Member
    Nov 22, 2012 at 08:44 AM

    This is message mapping for field IDOC


    pastedImage_0.png (24.6 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 22, 2012 at 08:54 AM

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

    Add comment
    10|10000 characters needed characters exceeded