cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Error: Cannot produce target element

Former Member
0 Kudos

I have used the same Message Type and RFC interface in two different Name Spaces.

When I try a test mapping using this (in both):

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

<CAMS_MT_LG>

<MAIN>

<LG1 />

<LG2 />

<LG3 />

<LG4 />

<LG5 />

<LG6 />

<LG7 />

<LG8 />

<LG9 />

<LG10 />

</MAIN>

</CAMS_MT_LG>

One test works and one doesn't...the error is:

Cannot produce target element /ns0:Z_LOAD_LARGE. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Why should one of the mappings expect this (in order to work)...

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

<ns2:CAMS_MT_LG xmlns:ns2="http://CAMS_NS_LG">

<MAIN>

<LG1 />

<LG2 />

<LG3 />

<LG4 />

<LG5 />

<LG6 />

<LG7 />

<LG8 />

<LG9 />

<LG10 />

</MAIN>

</ns2:CAMS_MT_LG>

...in other word the full definition of the ns...

Another thing is I do not know how to get xmlns:ns2 into the mapping in my file adapter bacause...

xml.documentName=ns1:CAMS_MT_LG

xml.documentNamespace=http://CAMS_NS_LG

...generates...

<ns2:CAMS_MT_LG xmlns="http://CAMS_NS_LG">

Do anyone know what I'm doing wrong?

Thanks

Patrick

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Patrick Dixon ,

Try removing XML name space (below data type used) from message type definition and see if it works.

Regards,

Satish

Former Member
0 Kudos

Hi

I am getting the same error when trying to map an XML message to from a file into an IDoc structure. See below.

The problem i am getting is that I am not mapping anything to the /IDOC/BEGIN structure or certain required field in the EDI_DC40 structure. I don't understand how I can populate these fields when mapping from a non IDoc related structure.

NB. I created the same message mapping in XI v2 and didn't get this problem as the field is not as restricted.

Does anyone have any examples of a 'file to IDoc' scenario in XI v3? or can someone point me in the right direction.

Regards

Daniel Jones

Former Member
0 Kudos

Hi Daniel,

In case of Idoc/Begin you can populate a constant value such as '1' .For the required fields in the target structure if there is no mapping element in the source strucuture you can use constant values.

Regards,

Sulakshana

Former Member
0 Kudos

Thanks Sulakshana, the constant value got the message past the mapping stage.

Many thanks

Daniel

0 Kudos

Hi Patrick,

Did u able to find out any clues...? I'm also stuck with same problem.

while surfing the sdn, i faced the problem.

any clues....

regards,