cancel
Showing results for 
Search instead for 
Did you mean: 

receiver jdbc adapter:how to implement the insert or update action in a sql

xinjiang_li
Active Participant
0 Kudos

Hi,gurus:

I'm using receiver jdbc adapter now.

You know, we have to gave the action the value 'update' or 'insert',but in our case,the action is variant--update or insert.It decides whether the record exists in the outer database.

Can stored procedure do this?If I use stored procedure,then must I create a stored procedure in the outer database?

Or some other ways to solute my issue?

THanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use Action as "UPDATE_INSERT"

Answers (4)

Answers (4)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Use Action UPDATE_INSERT .

This action check if a record exist with same key value then update that record. In case no record with key value found in database then record inserted to database.

look receiver structure

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

Former Member
0 Kudos

Hi,

Use INSERT_UPDATE so that you can insert the new record as well as update the existing record as well.

Regards,

Nithiyanandam

Former Member
0 Kudos

You can use INSERT_UPDATE as action. it check the DB whether row is available or not. If it is not available then inserts and if data is changed then updates.

But here even if the data is available this action will always updates the row,but wont duplicate..You can cross by checking row id in DB

Thanks

Prabhakar

Former Member
0 Kudos

Hi

From the Sender Interface add an extra element as action code "I" / "U"

map to the Receiver Structure for I > INSERT U-> UPDATE

hope this helps

rgds

srini