Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Complex Commit sap table & external Oracle DB

Former Member
0 Likes
407

Hi everone,

I need to executes 2 commits.

There are dependencies between both commits if one them failed i need to do rollback to sap table & external DB.

the commits are:

1) First fm "bapi_transaction_commit" -> update sap table .

2) Second Class cl_sql_connection method commit -> update external Oracle DB

I'm afarid of the situation that first step will succeed the second will not succeed.

How can i solve this problem ?

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
368

In your current design, you may have to physically rollback the changes by restoring the old impression.

Is it possible to change the sequence of the commits? You would have better control on updating the SAP DB table.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
368

Even if you change the order or try to back out the changes, you can still run into problems.

Please Google "two phase commit".

Rob