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

Using commit work in exit : EXIT_SAPMM06E_013

Former Member
0 Likes
1,711

Hi all,

because of some reasons Iam using 'COMMIT WORK AND WAIT' statement to commit the data in exit : EXIT_SAPMM06E_013.

Will it effect any data storage? like when my Commit work statement executed all data will be saved in tables but ME21N/ME22n/ME23N might be adding some data after exit and finally commiting the data.

So please tell me will this command have any bad effect?

Thanks & Regards,

Rock.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,553

Hi,

Never use Commit work in user exit.

This will lead to data inconsitency problem.

Regards,

Naveen

8 REPLIES 8
Read only

Former Member
0 Likes
1,554

Hi,

Never use Commit work in user exit.

This will lead to data inconsitency problem.

Regards,

Naveen

Read only

former_member156446
Active Contributor
0 Likes
1,553

check the documentation of the exit, it will be documented if you can use explicit commit..

Read only

Former Member
0 Likes
1,553

...

Read only

0 Likes
1,553

Hello Shital phadake ,

Let meexplain u scenario ( creating PO).

In User EXit , if you have explicitly written Commit statement, then it will Commit all the changes on the database tables till that instance ( even without completing the whole transaction) and if after the userexit in somescreens your data is invalid , then without creating PO control may sometimes leave transaction .

Here in this case some tables will be updated even though PO is not cretaed or changed.

Its better to go through documentation of that exit and then only we can use Commit if its applicable.

Regards,

Naveen

Edited by: Naveen Deva on Apr 8, 2009 12:55 PM

Read only

0 Likes
1,553

Thanks all for u r precious answers.I have read all the docs related to that exit and I found that exit : EXIT_SAPMM06E_013 is invoked prior to Commit work,so I think using Commit Work is not an issue,right?.The following is the doc for EXIT_SAPMM06E_013 exit :


EXIT_SAPMM06E_013. This is invoked directly prior to "commit work" with
all available data. You can carry out further checks prior to saving via
the function module EXIT_SAPMM06E_012. This is processed in the case of
the functions "Check document" and "Save".

Please suggest whether I can use Commit Work or not?

Thanks & Regards,

Rock.

Read only

0 Likes
1,553

Hi Rock,

I believe using a commit work in the exit is dangerous as if you do a commit work in the exit , it will commit the database changes. But after the user exit it finds that some data is not proper and so the transaction is terminated without saving or creating the record. But since the commit work was performed in the user exit, those unnecessary changes will be there in the database even though the transaction has not been saved.

Since this user exit is "invoked directly prior to "commit work" with

all available data", you can do your changes in the user exit without commiting and later on when the transaction is completed, the std code will do a commit work . In that commit work your changes in the user exit will also be committed.

Regards,

Soumya.

Read only

0 Likes
1,553

check this discussion

Read only

0 Likes
1,553

Thanks all for u r replies.Every answer got points.

I have removed commit work from the exit.I have changed my code.Actually we have implemented a 2 level Z release strategy apart from 5 level PO release strategy,and I need to give number of releases based +ve,-ve deviation..If my current code in exit doesnot work then i will tell my client to run one report everytime they change PO.Coz I dont want to take any kind of risk.

Thanks all once again.