We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
SET LOCKS lock_tab $[response_param$].
The dynamic form of the SET LOCKS statement is used to collect instances of multiple RAP BO entities that are to be locked exclusively in one single SET LOCKS statement.
lock_tab must be an internal table of type ABP_BEHV_LOCKS_TAB. This table has specific components:
|entity_name||Specifies the name of the RAP BO entity for which exclusive locking is intended. The name must be provided using capital letters.|
|instances||Specifies a reference to an internal table that is typed with the BDEF derived type TYPE TABLE FOR KEY OF.|
The program DEMO_RAP_EML_SET_LOCKS covers all forms of the SET LOCKS statement. It accesses a RAP BO using EML and creates multiple BO instances. A SET LOCKS statement follows that exclusively locks instances via the keys. The following SET LOCKS statement (dynamic form) is used at the end of the example:
The following image shows the global lock table (transaction SM12) during the transaction, before the ROLLBACK ENTITIES statement is executed. The newly created instances are locked. After the ROLLBACK ENTITIES statement is executed, the entries are automatically deleted from the lock table.IMAGE @@ABDOC_SET_LOCKS_3.png@@698@@75@@