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

Short Dump (BAPI_TRANSACTION_COMMIT)

Former Member
0 Likes
638

Hi,

i'm trying to create a notification(IW22) in a userexit depending on some condition. i'm calling the BAPI 'BAPI_ALM_NOTIF_CREATE'. Everything works fine and i'm getting the notification no in the BAPI. But when i'm doing commit calling the BAPI 'BAPI_TRANSACTION_COMMIT'. Its giving dump

Pls let me know if anyone has any suggestions how to overcome this

Thanks a lot

3 REPLIES 3
Read only

Former Member
0 Likes
501

Hi,

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

You should NOT use Commit work & wait in a user exit as it can cause data integrity issues within the transaction.

what you can do is use PERFORM <name> ON COMMIT

or call a function module in UPDATE TASK

this way your commit will happen when the transaction decides to commit the data.

if you call a commit work , all the data will be commited to the db , both what you want to & what the standard code may/may not want to.

Regards

Read only

0 Likes
501

Hi Kiran,

You mean i should put all the code related to calling the BAPI's inside the Perform.. on Commit?

Can i create another program and copy all the code in the program including COMMIT WORK and call that program using 'SUBMIT' from the user exit point.. will it work?

Thanks

Read only

0 Likes
501

Guys,

waiting for the suggestions

Thanks