‎2007 May 02 2:49 PM
Hi,
I've a Z table and created table maint. generator.I've also created locks.I've to display a error message when 2 users access the same tcode.I'd like to display the user name who has locked it For ex : "Table locked by <Username>.
Any help is appreciated.
‎2007 May 16 6:46 PM
If you use function module ENQUEUE_E_TABLE to see if the table has been locked, then if it is locked sy-msgv1 should have the user ID of the person who has locked the table.
- April King
‎2007 May 02 2:57 PM
Hi,
If you call the function module ENQUEUE_ function module then it will give the messge saying that table is locked by USer
Regards
Sudheer
‎2007 May 02 3:00 PM
when u use ENQUEUE function module, it automatically gives the error message as
<b>locked by user (so & so)</b>
‎2007 May 02 3:29 PM
‎2007 May 02 3:46 PM
You have to write an event for this
Goto Se11
Give the Viewname --> change
in menu Utilities--->Table maintenance generator
Environment->Modifications-->Events
Select Option ST and give the Form routine name , program name
And in the next column click editor button and write the code
‎2007 May 09 12:15 PM
Use the syste variable UNAME which always contains the currently logged User name.
So, Pass the system variable ( sy-uname ) in the message.
mesage exxx(zclass) with sy-uname.
e - for error message.
zclass - Is the message class.
xxx - number of themessage.
I think this will resolve ur problem,
<b><u>dont forget to Award if useful</u></b>
Sudheer
‎2007 May 14 1:15 PM
U need to award points for all the useful replies, and also u nees to mark it as Answered if ur problem is solved.
Regards
Sudheer
‎2007 May 16 6:25 PM
I did not award points because the answers did not solve my problem.I appreciate the replies.But i searched the forum and found my solution elsewhere and the points were already awarded to that answer.
‎2007 May 16 6:26 PM
Also one more thing passing a sy-uname is not teh correct solution.it does not give the name of the person who has locked the object but takes the sign on name.
Thanks..
‎2007 May 16 6:29 PM
Create Message in SE91 use message like
000 Table locked by &
then message statement like
message e000(z01) with sy-uname.
Reward Points if it is useful
Thanks
Seshu
‎2007 May 16 6:46 PM
If you use function module ENQUEUE_E_TABLE to see if the table has been locked, then if it is locked sy-msgv1 should have the user ID of the person who has locked the table.
- April King