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

Commit changes after CALL FUNCTION ... IN UPDATE TASK

Hi ABAPers,

I'm a bit confused about the behaviour of Update Function Modules.

Following scenario:

In our transaction (Modulpool with dynpros) the user clicks a butto to change some data:

1. PAI-Modul performs FORM_A

2. FORM_A calls FM_A several times in a LOOP

3. FM_A does some business logic and calls FM_B IN UPDATE TASK

4. FM_B modifies database tables

5. After the LOOP FORM_A does COMMIT WORK AND WAIT

Then the changes are not in the db immediately, the user will see the old data for a short time.

Why does the COMMIT-statement not start the Update-process?

Thanks,

Markus

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 11:26 AM

    Hi,

    commit work in Update task acts differently...............it moves the update functions to a seperate......update work process..........and ll commit when the process ends.

    check SM12 while the transaction runs...

    Cheers,

    jose.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 11:45 AM

    Hi,

    This executes all high-priority update function modules registered using CALL FUNCTION ... IN UPDATE TASK in the order of their registration and in a common database LUW. If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating). If you specify the addition AND WAIT, however, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).

    If all high-priority update function modules are completed successfully, the statement executes the low-priority update function modules together in a common database LUW.

    here high priority function moudles are function module with V1 task.

    Regards,

    Siva chalasani.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 12:50 PM

    Thanks for your info!

    The Update-FM (FM_B) is set to processing type "Start immed.", I think this means V1-task.

    The caller also specifies the addition AND WAIT, so I would still expect to find the changed data right after the "COMMIT WORK AND WAIT", but it takes from a few seconds up to a minute.

    Could this happen, because the commit-statement is not in the same procedure as the CALL FUNCTION ... IN UPDATE TASK?

    Cheers,

    Markus

    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.