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: 

Limit program runs

rodrigo_paisante3
Active Contributor
0 Kudos

Hi all,

I need to limit the number of executions of a program, up to 4 runs simultaneously. More than 10 users have access for the program.

Is it possible? Can I do it using ABAP?

Thanks!

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

You can achieve this by checking the Processes which are running on the server.

Call FM TH_WPINFO to get the information of the processes which are running.

From the output table, count the running processes which runs that specific report.

And if it is greater than 4 than give error to the User.

Regards,

Naimesh Patel

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

You can achieve this by checking the Processes which are running on the server.

Call FM TH_WPINFO to get the information of the processes which are running.

From the output table, count the running processes which runs that specific report.

And if it is greater than 4 than give error to the User.

Regards,

Naimesh Patel

Former Member
0 Kudos

Are we talking about custom or standard programs?

If custom, then one possible way(although not efficient) is to add a logic at the start and end of the program to update a counter store maybe in a Ztable or memory. And check for this counter at the start.

rodrigo_paisante3
Active Contributor
0 Kudos

Hi friends,

thanks for your answers.

The solution with SAP memory is not bad, but this FM is exactly what I need, it is like SM50 tcode.

Regards