cancel
Showing results for 
Search instead for 
Did you mean: 

issue in updating multiple records in receiver JDBC

mohammadaamir_khan
Participant
0 Kudos

Hi All,

I need to update multiple records in JDBC. I have created the message type and corresponding payload is given below. For single record, it is working fine but when i try to send multiple records, I am getting error that primary key violation. Please suggest how to achieve updating multiple records.

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

- <ns1:MT_PO_Closure_Response xmlns:ns1="http://PO_Closure_IB">

- <ControlRecord>

- <dbTableName action="UPDATE">

<table>t_al_host_sql_export_queue</table>

- <access>

<host_group_id>BEF05BBA-752D-4A28-BE7B-492DB8FE4B86</host_group_id>

<status>C</status>

</access>

- <access>

<host_group_id>06E35820-9204-4D58-84E9-F1E56C44E248</host_group_id>

<status>C</status>

</access>

- <key>

<host_group_id>BEF05BBA-752D-4A28-BE7B-492DB8FE4B86</host_group_id>

</key>

- <key>

<host_group_id>06E35820-9204-4D58-84E9-F1E56C44E248</host_group_id>

</key>

</dbTableName>

</ControlRecord>

</ns1:MT_PO_Closure_Response>

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member192343
Active Contributor
0 Kudos

Hi, your structure is not correct,

structure shouls be like this:

<controlrecord>

     <dbtablename>

          <access>

           <key>

     </dbtablename>

</controlrecord>

<controlrecored>

     dbtablename>

          access>

          key>

     </dbtablename>

</controlrecord>

regards....

mohammadaamir_khan
Participant
0 Kudos

Dear Mikhail,

Can you please share how to create the data type for same. I tried many ways but still not able to get the xml format you suggested.

Thanks

former_member192343
Active Contributor
0 Kudos

Dear Mohammad,

the right structure is described in help http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7b85050e6c3675e10000000a114a6b/content.htm

what is the problem in creating data type of that structure?

access tag should occur only once at every statement, I think you should change your mapping, map every new row data to ControlRecord node, then target structure will be changed

mohammadaamir_khan
Participant
0 Kudos

Thanks Mikhail

Answers (0)