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

Transaction commit work

Former Member
0 Likes
444

Hello,

I developed an user-exit that inserts several lines into a table.

What I want to do is make sure that the insert is being performed only if the entire transaction runs without errors.

How can I do this?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
423

which table / transaction user exit is that?

at a higher level, if you are modifying SAP data, you dont need to do anything as SAP will take care of rolling it back in case of transaction errror, but in caseof your own custom table, you need to make sure the update is called only in update task once the actual DB is commited.

3 REPLIES 3
Read only

Former Member
0 Likes
424

which table / transaction user exit is that?

at a higher level, if you are modifying SAP data, you dont need to do anything as SAP will take care of rolling it back in case of transaction errror, but in caseof your own custom table, you need to make sure the update is called only in update task once the actual DB is commited.

Read only

0 Likes
423

I'm modifying a custom table I created using an SQL insert statement.

How can I make sure that the insert is being performed only when DB is commited ?

Thanks.

Read only

0 Likes
423

either use a user exit which gets called after data save e.g - USEREXIT_SAVE_DATA for VA01 / VA02, or just create a function module with ttype as an Update. put your SQL code in there to update the z table. then from the user exit call that function module using call function zxxxx in update task.. That will make sure the function is called only after commit.