cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Error: Cannot produce target element

Former Member
0 Kudos

Hello,

we have a problem with a mapping but no idea what´s going wrong.

We pick up an XML file via file adapter and map it to an RFC.

The mapping test in IR is fine.

But when we start to pick up the file with the file adapter we have an error in SXMB_MONI:

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

What we have found out is that if we copy the payload from SXMB_MONI into the mapping test in IR it will run if we paste only the structure inside the file, so except the header area.

Copying the full payload will result in the same error in the mapping test.

The message type is defined like this:

MT_abc -> links to data type DT_abc

DT_abc is complex type and formed by adding lines with the structure of the XML.

The only difference in the xml structures is the second line with the message type name.

A) Header form the original XML message:

Our question: What do we have to do to convert this header line of the original message to get it well formed in the payload?

Your help is more than welcome!

Best regards

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

only to add this:

The test in Int.Directory test tool is running fine for all steps too with the payload from the test in Int.Rep.

So I think this is not related to mistakes on RFC side.

Question to the namespace hint:

This is the XSD part of the Message type:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/SAPGlobal/Global" targetNamespace="http://sap.com/xi/SAPGlobal/Global">

<xsd:import namespace="http://what.org/SCJ/PLM/Prototyp" />

<xsd:element xmlns:p0="http://what.org/SCJ/PLM/Prototyp" name="EptosMessageItemDescriptionDocument" type="p0:DT_EptosMessageItemDescriptionDocument" />

</xsd:schema>

This is generated automatically and cannot be changed.

Where can I have influence on the line with "http://www.w3.org/2001/XMLSchema" which looks like it is not accepted for processing in mapping.

Dirk

Hello again, problem solved: for similar problems have a look at OSS 799657. Thank you, Amaresh, for the hint which has send me into the right direction!

Message was edited by: Dirk Meinhard

Former Member
0 Kudos

HI Dirk Meinhard,

I am exactly having the same problem, Could not understand

the OSS 799657 note, Could you please help asap.

Struck for the past few days on the same problem.

Appreciate your help.

Sravya.

Answers (4)

Answers (4)

Former Member
0 Kudos

Can you share the solution please?

Saurabh

Former Member
0 Kudos

HI Saurabh Parikh ,

I am exactly having the same problem Could you please help asap.

Struck for the past few days on the same problem.

Appreciate your help.

Thanks and Regards.

Sravya.

Former Member
0 Kudos

Dirk,

How did you solve this? I've the exact same problem

Former Member
0 Kudos

Hi,

Please can you see if you have taken Receiver message Interface as the RFC name and also the message type should be either the request or the response of the RFC metadata that you have uploaded.

In the Integration directory also have you selected the RFC name wherever required.

Regards

Vijaya

Former Member
0 Kudos

Hi,

If you are useing XML Schemas for this ...then this type of errors will occur..if your are using XML Schemas then first validate the XML Schemas in XML Spy and according to me namespaces are defined wrong to get this error...

Amaresh