Skip to Content
author's profile photo Former Member
Former Member

Commit Work for just one function module

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Mar 13, 2014 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

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

  • Posted on Mar 13, 2014 at 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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.