‎2009 Apr 08 11:42 AM
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.
‎2009 Apr 08 11:45 AM
Hi,
Never use Commit work in user exit.
This will lead to data inconsitency problem.
Regards,
Naveen
‎2009 Apr 08 11:45 AM
Hi,
Never use Commit work in user exit.
This will lead to data inconsitency problem.
Regards,
Naveen
‎2009 Apr 08 11:46 AM
check the documentation of the exit, it will be documented if you can use explicit commit..
‎2009 Apr 08 11:47 AM
‎2009 Apr 08 11:53 AM
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
‎2009 Apr 08 12:19 PM
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.
‎2009 Apr 08 12:32 PM
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.
‎2009 Apr 08 1:40 PM
‎2009 Apr 10 1:13 PM
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.