03-13-2014 7:53 PM
Hi experts,
i have one question;
I need one solutions for commit work but just one function module. If i set commit work in function module then everything is taking the commit. But i dont like this. I need just for FM. This is impossible ?
Thak you, regards.
03-13-2014 7:58 PM
Commit work writes all changes within a LUW (logical unit of work) to the database. By singling out just the changes that one FM did, you are violating the fundamental principle behind it. What should happen to the other changes, should they be rolled back? Why are they done in the first place?
Please explain more about the context, maybe there is another way to do what's required.
Thomas
03-13-2014 8:49 PM
Hi Thomas,
first thank you for answer. I have one enhancement. İt is for invoice grouping and i need before inv. grouping delete one document. If dont set commit then make to group all inv. ( so together should be deleted inv ).
03-13-2014 10:58 PM
Hi,
The only way I know involves creating a nested LUW - opening a new internal session by calling ABAP program using SUBMIT ... AND RETURN or a CALL transaction code.
Meaning, you'd have to code your logic in a report program/transaction, use the function module to merely call that report/transaction and, if necessary, use EXPORT/IMPORT or SHARED MEMORY to exchange data between the sessions. It's quite "ugly" solution IMO, and it involves session handling overhead, which can make it unsuitable for time-critical mass processing.
Cheers,
Janis