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: 

Showing the user name currently locking an object in a message

Former Member
0 Kudos

Hi experts,

I created an object lock and I want to show a message which contains the username that currently locking the object.

I proceeded this way :

IF sy-subrc = 1.

   MESSAGE E000(vaca) with 'The transaction is currently locked by the user : ' SY-UNAME.

ENDIF.

But unfortunately it returns the username of the current user on the system:

e.g : my username is USER111 and I am locking the object.

the USER222 try to access the transaction  he gets this : The transaction is currently locked by the user : USER222 !


which is his username not the locking username.

The correct message will contains : The transaction is currently locked by the user : USER111

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think all you have to do is comment out the code where you produce the message. Let the FM take care of it.

Rob

4 REPLIES 4

Former Member
0 Kudos

I think all you have to do is comment out the code where you produce the message. Let the FM take care of it.

Rob

0 Kudos

It worked thanks .

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

A sample:

Regards

0 Kudos

It worked thanks .