cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error

Former Member
0 Kudos

Hi,

I am getting a mapping error.

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

Can any boby tell me how I can solve this problem?

Thanks & Regards,

Jai Shankar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The error shows that XI is not able to creat the target field EmpId.

Check your graphical mapping, probably and try testing the same in the builder itself with the good sample source file.Also make sure that the value is present for the source field which is being mapped to the EmpId.

Regards

Sunita

Former Member
0 Kudos

Hi,

Ihave changed the occurance from 1 to 0..1. Now I am getting the error

Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_FILE_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

My source sample is

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

<ns:MT_FSOURCE xmlns:ns="urn:Team8:File:File">

<Recordset>

<Header>

<EmpId>5601</EmpId>

<FName>JAI</FName>

<LName>RAMAKRISHNAN</LName>

<Project>ABCD</Project>

<HKey>H</HKey>

</Header>

<Header>

<EmpId>5602</EmpId>

<FName>JAI</FName>

<LName>RAMAKRISHNAN</LName>

<Project>ABCD</Project>

<HKey>H</HKey>

</Header>

<Header>

<EmpId>5603</EmpId>

<FName>JAI</FName>

<LName>RAMAKRISHNAN</LName>

<Project>ABCD</Project>

<HKey>H</HKey>

</Header>

</Recordset>

</ns:MT_FSOURCE>

Kindly tell me the error

moorthy
Active Contributor
0 Kudos

Hi,

FIrst of all check is your input xml is valid xml ? For this you can copy the xml into notepad and save it as .xml and open in the browser. Also you can make use of XML editors for this.

Error seems to be invalid xml. also check all the fields are mapped correctly

Regards,

moorthy

Former Member
0 Kudos

Hi Jai,

the new error was thrown because the XML isn't valid. Can you check your XML in a tool like XMLSpy from altova or something else? There exists a free version avaiable from that tool.

Regards,

Lars

Answers (4)

Answers (4)

bhavesh_kantilal
Active Contributor
0 Kudos

All,

The Sp18 is actually out.

Check this link,

http://help.sap.com/saphelp_nw04/helpdata/en/cf/9844428e9cbe30e10000000a155106/frameset.htm

Regards,

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

thnx for the info

Former Member
0 Kudos

Hi,

The error was due to the fact there was a node <recordset> inserted into the xml source. When I remove the node the mapping works perfectly well. Tell me how can I get rid if this error.

Thanks in Advance.

Jai Shankar.

moorthy
Active Contributor
0 Kudos

Hi,

Is your scenario is File to File ?

Are you using content conversion? if so Recordset.ignore = true in the content conversion.

If there is no content conversion then , you need to look into your data type.

Regards,

Moorthy

Former Member
0 Kudos

Hi,

I have given the parameter as ignoreRecordsetName=true.

Should I give it Recordset.ignore=true?

Thanks

moorthy
Active Contributor
0 Kudos

No, you are right ..i.e ignoreRecordsetName=true

Just forgot exact name..

Still same error ?

Regards,

Moorthy

Former Member
0 Kudos

Yep. I am getting the same error ie. <recordset> is inserted into the xml.

moorthy
Active Contributor
0 Kudos

What about your Data Type ? How it looks

Former Member
0 Kudos

Hi Jai,

is there only an opening node <recordset> or also a closing node?

Lars

Former Member
0 Kudos

In Data type I have not included a node recordset.

Regards,

Jai Shankar.

Former Member
0 Kudos

Yep. There is a closing node </recordset> at the end.

Regards,

Jai Shankar.

moorthy
Active Contributor
0 Kudos

Check your content conversion once again..It is Case Sensitive.

Did you select RecordSet Per message ..?

Have a look into this also-

http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

_Moorthy

Former Member
0 Kudos

Hi I have not selected the record set per message. What should i give there?

moorthy
Active Contributor
0 Kudos

No need of giving anything over there..use default value only. Still in your SXMB_MONI, then inbound message you are getting RecordSet? ..

Former Member
0 Kudos

Yep, the inbound message contains the <recordset> node.

Former Member
0 Kudos

set ignoreRecordsetName TRUE

Former Member
0 Kudos

Hi Bernhard,

The parameter ignoreRecordsetName TRUE is set, still I have the <recordset> node present in xml. May be some SAP Note has to be applied to correct this behaviour.

Regards,

Jai Shankar.

Shabarish_Nair
Active Contributor
0 Kudos

Note that it is;

ignoreRecordsetName true

true is not in caps.

Former Member
0 Kudos

Hi Shabz,

Yes. I have given it in small case true. I am not sure what SP is used in XI server.

THanks & Regards,

Jai Shankar.

Shabarish_Nair
Active Contributor
0 Kudos

from what i remember i guess it sud work for all above SP9 (i am not sure).

What is your SP ? (in your IR or ID -> Help -> Service Pack )

Former Member
0 Kudos

Hi Shabz,

I am on SP09. What is the latest SP available for XI3.0(Netweaver2004)?

Thanks & Regards,

Jai SHankar.

Shabarish_Nair
Active Contributor
0 Kudos

SP17 is the latest ...

Former Member
0 Kudos

Hi,

The Target Structure contains a main Header node.

Inside the header node I have EmpId, EmpName,Project.

Ihave mapped EmpId to EmpId, Fname and LName concatenated and mapped to EmpName and Project and Hkey concatenated and mapped to Project. The mapping seems to be fine and the xml format is also correct.

Please tell me where I have gone wrong.

Thanks & Regards,

Jai Shankar.

Former Member
0 Kudos

Hi,

try to test the mapping in the Integration Builder. Therefore open your mapping and go to tab Test. There do not import your XML but type the content directly into the shown structure and then press the button "Start transformation". If this test succeeded your mapping will be OK import your source file to the test environment and make one more test with this data. When the error will be shown, then try to check your source XML, it might be not valid.

Regards,

Lars

Former Member
0 Kudos

Hi Jai,

in most cases this error message mean, that you have defined the Field EmpId with an occurance of 1..1 so this field should not be empty after mapping. Try to change the settings of this field to 0..1.

Regards,

Lars