cancel
Showing results for 
Search instead for 
Did you mean: 

Update procedure in JDBC Receiver

Former Member
0 Kudos

Hi,

I am Working on Idoc to JDBC Scenario. I need to work with Insert and update procedure.

When i send the Idoc the scenario is succesful in inserting the data. But when i am resending the Idoc, the scenario is not executing in updating the record.

The error in RWB is:

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BAAN.TDCNCC002SAP' (structure 'STATEMENT'): java.sql.SQLException: ORA-00001: unique constraint (BAAN.TDCNCC002SAP_IDX2) violated

I am using action as UPDATE_INSERT.

Can some one advise me on this.

Regards,

Manoj

Accepted Solutions (0)

Answers (4)

Answers (4)

prateek
Active Contributor
0 Kudos

A probable cause could be empty key fields.

U can do one thing Go to Advanced mode in Receiver JDBC CC add the parameter

logSQLStatement true

Using this u can check the query. Now run this query at receiver JDBC database. Check if it is working.

Regards,

Prateek

Former Member
0 Kudos

"Initially, the same action is executed as for UPDATE. <b>If no update to the database table can be made for this action (<b>the condition does not apply to any table entry</b>)</b>, values of the table described in the <access> element are inserted in accordance with the description of the action INSERT. <key> elements are ignored in this case."

from help.sap.com

Former Member
0 Kudos

UPDATE_INSERT will first check if the row exists and if yes, it will Update the row.

If the row does not exists then a new row will be inserted.

It uses the condition under KEY to check if any row exists that satisfies the condition and if it does, it updates all rows else it inserts a new row with the values.

**********************************************************************

Hope you got the answer..::))

former_member192892
Active Contributor
0 Kudos

Hi Manoj,

It seems you are unknowingly updating some primary key value, which should not happen.. Could this be possible??