cancel
Showing results for 
Search instead for 
Did you mean: 

inserting only first record in the table

Former Member
0 Kudos

Hi,

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

- <ns0:MT_SP_RESPONSE_TARGET xmlns:ns0="http://ns_cfgCountry">

- <STATEMENTNAME>

- <row action="INSERT">

<TABLE>TESTR</TABLE>

- <access>

<Result>10000000000494</Result>

<ID>IN</ID>

<Description>INDIA</Description>

<GDate />

</access>

</row>

- <row action="INSERT">

<TABLE>TESTR</TABLE>

- <access>

<Result>10000000000495</Result>

<ID>EN</ID>

<Description>ENGLAND</Description>

<GDate />

</access>

</row>

</STATEMENTNAME>

</ns0:MT_SP_RESPONSE_TARGET>

My problem is only first row is inserted into the table.

Can u guys please let me know the problem.

Regards

Laxmi Bhushan Jha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Laxmi Bhusan,

The problem is your Statement structure. it seems wrong

Please find the below structure and please set occurence for access is 0 to unbounded.In your case "table" is same for two rows.

<?xml version="1.0" encoding="UTF-8" ?> 
- <ns0:MT_SP_RESPONSE_TARGET xmlns:ns0="http://ns_cfgCountry">
- <STATEMENTNAME>
- <row action="INSERT">
<TABLE>TESTR</TABLE> 
- <access>
<Result>10000000000494</Result> 
<ID>IN</ID> 
<Description>INDIA</Description> 
<GDate /> 
</access>
<access>
<Result>10000000000495</Result> 
<ID>EN</ID> 
<Description>ENGLAND</Description> 
<GDate /> 
</access>
</row>
</STATEMENTNAME>
</ns0:MT_SP_RESPONSE_TARGET>

thank you,

Sateesh

Edited by: sateesh kumar .N on Sep 30, 2010 8:44 AM

Former Member
0 Kudos

thanks Sateesh,

You solved my problem

Regards

Laxmi Bhushan

Answers (3)

Answers (3)

Former Member
0 Kudos

Use logSQLStatement parameter in the receievr JDBC channel and check what query is getting formed at runtime.

On the advanced tab page of channel, in the table, maintain this parameter logSQLStatement, keep its value as 'true'

-Supriya.

Former Member
0 Kudos

Hi

Please check the target structure u have....

It leads to insert only the first row only..

Change the structure accodingly..

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Babu

Edited by: hlbabu123 on Sep 29, 2010 3:09 PM

Former Member
0 Kudos

Pls specify the details.

I am unable to find the problem in mapping.

regards

Former Member
0 Kudos

Hi,

Yes you are correct , because it wil not show any problem in mapping...

The problem lies in the target structure...

Please correct the target structure as any of the standard one in above post given link... It will work.

Since your structure is not matching, thtz y it will update only 1 row..

@Abhishek, yes u r correct

Babu

Edited by: hlbabu123 on Sep 29, 2010 5:54 PM

former_member200962
Active Contributor
0 Kudos

<MT_Name>

<Statement1>

.

.

.

</Statement1>

<Statement2>

.

.

.

</Statement2>

</MT_Name>

I think this is what Babu is trying to indicate.

Former Member
0 Kudos

hi,

I think this can be the right solution .

Please tell me the occurence as per given source and target payload

This is Source Structure in payload

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

- <ns0:MT_SP_JDBC_response xmlns:ns0="http://ns_cfgCountry">

- <GetNextSiteNumber_response>

<Result>10000000000528</Result>

</GetNextSiteNumber_response>

- <GetNextSiteNumber_response>

<Result>10000000000529</Result>

</GetNextSiteNumber_response>

- <Statement2_response>

- <row>

<ID>IN</ID>

<Description>INDIA</Description>

<GDate />

<FLAG>FALSE</FLAG>

</row>

- <row>

<ID>EN</ID>

<Description>ENGLAND</Description>

<GDate />

<FLAG>FALSE</FLAG>

</row>

</Statement2_response>

</ns0:MT_SP_JDBC_response>

This is Target Structure in Payload

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

- <ns0:MT_SP_RESPONSE_TARGET xmlns:ns0="http://ns_cfgCountry">

- <STATEMENTNAME>

- <row action="INSERT">

<TABLE>TESTR</TABLE>

- <access>

<Result>10000000000528</Result>

<ID>IN</ID>

<Description>INDIA</Description>

<GDate />

</access>

</row>

- <row action="INSERT">

<TABLE>TESTR</TABLE>

- <access>

<Result>10000000000529</Result>

<ID>EN</ID>

<Description>ENGLAND</Description>

<GDate />

</access>

</row>

</STATEMENTNAME>

</ns0:MT_SP_RESPONSE_TARGET>

Please tell me the occurence and mapping combination of given source and target, as of now it is inserting only first row of data to database

Edited by: laxmi bhushan on Sep 30, 2010 11:45 AM

Former Member
0 Kudos

Hi,

The occurences for Statement1 and Statement2 & also for row inside them would be 0...1.

Every access inside every row will have occurences of 0..unbounded.

The mapping logic will be applicable to access node, as it will be generated many times at runtime.

For Statement1 & Statement2 and for row, you can map with contant.

-Supriya.

Former Member
0 Kudos

Hi Bhushan,

For ur structure the prblm is not about occurence, the structure and the mapping u r doing itself is the problem.

Please check once in th link i have provided earlier and change the structure also apping accordingly...

Babu

Former Member
0 Kudos

can you copy the error log from the receiver communication channel.