Show TOC

 Creating Lock ObjectsLocate this document in the navigation structure

  1. Open the Repository Browser and navigate to the package in which you want to create the lock object.
  2. In the context menu of the package, choose Create → Dictionary Object → Lock object.

    A dialog box appears.

  3. In the new dialog box, enter the name of the lock object and choose  with the quick info text Continue.

    The maintenance screen for lock objects is displayed.


    The name of a lock object must begin with E (Enqueue).

  4. In the field Short Description, enter an explanatory short text.

    You can use this short text to find the lock object at a later time, for example with the SAP Repository Information System.

  5. Choose the Tables tab page and enter the name of the primary table of the lock object in the Name field.

    All other tables in the lock object must be linked with the primary table using foreign keys . There are also some restrictions on the valid foreign key relationships .

  6. Select the lock mode of the primary table in the Lock Mode field.

    The lock mode is used as the default value for the corresponding parameters of the function modules generated from the lock object.

  7. On the Tables tab page, choose Add if you want to lock records in more than one table with the lock object.

    A list of all the tables linked with the primary table using valid foreign keys appears. Select the appropriate table. The lock mode of the primary table is copied as the lock mode. You can change this setting as required, for example you can assign the lock mode separately for each table.

    Similarly, you can add a table linked with the secondary table that was just added with foreign keys. To do this, select the name of the secondary table and choose Add.


    If no lock mode is assigned to a table, the system does not set a lock for the entries in this table when the generated function modules are called. You must not assign a lock mode if a secondary table is only used to define a path between the primary table and another secondary table with foreign keys.

  8. Choose  with the quick info text Save.

    A dialog box appears in which you must assign the lock object to a package. To change this package at a later time, choose Goto → Object Dirrectory Entry.

  9. On the Lock parameter tab page, you can (optionally) exclude lock parameters (see lock objects ) from the function module generation. This makes sense if you always want to lock a parameter generically, for example.

    To do this, deselect the indicator for the parameter in column W. The system does not take the parameter into consideration in the generated function modules. Then the system always locks this parameter generically.

    The name of a lock parameter is in most cases the name of the corresponding table field.


    If two fields with the same name are used as lock parameters in the lock object from different tables, you must choose a new name for one of the fields in the Lock parameter field.

  10. On the Attributes tab page, you can define whether the function modules generated from the lock object must be RFC-enabled.

    If you set the Allow RFC indicator, the generated function modules can be called from within another system with Remote Function Call.

    If you allow Remote Function Calls(RFC) for an existing lock object, you must ensure that the generated function modules are called from within an ABAP program with parameters appropriate for the type. You must check all programs that use the associated function modules before activating the lock object with the new option.

  11. Choose  with the quick info text Activate.

When you activate the lock object, the two function modules ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname> are generated from its definition to set and release locks.

You can find information about the activation flow in the activation log, which you can display with Utilities → Activation Log. If errors occur during activation, the system displays the activation log automatically.