cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create target element

Former Member
0 Kudos

Hi,

I have a flat file containg these FCC Parameter

Country_Code.fieldNames CountryKey,Id,Description

Country_Code.fieldSeparator ,

Country_Code.endSeparator 'nl'

After activating, i got these error.

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

- <!-- Request Message Mapping

-->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">GENERIC</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_OB_COUNTRY_</SAP:P1>

<SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>

<SAP:P3>on: Cannot create target element /ns0:Messages/ns0</SAP:P3>

<SAP:P4>:Message1/ns1:MT_IB_COUNTRY/STATEMENTNAME/CfgCoun~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>com/sap/xi/tf/_MM_OB_COUNTRY_com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:Messages/ns0:Message1/ns1:MT_IB_COUNTRY/STATEMENTNAME/CfgCoun~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

i have same mapping is wroking with xml file, I have just change xml file to txt file with content converstion .

We have one flat file at source side and 2 database table at target side.

Pls provide me you inputs.

Regards

Laxmi Bhushan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Laxmi,

If you are getting this error in SXMB_MONI in mapping step, then it is nothing to do with the FCC.

There has to be some issue with mapping only.

-Supriya.

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

> i have same mapping is wroking with xml file, I have just change xml file to txt file with content converstion .

I suppose that your XML file is different to the XML created through FCC.

Adjust this.

former_member207622
Contributor
0 Kudos

@ stefen : yes you are right , I think some extra spaces or extra fileds are coming in th inbound xml after conversion .

@ laxmi : validate the payload with the data you entered and check its fine or not

regards

NInad

Former Member
0 Kudos

My Payload having this data

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

- <ns:MT_OB_COUNTRY xmlns:ns="http://testciticonnectivity_ns">

- <Record>

- <Country_Code>

<CountryKey>IN</CountryKey>

<Id>India</Id>

<Description>India</Description>

</Country_Code>

</Record>

</ns:MT_OB_COUNTRY>

Thanks

Former Member
0 Kudos

Hi,

"Record" node is a part of ur source data type??

if no then use ignoreRecordSetName= true under ur FCC.

Thanks

Amit

Former Member
0 Kudos

hi,

I have applied these things

but error is same.

my target Test structure is

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_IB_COUNTRY xmlns:ns1="http://testciticonnectivity_ns">

<STATEMENTNAME>

<CfgCountry action="INSERT">

<TABLE>TestCountry</TABLE>

<access>

<Id>IN</Id>

<Description>India</Description>

<CountryKey>India</CountryKey>

</access>

</CfgCountry>

</STATEMENTNAME>

</ns1:MT_IB_COUNTRY>

</ns0:Message1>

<ns0:Message2>

<ns1:MT_IB_TESTX xmlns:ns1="http://testciticonnectivity_ns">

<STATEMENTNAME>

<testx action="INSERT">

<TABLE>TESTX</TABLE>

<access>

<CID>India</CID>

</access>

</testx>

</STATEMENTNAME>

</ns1:MT_IB_TESTX>

</ns0:Message2>

</ns0:Messages>

thanks

former_member207622
Contributor
0 Kudos

Hi laxmi ,

Target payload looks like a 1:n mapping . have you added both the structure by going into the signature tab of message mapping and changed there occureences to 0-unbounded . Check your support pack shud be greater then SP07 .

you need to adjust your context here below the messages node .

give me details about your mapping like what have you mapped on to target source node .

let me know if this works

Regards

Ninad

GabrielSagaya
Active Contributor
0 Kudos

Did you map with constant node to CfgCountry element?

Former Member
0 Kudos

yes it works

Thanks

GabrielSagaya
Active Contributor
0 Kudos

Simply check the mapping for /ns0:Messages/ns0:Message1/ns1:MT_IB_COUNTRY/STATEMENTNAME/CfgCoun. It may be something wrong in mapping or some data must be missing

Please check this blog

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

former_member207622
Contributor
0 Kudos

Hi laxmi

If you are giving field separator as comma it will be a .CSV file and not a .TXT file , if its a text file you have to specify the length of the fiields . Try using csv file .

check SDN for content conversion parameters

Regards

Ninad