‎2008 Apr 09 10:34 AM
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
‎2008 Apr 09 12:26 PM
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.
‎2008 Apr 09 12:45 PM
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.
‎2008 Apr 09 1: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
‎2022 Feb 18 5:33 PM
Hi, did you manage to solve this? if so can you share the solution?