Application Development and Automation 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: 
Read only

Commit changes after CALL FUNCTION ... IN UPDATE TASK

Former Member
0 Likes
3,549

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,309

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.

Read only

Former Member
0 Likes
1,309

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.

Read only

Former Member
0 Likes
1,309

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

Read only

0 Likes
1,309

Hi, did you manage to solve this? if so can you share the solution?