Lock objects are used to manage database locking in your program. Locking is important in case you expect concurrent accesses to a database table.
You create lock objects in either SE11 or SE80 transactions (under the Dictionary Object in the navigation tree)
Each lock object you create is associated with a database table. You can choose by which fields in the table you lock. For example, in case you have an Employee table, you can choose to lock the table by the ID field of the table. After the creation of a locking object, two methods are available for your use – ENQUEUE_objectname and DEQUEUE_objectname, where objectname is the name of the lock object you created. The former allow you to lock an entry in the table, the latter releases the lock object.
There are many types of locks and we'll not discuss them here. SAP's official guide on locks can be found in the SAP Help. A nice step by step tutorial on locking objects can be found in
No comments:
Post a Comment