2008 Nov 18 2:51 AM
Hi All,
Need advice. Is it possible to lock a particular ABAP "Z" program (no transaction code was tied to it) from running in PRD via SA38, SE38, SE80.
Background is that we have a few users who have access to SA38 and a few developers with SE38 in PRD and I have a few customized utility program which I want to stop these users from accidently running directly.
I was wondering if there are some aettings or authorization objects that I can set to prevent them from running the few programs but still allowed to run other programs.
Any help is greatly appreciated.
Thanks & Best Regards,
Wilson.
2014 Apr 09 8:22 AM
Hi Wilson.
Assign a transaction code (for example Z_MY_TCODE) to this report in SE93 and add the following lines after INITIALIZATION.
IF sy-tcode NE 'Z_MY_TCODE'.
MESSAGE A000(38) WITH 'Program must be started via transaction Z_MY_TCODE'.
ENDIF.
Authority for TCODE Z_MY_TCODE should be given only to users, who should be allowed to start the program.
Regards,
Klaus
2008 Nov 18 2:55 AM
you need to use the authorization object under program attributes data, and then the security can use that value to set permissions
2008 Nov 18 3:21 AM
Hi,
Thanks you for your fast response. May I know which is the exact authorization object to set ? Does it still work if the program does not have "Authority-check" in place ? Somehow some of our utility programs were create "free for all"...
Any help is greatly appreciated.
Thanks & Best Regards,
Wilson.
2014 Apr 08 2:10 PM
2014 Apr 08 2:32 PM
Hi Wilson,
We need to create the authorization object and define the roles for the users. Then use the in reports to allow or not by 'AUTHORITY-CHECK OBJECT' after every programs.
Regards,
Gurunath Kumar D
2014 Apr 09 8:05 AM
Hi
Yes, but I forgot write - another user is admin and have a access to all (and he sometime remove program, query, right or... for user). Then authority-check will not working for him. When I programing in LabView, this environment had a ability used "password", who permit access to source code.
In ABAP i hoped, using DEV-key or...?
Regards
2014 Apr 09 8:22 AM
Hi Wilson.
Assign a transaction code (for example Z_MY_TCODE) to this report in SE93 and add the following lines after INITIALIZATION.
IF sy-tcode NE 'Z_MY_TCODE'.
MESSAGE A000(38) WITH 'Program must be started via transaction Z_MY_TCODE'.
ENDIF.
Authority for TCODE Z_MY_TCODE should be given only to users, who should be allowed to start the program.
Regards,
Klaus
2014 Apr 09 10:21 AM
Hi Wilson,
1st way Goto --> Program Attributes --> Tick the checkbox for Editor Lock
2nd way Use BAPI_USER_LOCK
Provide user id and it will lock the user.
Best Regards,
Praveen Srivastava
2014 Apr 09 10:36 AM
2014 Apr 09 10:46 AM
2014 Apr 09 1:05 PM
Hi, in your report, check value of T000-CCCATEGORY for your client. see search help for the field for possible entries
in the beginning of your report:
SELECT CCCATEGORY FROM T000 INTO LV_CCCATEGORY WHERE MANDT = SY-MANDT.....
if LV_CCCATEGORY EQ 'P'.
die_my_report_die.
endif.
2014 Apr 29 9:06 PM
Hi
I again thinking about lock. I will test on a SY-UNAME (where name I hide to ascii value).
When condition will be TRUE can stop program but especially.
I need a part of code who is a syntactic correct, but when jump to condtion give a runtime error. I don't want use error message (because everyone know program will be stoped). When I use code with runtime error (it was how I bad create program)
Regards