Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

can i get the user name who has locked the table in runtime?

Former Member
0 Kudos

hi folks..

my requirement is like this .. am upadting one data base table so am locking the table. if some locked the table it is giving msg like some had blocked.

my requirement is who has blocked the table and i want user name who has blocked the same table

thanks

1 REPLY 1

Former Member
0 Kudos

Hi Narendra,

After using the function module 'ENQUEUE_***********'

check sy-subrc

if sy-subrc <> 0.

get the user id who locked the record from system variable sy-msgv1

endif.

So the system variable sy-msgv1 contains the user id of the person who locked the record. After getting the user id, use the function module 'SUSR_USER_ADDRESS_READ' to get the first name and last name of the user who has locked the record.