Sap lock mechanism pdf




















These locks are known as SAP locks. This is a short introduction within the environment of ABAP programming. The SAP lock concept is based on lock objects. Lock objects allow you to set SAP locks for entire application objects.

An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships. A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock.

These function modules are executed in a special enqueue work process. Within an SAP System, enqueue work processes run on a single application server.

This server maintains a central lock table for the entire SAP System in its shared memory. The enqueue function module sets an SAP lock by writing entries in the central lock table.

If the lock cannot be set because the application object or a part of it is already locked, the function module informs the user. The following figure shows the components involved in the lock process:. Unlike the database, which sets physical locks, the SAP lock mechanism sets logical locks. This means that:.

The lock entry is merely entered as a lock argument in the central lock table. The lock argument is made up of the primary key field values for the tables in the lock object. These are import parameters of the enqueue function module. The lock is independent of database LUWs. It is released either implicitly when the database update or the SAP transaction ends, or explicitly, using the corresponding dequeue function module.

You can use a special parameter in the update function module to set the exact point at which the lock is released during the database update.

You can, for example, set a lock as a precaution for a database entry that is not written to the database until the update at the end of the SAP LUW. Since there are no physical locks in the database tables themselves, all programs that use the same application objects must look in the central table themselves for any locks.

There is no mechanism that automatically prevents a program from ignoring the locks in the lock table. When you set a lock, you should bear in mind that if it remains set for a long time, the availability of the object to other transactions is reduced.

You can check whether the update server is functioning correctly, since the lock table can grow very fast if the update function stops. If no update problems exist, you can use this parameter to increase the size of the lock table. Default value: Kb. 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. Only the same lock owner can reset the lock.

Basis Corner. Browse pages. A t tachments 0 Page History.



0コメント

  • 1000 / 1000