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

how to put commit in user exit

Former Member
0 Likes
1,152

Hi!

I waana know that is it possible to out commit after coding user exit.. and if it is can anybody tell me how to do that..

4 REPLIES 4
Read only

suresh_datti
Active Contributor
0 Likes
709

It is not advisable to use the COMMIT WORK statement inside a User exit as it can lead to errors and/or inconsistencies.

~Suresh

Read only

Former Member
0 Likes
709

We had a case where one of the developer put a Commit in the user exit and it created big problems. We created a OSS note only to realize that it was our mistake, lesson learned was never to put a commit in the user exit.

hith

Sunil Achyut

Read only

Former Member
0 Likes
709

You should not do that.

After the user exits code is triggered, the transaction's own commits statements will commit the database anyway.

Regards,

Ravi

Read only

Former Member
0 Likes
709

instead of using commit...

create a Z function module and put your logic into that

and call that function module with 'in update task' addition.

then your function module will be called when the transaction is commited or rollbacked if your transaction is cancelled without saving... it is the best way in your case.