cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR IDoc2File "Cannot produce target element"

Former Member
0 Kudos

Hi,

well i am sending an IDoc as i did some times before via XI to the client.

Funny thing is that now it's the first time the MM is not able to handle empty fields from sender.

I configured the target DT and the field 'co' from IDoc for occurrence with 0..1 but when i test the MM with the given XML-Structure from SXMB_MONI i am getting following ERROR:

<b>Cannot produce target element /ns0:MT_Certificate/recordType2A/co. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</b>

This field is the first one which is empty in the sent IDoc - but i have no clue why the is a problem because i did this some times before and it all works and i havn't done anything wrong - i hope.

So do u have an idea?!

br, Jens

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Looks like there is some mandatory field which is dependent on this field.

When the Idoc does not populate a field, the field does not reach XI .

When you test the same with the mapping editor, the field will be <fieldname> </fieldname> and so , maybe it gets mapped to a blank.

Use MAPWITHDEFAULT to handle this.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

the reason was just use MAPWITHDEFAULT. But do u have some further information why i do have to use it in this case? I am asking because i did this kind of scenario some times but now it's the first time i have to use this step!

br, Jens

bhavesh_kantilal
Active Contributor
0 Kudos

Jese,

I explained it above, but let me try to put it better.

MAPWITHDEFAULT is used to check if a the source field exists. if it exists then it maps the source with the field else it maps the default value to the target field.

When a field is not populated by an idoc, the field is not a part of your XML strucuture itself. In your mapping, the field for which you have used MAPWITHDEFAULT I guess has a occurence of 1..1 and so, as the source field does not come in the Idoc, the mapping fails and this is now handled with mapwithdefault.

Hope this helps,

Regards

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

First reactivate the mapping , then test .

Check the mapping in runtime environment or take the source from SXMB_MONI and place in mapping , test.

Here if any manadatory field is depended on this empty field existed, then also this type errors come.

Check that,did you configured co field with any mapping functions,if you used any functions then check with Display queue for each one.

if possible please provide the structure.

Regards..

Chilla..

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Jen,

In the message mapping check the mapping for source and target Node level mapping..

This error comes because of node level mapping is not done properly...

and also test the mapping with test data..

thanks

sridhar

udo_martens
Active Contributor
0 Kudos

Hi Jens,

plz check the message mapping at repository with test function and full trace. Copy the source message from SXMB_MONI. Do you get same result? May be some confusion, with refered Msg Type or versions of the mapping? Plz control the MONI trace: Is the right mapping executed? Plz check the referred Msg Types at Repository: Is that the right type, where the field is optional?

Regards,

Udo