Symptom
ABAP locks are still set after a short dump or an exception.
Solution
In ABAP, an uncaught exception also causes a short dump to be written in the ABAP Dump Analysis ( ST22) transaction. Normally, all locks are released after a short dump. However, occasionally this does not happen and a lock stays dangling. Such a dangling lock usually causes an error message to be displayed stating that the data is locked in another session or already opened in another session, although the user does not have any other opened sessions.
The same behavior is experienced when a running application (either a transaction or a Web Dynpro ABAP application) in NWBC causes a short dump or an uncaught exception. In this case, dangling locks that are not cleared can also remain. Note that NWBC is a newer UI technology on the same ABAP runtime, and therefore, behavior patterns are exactly the same as when running the applications in SAP GUI or in a browser.
These locks have to be removed manually by using the Display and Delete Locks ( SM12) transaction. You can start transaction SM12 either by logging on to the SAP GUI and running the transaction, or by starting the transaction directly from the NWBC shell.
More information
The SAP Lock Concept (BC-CST-EQ)
Managing Lock Entries
Deleting Lock Entries