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: 

SAP Lock Concept - Cumulative Locks

Former Member
0 Kudos

When would you want to use cumulative locking - i.e. placing a lock on a set of records and then placing another lock on the same records, in the same program, before you've released the first lock?

All the textbooks tell you how to do this, but none of them tell you why you might want to do so.

Thanks,

Chris.

4 REPLIES 4

Former Member
0 Kudos

From SAP help:

Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. Each further lock request will be rejected.

Rob

0 Kudos

Hi Rob,

Yes, but where might such locking be used? What business or data processing scenario? I notice this question has been asked on several occasions on this forum, but no one seems to have a clue about the answer. Anyone?


0 Kudos

Hi Tim,

in many situations, you must make sure that an object is locked before you change it. A Calling program/function may have set the lock already, so you set it again anyway. Then it is cumulative.

Right, you may also check for lock first and lock only if not already locked, but who does?

Regards, Clemens

0 Kudos

Thanks Clemens, a good point you make.