12-01-2006 6:13 AM
hi everyone !
i create lock object to my own table.
i would like to get from function module enqueue_ezeliram the user who locked
the table can i get it from fm enqueue ? ?
12-01-2006 6:33 AM
Hi eliram,
1. Yes we can do this
2. Sy-SUBRC and SY-MSGV1 are the IMPORTANT fields.
3. follow this logic, after calling the lock fm.
4.
DATA : UNAME LIKE SY-UNAME.
DATA : SUBRC TYPE SY-SUBRC.
SUBRC = SY-SUBRC.
UNAME = SY-MSGV1.
--- Error while locking
if subrc = 2 or subrc = 3.
message e013 with applnum.
endif.
<b>if subrc = 1 .</b>
*-- <b>user himself has locked</b>
if uname = sy-uname.
message e012 with applnum.
endif.
-- <b>other user has locked.</b>
if uname <> sy-uname.
message e011 with applnum uname.
endif.
endif
regards,
amit m.