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

Lock inheritance with "CALL FUNCTION func IN BACKGROUND TASK"

Former Member
0 Likes
530

I see that the "SAP Lock concept" documentation states that for locks obtained with _scope = '3', all UPDATE tasks (spawned via "CALL FUNCTION func IN UPDATE TASK" inherit the lock (which is released only once all such update tasks and the calling process have requested a DEQUEUE).

What should happen when instead, I use "CALL FUNCTION func IN BACKGROUND TASK" (for doing the update in a queue)? Are the locks inherited here as well?

Cheers!

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
450

Hopefully not, as a background task may be executed late. While update tasks are to be executed quickly (if not, administrators should review the system configuration, like increasing the number of UPD workprocesses).

Solution: In the background task, redo the locks, as if it was a background job.

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
451

Hopefully not, as a background task may be executed late. While update tasks are to be executed quickly (if not, administrators should review the system configuration, like increasing the number of UPD workprocesses).

Solution: In the background task, redo the locks, as if it was a background job.

Read only

0 Likes
450

Yep. Thats what I'm going to do. Thanks!