Application Development 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: 

Commit Work for just one function module

Former Member
0 Kudos

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.

3 REPLIES 3

ThomasZloch
Active Contributor
0 Kudos

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

0 Kudos

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 ).

Private_Member_7726
Active Contributor
0 Kudos

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