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

Deactivate executable ABAP Programs

Former Member
0 Likes
2,130

Hello to everybody,

Can anyone please tell me the best way to deactivate an executable program?

The target is not to delete the program but to make sure that nobody (including SUPERUSER) is able to execute the program in the productive SAP-System. We plan to save sources of unused programs by deactivating.

Thanks

Jörg

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,468

So if I get you correctly, you want to stop anyone from executing the programm in production, or in any system?

I don´t know of a standard way to do so, but if the programs should only be deactivated in production and if they are customer-programms, try

if sy-sysid = production.

leave program.

endif.

10 REPLIES 10
Read only

Former Member
0 Likes
1,468

implement authorization Checks

Read only

0 Likes
1,468

Hello Madhu,

thanks for your help.

Our department decided not to solve the problem by authorization checks because some background users have nearly all authorities. So we have to look for an other solution.

regards

Jörg

Read only

suresh_datti
Active Contributor
0 Likes
1,468

Hi,

There is no way to deactivate the execution of a program.. you can create an Authorization group & tie the report to it in the Program Attributes.. this way you can restrict it from being used..

Regards,

Suresh datti

Read only

0 Likes
1,468

Hello Suresh datti,

thanks. An authorisation group will restrict the usage of the programs. This is an elegant solution to restrict the usage without any additional programming. But we like to unable the executability of the program. Do you habe any other idea?

Regards

Jörg

Read only

Former Member
0 Likes
1,469

So if I get you correctly, you want to stop anyone from executing the programm in production, or in any system?

I don´t know of a standard way to do so, but if the programs should only be deactivated in production and if they are customer-programms, try

if sy-sysid = production.

leave program.

endif.

Read only

0 Likes
1,468

Hi,

Pl take a look at the program RSCSAUTH. It has got very good documentation and can be used to restrict execution without having to change the Program attributes too..

Regards,

suresh Datti

Read only

0 Likes
1,468

So if I get you correctly, you want to stop anyone

from executing the programm in production, or in any

system?

I don´t know of a standard way to do so, but if the

programs should only be deactivated in production and

if they are customer-programms, try

if sy-sysid = production.

leave program.

endif.

Hi Ute Schroeder,

you are right. The focus is on customer created programs and i want to stop the execution of some programs in any system.

There is a way to do this by programming but I would favor a solution without additional programming.

A programming solution could be to include an Errormessage just at the beginning of the program.

Thanks for your helping hand.

Jörg

Read only

0 Likes
1,468

You can do this at the initialization event:


REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 255
  MESSAGE-ID 00.

INITIALIZATION.
  MESSAGE e001 WITH 'This program may not be executed'.

Rob

Read only

0 Likes
1,468

Hi Rob,

this is the way I will do. I discussed above. Thanks for your solution.

Regards

Read only

0 Likes
1,468

You're welcome - glad to help. Please close the thread.

Rob