cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Receiver: update

Former Member
0 Kudos

Hello,

could you please let me know how to update the records (assigned Primary Key) at DB table from SAP PI

Scenario: JDBC Sender to JDBC receiver

Mapping:

sender Message Type: field1, field2, field3, field4

receiver Message Type: field1<primaryKey>, field2, field3, field4

Action: tried with UPDATE and UPDATE_INSERT

Business Logic: in DB1 we have 100 records and same records are inserted to DB2.

on next day out of 100 records, 5 records are updated in DB1. So same 5 records i need to send again to DB2.

Issue: the update query from sender channel will get the updated 5 records from DB1 and try to insert at DB2, it is failing with PK issue (java.sql.SQLException: ORA-00001: unique constraint (DATA.TABLE1_PK) violated)

Best Regards,SARAN

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You can define one stored procedure with required logic in DB2 and can define the same in the structure of target jdbc data type.

Reg,

Former Member
0 Kudos

Hi,

Refer to below link; and check if the structure for UPDATE_INSERT is properly defined or not:

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/747eda12dd3676e10000000a114a6b/frameset.htm

-Supriya.