‎2010 Nov 19 3:41 AM
Dear ABAP gurus.
I have 2 ABAP programs A and B.
I don't want users to execute program A if some other
users use program B.
Then I want to show the error message just like
" Can not execute while other user uses program B" to users who try
to use program A.
So, what kind of statements should I use?
BR
Y.Kaneko
‎2010 Nov 19 5:18 AM
Hi Yoshitada,
I think the way I would do it is, I'd create a dcitionary table in se11
with fields for program name, a lock flag and username.
Then, depending on the type of programs A and B are. Check/Update
the lock status of the table in one of the earlier events of the program.
Then unlock at some later point in the program.
Its crude and there might be a better way, but its all that comes to mind right now.
Regards,
Miguel
‎2010 Nov 19 5:27 AM
Hi Kaneko
You can do that with the help of LOCKING OBJECTS concept. Refer to the following SAP documentation, you will get some idea.
<<link removed by moderator>>
You can also refer to the following thread which has the solution.
<<link removed by moderator>>
Vinodh
Moderator Message: You have already lost your user-id twice for violating the rules of the forum. And you are heading the same direction a third time.
Edited by: kishan P on Nov 19, 2010 5:45 PM
‎2010 Nov 19 5:30 AM
Hi,
Check Function Module TH_WPINFO for the report B if it is being executed. This function module holds the workprocesses that you see in SM50
You can get the username that is running the report and display the error message in report B saying that XX user is already running program B.
‎2010 Dec 13 9:15 AM
‎2010 Dec 13 9:17 AM