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

Commit statement in user exit

Former Member
0 Likes
1,184

Hi All,

We found that while doing PGI , it takes some time to COMMIT the table VBUK. Due to which we are getting old values of VBUK-KOSTK field while executing select query at later point of time in the flow.

My question --

Can I use COMMIT WORK statement in user exit MV50AFZ1 --> FORM USEREXIT_SAVE_DOCUMENT so that all the related tables

get committed immediately.

Thanks

Saurabh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
989

SAP does not permit you to use COMMIT work in User exit.

Regards, Sri

5 REPLIES 5
Read only

Former Member
0 Likes
989

Hi,

Try using COMMIT WORK AND WAIT syntax

Edited by: Navitha Anwer on Sep 30, 2009 6:15 AM

Read only

Former Member
0 Likes
989

Hi Saurabh ,

Normally , you shoud not specify COMMIT stmt in any user exit , badi etc..

SAP has its own COMMIT statement while execuiting the standard transactions .

Addition of a COMMIT might lead to problems elsewhere .

Thanks

Supriya

Read only

Former Member
0 Likes
990

SAP does not permit you to use COMMIT work in User exit.

Regards, Sri

Read only

0 Likes
989

Syntactitically, this is allowed. But its not advisable, cause you can never know, which reports are affected by this unexprected commit, cause it commits all outstanding modifications and you do not know if a programmer needs to store something in addidtion to end a logical unit of work.

Read only

Former Member
0 Likes
989

thx.