Deleting Lock Entries

Certain problems can result in locks that cannot be released again, with the result that uses cannot access the locked objects.

These locks, however, can be deleted manually.

Caution Caution

In general, however, you should not directly delete locks with the delete functions offered in the lock management system. Unreleased locks are almost always the symptom of another underlying problem. When you correct the underlying problem, the locks will be released automatically.

End of the caution.

More information: Locks: Questions and Answers

Procedure

Analyzing the Problem

First try to identify and remove the problem.

The most frequent causes of unreleased locks are the following:

  • Problems in update processing.

    Locks that are held by an update are kept in place by the System until the update has been processed or has terminated abnormally. If a problem prevents updates from being processed, then the locks held by the unprocessed updates can block work in the System.

    You can identify locks that are held by updates in the list of locks display. The locks that are held by the U1 portion of an update are highlighted in the list. In the Details display, such locks also have the Backup flag field set.

    Corrective action: Check for a possible update problem. Proceed as follows:

    1. Note the lock key of the relevant lock entry. Select this entry and choose Details to display the transaction code.

    2. Choose transaction SM13 or  Administration  System Administration  Monitor  Update  (Update Management) to check whether any unprocessed update records (status init or auto) exist for the user. If you find any unprocessed update records, identify the transaction code and lock key to locate the update record that is holding the lock.

      Note that update records with the status err do not hold locks. Locks are released automatically when an update task is terminated prematurely. If you find err update records, follow the procedure described under Analyzing and Rectifying Update Errors.

    3. Check that your update server is operating normally. Call transaction SM51 or choose  Administration  System Administration  Monitor  System Monitoring  Server  , position the cursor on the application server on which an update server is running, and then choose Processes. This displays the work processes on the update server. You should see activity in the update processes if there are outstanding updates and update processing is functioning normally.

      If not, try to restart the update server.

  • Premature Termination of SAP GUI. If a user switches off the PC without first logging off from the SAP System, or if the SAPGUI program is terminated prematurely for some reason, the user may remain logged onto the SAP System. The locks held by the user when the problem occurred are not released because the user is no longer active in the SAP System.

    Corrective action: You can release these locks by logging off the user. Proceed as follows:

    1. Call transaction SM51 or choose  Administration  System Administration  Monitor  System Monitoring  Server  .

    2. Display the users in the SAP instance named in the lock Details display. To do this, use the User Overview (transaction SM04). In the user display, check the time of the user's last activity in the system.

      If the user has been inactive for a long time, he or she may have left their workstation without completing a task or the SAP GUI may have ended abnormally.

      Check with the user directly, if possible. The user's work is lost when he or she is logged off.

    If the user's SAP GUI has ended abnormally, you can log off the user in the User Overview. The user cannot reclaim the lost locks even if he or she logs on again. In this case, he or she must repeat the work carried out on the locked objects.

Deleting Locks

Caution Caution

Only delete lock entries if you are sure that they are invalid and can be deleted without impairing an active process (user session, update, and so on). Deleting a lock held by an active user can lead to loss of the data entered by the user or to data inconsistencies.

End of the caution.

If you want to delete an individual lock entry, position your cursor on the entry and choose  Lock Entry  Delete  .

By choosing  Lock entry  Delete All  , you can delete all the lock entries at once.

A warning is display first indicating the risks associated with deleting lock entries. After this, a dialog box is displayed in which you can delete the lock entry.

Note Note

You can deactivate the warning for the current transaction by choosing  Edit  Suppress warning  .

End of the note.

Result

The locks are released and can be requested again.

No comments:

topics