Creating Lock Objects

To access lock object maintenance, enter an object name in the initial screen of the ABAP Dictionary, select object class Lock objects and choose Create. Note that lock object names must start with E (Enqueue).

  1. Enter an explanatory short text in the field Short text.
  2. Enter the name of the primary table of the lock object in the field Primary table.
  3. Save your entries.
  4. A dialog box appears in which you must assign the lock object to a development class.

  5. Choose Goto ® Tables if you want to lock records in several tables with the lock object.
  6. The screen for the table selection of the lock object appears. All the tables already included in the lock object are shown in the upper half of the screen.

  7. Position the cursor on a table name and choose Edit ® Choose sec. tab.
  8. A list is displayed of all tables linked to the selected table by means of foreign keys.

  9. Position the cursor on a table which you wish to define as a secondary table and select Choose. The table name is highlighted. Repeat this procedure for all tables that you wish to include in the lock object. Then choose Copy.
  10. The selected tables are inserted into the list as secondary tables and the corresponding foreign keys are displayed.

  11. Save your entries and choose Goto ® Fields.
  12. The lock arguments are displayed in the next screen. If two fields with the same name are incorporated into the lock object from different tables, you must choose a new name for one of the fields and enter this name in the field Lock arg.

  13. Choose Goto ® Lock mode.
  14. The next screen displays the Basis tables of the lock object. The default entry for Lock Mode is E for every Basis table. You can choose the lock mode separately for each Basis table. Simply overwrite the entry in the column Mode and save your entries.

  15. Choose Goto ® Attributes.
  16. If required, you can set the flag Allow RFC. If this flag is set, Remote Function Calls are allowed for the function modules automatically generated when the lock object is activated.
  17. The parameters of the function modules are then assigned the following reference fields (since function modules for RFC must be completely defined):

    Parameter

    Reference fields

    X_<field name>

    DDENQ_LIKE-XPARFLAG

    _WAIT

    DDENQ_LIKE-WAITFLAG

    _SCOPE

    DDENQ_LIKE-SCOPE

    _SYNCHRON

    DDENQ_LIKE-SYNCHRON

  18. To activate the lock object, choose Lock object ® Activate.

Refer to the activation log for information about the success of the activation process. You can display the activation log with Utilities ® Activation log. If errors occur when the lock object is activated, you will go directly to the activation log.