Enable lock handling for the App Designer in the Cockpit

The App Designer in the Cockpit uses stateless locking. Therefore, it is necessary to define an event-triggered background job.

Prerequisites

Procedure

Create the event

  1. Open the SAP transaction SM62BckProcEvnts (Background Events) tab → Create icon.

  2. In Event Definition dialog, enter the event: NEPTUNE_LOCK, enter the description: Neptune Lock Handler, and select Save.

    background event definition

Create the background job

  1. Open the SAP transaction SE38.

  2. Enter the program /NEPTUNE/HANDLER_LOCKING and select Execute (F8).

    abap editor initial screen

    Result: The Neptune Lock Handler Server screen opens.

    neptune lock handler server
  3. In Wait Time in Seconds, enter the time in seconds between lock request checks.

    The recommended and default value is 2.
  4. In Time in Min. to release lock, enter the time in minutes to automatically release locks. Alternatively, you can leave the field blank to disable automatic release of locks.

  5. In Lock User, enter the name of the background user.

    The field is mandatory. The username must be the same as the user running the background job.
  6. Select the Save icon.

    Result: The Variant Attributes screen opens.

  7. In Variant Name, create a variant with the name DEFAULT.

  8. Save the variant.

    variant entry

  9. Open the SAP transaction SM36.

    Result: The Define Job screen opens.

  10. In Job Name, enter NEPTUNE_LOCK_HANDLER and press Enter.

    job name entry

    Result: The job is created with only one step and has the following settings:

    • User: Username that locks/unlocks resources on each request. This username owns the locks on the behalf of the requester.

    • ABAP program name: /NEPTUNE/HANDLER_LOCKING

  11. In Variant, enter DEFAULT.

    define background job summary
  12. Select the Save icon.

  13. Select Back (F3) to go back to the Define Job screen and set the start condition for the job by selecting Start condition.

    start condition
  14. In the Start Time dialog, select After Event.

  15. Enter event NEPTUNE_LOCK.

  16. Ensure that the checkbox Periodic job is selected and select the Save icon.

    define background job after event
    define background job summary 2
  17. Ensure that the background job is released in the SAP transaction SM37.

Ensure that the selected user has sufficient permissions for locking/unlocking if you intend to use the stateless lock handler for your business process.

Results

  • You have enabled lock handling for the App Designer by configuring a corresponding background event and background job.