cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create target element /ns0:MT_ECC_DATASYNC_TALISMA_IN/Statement

baskar_ramasamy
Participant
0 Kudos

Hi Experts,

    

My scenario is to fetch data from oracle database table and
write it to MS SQL database table.

I have created a table structure mentioned above.

When I test from RWB test message, data is getting inserted.
But when fetching same data from Oracle DB , I am getting mapping error.

Error:

RuntimeException during appliction
Java mapping com/sap/xi/tf/_MM_ECC_DATASYNC_TALISMA_ Thrown:
com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element
/ns0:MT_ECC_DATASYNC_TALISMA_IN/Statement. Values missing in queue context.
Target XSD requires a value for this element, but the target-field mapping does
not create one.

MY FINDINGS & OBSERVATIONS:

When data comes from Oracle db, the
header tag is <row> , and this transaction fails in MONI.(Mapping Error)

When the same data tested from RWB
Test Message it fails. If I change the <row> to <Header> , the record
gets inserted in test message of RWB.

   

Ex:
Failure record

-<ns:MT_ECC_DATASYNC_TALISMA_OUT xmlns:ns="http://ECC_DATASYNC_TALISMA">

-<row>

<MANDT>270</MANDT>

   Ex:Success record

Record
gets inserted Input xml has <Header> tag

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

<ns0:MT_ECC_DATASYNC_TALISMA_OUT
xmlns:ns0="http://ECC_DATASYNC_TALISMA">

   <Header>

  <MANDT>270</MANDT>

  <KUNNR>0000059921</KUNNR>

Regards,

Baskar

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Baskar - Just change your data type. Change the Header to row(lower case)

It's a standard formate.. refer to the below blog..

http://www.riyaz.net/sap/jdbc-adapter-configuration/1200/

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Whenever you read data from database the xml structure needs to be in this format

<resultset>

<row>

<column-name1>column-value</ column-name1>

<column-name2></column-name2>

<column-name3>column-value</ column-name3>

<column-name4></column-name4>

</row>

<row>

<column-name1>column-value</ column-name1>

<column-name2></ column-name2>

</row>

</resultset>

Check the doc below

https://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm