Application Development and Automation 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: 
Read only

Execution control between two programs

Former Member
0 Likes
614

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

5 REPLIES 5
Read only

Former Member
0 Likes
584

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

Read only

Former Member
0 Likes
584

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

Read only

Former Member
0 Likes
584

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.

Read only

0 Likes
584

Solved

Read only

Former Member
0 Likes
584

SOlved