03-28-2007 12:52 PM
Hi,
before lauching the BAPI to confirm a production order in Z program, l want to check first if a lock exist on that same production order. How can l find the FM that does the job?
Thank's for your help.
Bob
03-28-2007 12:59 PM
Hi Bob,
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.
Regards
Sudheer
03-28-2007 12:57 PM
Use the fm: ENQUEUE_READ to read if any lock exist on the AUFK table
03-28-2007 12:59 PM
Hi Bob,
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.
Regards
Sudheer