Skip to Content
avatar image
Former Member

Mapping Error in IDoc to File Scenario

Hi Experts,

I have developed IDoc to File scenario , I have configured all required ESR and ID objects , in the mapping I was map all required feilds and testing side Execution mapping also showing successfully .

But when I am checking in the transaction SXMB_MONI I am getting Mappring Error Like this below shows

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

<SAP:P1>com/sap/xi/tf/_MM_CREMAS_</SAP:P1>

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

<SAP:P3>on: Cannot create target element /ns0:MT_Vendor_Ta</SAP:P3>

<SAP:P4>rget/Vendor_Details/Vendor. Values missing in que~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_CREMAS; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_Vendor_Target/Vendor_Details/Vendor. Values missing in que~</SAP:Stack>

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

What might be the problem and what I have to provide more in the mapping side.Please suggest and salve my prob.

Thanks in advance,

Regards,

Sudeepth.

Edited by: sudeepth on Mar 1, 2012 11:15 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Mar 01, 2012 at 10:20 AM

    Check your test data and for the field Vendor not values in test data.

    Correct the same and provide values to to mandatory fields.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sudeepth,

      Even if you have all the target fields mapped , the target filed wont generate until you pass any value to it.

      Please follow the steps as Grzegorz described.

      Ex: For the 3rd step as given below

      Try this .

      sourcefield --> MapWithDefault ---> Targetfield ( Vendor )

      Thanks

      Sai_SHA.

  • Mar 01, 2012 at 10:31 AM

    copy the payload from moni and paste in ur message mapping and test the same

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2012 at 10:31 AM

    Hi Sudeepth,

    Seems you are not passing any value to the field Vendor.

    Use MapWithDefault function , even when you are not passing any value the target element Vendor gets generated.

    Hope this should solve your problem.

    Thanks

    Sai_SHA

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2012 at 10:47 AM

    Hi Sudeepth,

    The reason for this error is that this field ns0:MT_Vendor_Target/Vendor_Details/Vendor was not created in the mapping, although it is mandatory in target structure, because there were no values in source field. In general, you have at least three options to proceed:

    1. Make sure that your input data is correct, and adjust it if necessary. In particular, the source field for the Vendor target field should exist in the source data.

    2. Change the Vendor field to optional in target (which might not be possible/desirable, depending on scenario and requirements).

    3. Adjust the mapping, for instance using the mapWithDefault function mentioned by Sai_SHA, or checking the conditions if you are using any for this field, so that the mandatory target field Vendor was always populated with some value.

    Hope this helps,

    Greg

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 01, 2012 at 10:47 AM

    <SAP:P3>on: Cannot create target element /ns0:MT_Vendor_Ta</SAP:P3>

    <SAP:P4>rgetVendor_Details/Vendor Valuesmissing in que~</SAP:P4>

    might be, the value missing for Vendor field . once you check the Disply Queue of vendor field and

    if Vendor field is mandatary then you have to use mapWithDefault.

    Edited by: bhavanisankar.solasu on Mar 1, 2012 4:17 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 01, 2012 at 10:53 AM

    Hi,

    I think the Field Vendor is mandatory, i guess, if so then pass the Value for the Field Vendor.

    IF the Value is not coming , then you can put the MapWithDefault some defult value will get generated.

    Thanks and Regards,

    Ram.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2012 at 11:03 AM

    Hi,

    >>EXCEPTION_DURING_EXECUTE

    Above error come due to problem in message mapping step. Please test your mapping with dummy data and provide all mandatory field input, and test if mapping is running. I am sure it will throw error. If you get an error that means there is some problem in message mapping, rectify it.

    Regards

    Aashish Sinha

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 01, 2012 at 12:27 PM

    Hi Sudeepth,

    There is a possiblity that there is no data for the input field in the input payload.

    You can use mapWithDefault node function so that even if there is no data for the input field in the input payload,the error will not occur.

    For the similar error in the IDoc to File scenerio,you can refer the below thread

    EXCEPTION_DURING_EXECUTE error in IDOC to file...

    Firstly,download the input payload from SXMB_MONI and test the mapping with it.

    Regards,

    Amol

    Add comment
    10|10000 characters needed characters exceeded