Application Development 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: 

Locking in update task

Former Member
0 Kudos

Hi,

I have a weird issue with locking during update task.

I have a report, which enqueue a specific lock object in exclusive cumulative mode (mode E) with scope 2.

Afterwards, I call FM in update task, which also enqueue exactly the same object in exclusive cumulative mode with scope 2. The FM is triggered after commit work has been executed.

For some reason, the enqueue during the update task process fails (because object is locked by other owner).

As I know, there shouldn't be any locking problem because the update task inherits the lock owner (as described in http://help.sap.com/saphelp_erp60_sp/helpdata/EN/7b/f9813712f7434be10000009b38f8cf/frameset.htm).

Does anyone why does it occur? How can I solve this issue?

Thanks in advance,

Shai

2 REPLIES 2

Former Member
0 Kudos

Hi

before calling the function module in update task you need to dequeue the lock

Regards

MD

Former Member
0 Kudos

Hi,

Thanks for the answer.

Why is that?

The lock is defined in exclusive cumulative mode, what means that the same lock can be requested by the same owner several times.

This scenario works just fine in normal dialog process (with two sequent locks), but fails in update task.

For your knowledge,

Shai