ABAP log

February 26, 2007

Checking existing SAP locks (enqueue-locks) from ABAP.

Filed under: ABAP, SAP — abaplog @ 8:45 pm

In the transaction SM12 you can see all current SAP locks, they can be selected using object or user name. If you want to get that list in your ABAP, the function ENQUEUE_READ will return you a list of object locks for specific objects (that can be specified with a pattern). The function can be useful if you want to process some object without locking it, for example, with a BAPI or BDC, and you want to check whether you may do this at the moment. If the object is currently locked by another user, you can read the lock and decide what to do: wait, or just report an error.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.