‎2006 Jun 13 4:56 PM
Hi All,
How can we check if a particular record is locked or not? I have to display a set of orders and if the user clicks on a particular record another action needs to be performed based on if order is locked or not.
Thnks.
‎2006 Jun 13 6:51 PM
Use FM ENQUEUE_READ to check the order is locked or not.
Regards
Sridhar
‎2006 Jun 13 5:00 PM
You can see the list of lock entries from SM12.
you need to find the lock object FM to know whether there are any locks applied.
FM's ENQUEUE_Table name
Regds
Manohar
‎2006 Jun 13 5:01 PM
hi
The Function Module ENQUEUE_tablename will help you for this.
Check a list of locked records in transaction SM12.
Regards,
Richa
‎2006 Jun 13 5:01 PM
What order is it..
is it sales order
CALL FUNCTION 'ENQUEUE_EVVBAKE'
EXPORTING
MODE_VBAK = 'E'
MANDT = SY-MANDT
VBELN = VBAK-VBELN
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Regards
vijay
‎2006 Jun 13 6:12 PM
‎2006 Jun 13 6:43 PM
‎2006 Jun 13 6:53 PM
Simply do a call transaction for <u>change mode</u> that goes past the initial screen in <u>'N'</u>o display mode. If the transaction's error messages is due to missing BDC info, you are ok, but if it says that the object is locked, then it is locked.
‎2006 Jun 13 6:51 PM
Use FM ENQUEUE_READ to check the order is locked or not.
Regards
Sridhar
‎2006 Jun 17 10:10 PM
Could you please help me with the parameters that have to be passed into the Enqueue_read function. I need to check if the order is locked or not.
Thnks
‎2006 Jun 18 12:11 AM
I would prefer to do a read on the table rather than using the FM Enqueue_read. The reason for not using enqueue_read is you need to know the argument name and its kind of difficult to read the arguments from the table returned by FM.
If you can post the table name, someone will help you in passing the parameters for locking the order.
hith
Sunil Achyut
‎2007 Jan 24 2:54 PM
You don't need to know anything with FM "ENQUEUE_READ" since all the parameters it needs are optional.
Just execute it and read the table that returns (from paramter ENQ) in its GNAME field you'll find the tables that are locked.
enjoy.
ayal.