cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Error in IDoc to File Scenario

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

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

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

Regards,

Amol

aashish_sinha
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

<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

former_member184681
Active Contributor
0 Kudos

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

santosh_k3
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

rajasekhar_reddy14
Active Contributor
0 Kudos

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

Correct the same and provide values to to mandatory fields.

Former Member
0 Kudos

Hi to all,

Here I am providing all the vendor information which I have Feilds in Target side ...I was map total target feilds which has located under source CREMAS IDoc fields which was come under every segments.I was map with Every required Target field under with Source segment feilds .

If there any required for that still I am facing the same problem.

thanks

Sudeepth.

ayan_chaudhuri
Participant
0 Kudos

Hi Sudeep,

This is entirely a mapping problem.....My advice to you

1) Check the target structure thoroughly and create mapping accordingly between source and target....You may need to use some of Node functions in mapping depending on the target structure...

2) Check the 'Display Queue' very carefully in the message mapping and see where the discrepancy is coming

If these do not solve the issue you can send me the screenshot of both source and target ..

Thanks

Ayan

santosh_k3
Active Participant
0 Kudos

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.