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: 

lock objects

Former Member
0 Kudos

hi,

what is difference between exclusive cumulative and exclusive but not cumulative.

6 REPLIES 6

Former Member
0 Kudos

Exclusive lock:

The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.

Shared lock:

More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.

Exclusive but not cumulative:

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. All other lock requests are rejected.

Rewards if useful.

Former Member
0 Kudos

hi ,

The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.

Access by more than one user can be synchronized in the following ways:

Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.

Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.

Exclusive but not cumulative: 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. All other lock requests are rejected.

REWARD IF USEFUL

thanks and regards

suma sailaja pvn

Former Member
0 Kudos

hi rajyalakshmi,

Shared lock : Several users (transactions) can access locked data at the same time in display mode. Requests from further shared locks are accepted, even if they are from different users. An exclusive lock set on an object that already has a shared lock will be rejected.

Exclusive lock

An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock (accumulate).

Exclusive but not cumulative lock

Whereas exclusive locks can be requested several times by the same transaction and released one by one, an exclusive, non-cumulative lock can only be requested once by the same transaction. Each further lock request will be rejected.

Optimistic lock

Optimistic locks initially behave like shared locks and can be converted into exclusive locks. See

Locks of type exclusibe but not cumulative can only be called once.so a lock request will be rejected if an exclusive lock already exists.when the lock objects are defined in the dictionary,there are two ABAP function modules automatically generated for them.one to lock the object(enque) and one to unlock it.these functions are called at the beginning and at the end resprctively.if there is a problem between locking and unlocking of an object,it remains unlocked until administrator manually deletes the lock.

__*Exclusive and cumulative.*__

This mode is also known as a write lock. It's requested by transactions that update the contents of a particular table. The same transaction may request additional write locks. A cumulative counter, initialized to 0, is provided for this purpose. Each time a particular data is locked via a cumulative lock, the counter is incremented by 1. Any external read locks are denied.

Exclusive and not cumulative. This mode behaves in a similar fashion to the cumulative lock. The only difference is that cumulative facility is not permissible; a transaction cannot set additional lock entries on data that it has already locked.

refer to this link for more information

http://articles.techrepublic.com.com/5100-6329_11-5066352.html

reward points if help ful,

shylaja

Former Member
0 Kudos

Hi Rajyalakshmi cheepurupalli ,

The main difference between exclusive cummulative & exclusive not cummulative lock is

exclusive cummulative lock can be called only once from the same transaction but exclusive not cummulative lock can be called from the same transaction multiple times.

cheers!

gyanaraj

****Pls reward points if u find this helpful

Former Member
0 Kudos

Hi,

following is the difference.

Exclusive lock:

The locked data can be read or processed by one user only. A request for another exclusive lock or for a shared lock is rejected.

Shared lock:

Several users can read the same data at the same time, but as soon as a user edits the data, a second user can no longer access this data. Requests for further shared locks are accepted, even if they are issued by different users, but exclusive locks are rejected.

Exclusive but not cumulative lock

Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected.

Regards

Venkata prasad

Former Member
0 Kudos

Hi,

Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.

SAP Provide three type of Lock objects.

- Read Lock(Shared Locked)

protects read access to an object. The read lock allows other transactions read access but not write access to

the locked area of the table

- Write Lock(exclusive lock)

protects write access to an object. The write lock allows other transactions neither read nor write access to

the locked area of the table.

- Enhanced write lock (exclusive lock without cumulating)

works like a write lock except that the enhanced write lock also protects from further accesses from the

same transaction.

You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.

Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.

Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.

Technicaly:

When you create a lock object System automatically creat two function module.

1. ENQUEUE_<Lockobject name>. to insert the object in a queue.

2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.

regards,

vasavi.

reward if helpful.