‎2009 Feb 03 5:24 AM
Hello,
I am trying to put code level authorisation using AUTHORITY-CHECK.
I want if user does not have access to program it will not be allowed to excute.
I know the how to give authorisation on certain field values by defining in su21 etc.
Can any one let me know how i can ristrict access to Program itself.
Thanks a lot.
Regards,
Vikrant
‎2009 Feb 03 5:26 AM
https://forums.sdn.sap.com/click.jspa?searchID=21746629&messageID=6833385
just check whether this could help you.
‎2009 Feb 03 5:29 AM
Thanks Harini..... nope this will not help.
this is about locking of program if it is already running but in my case i need to give authorisation for program
‎2009 Feb 03 5:31 AM
>
> Thanks Harini..... nope this will not help.
>
> this is about locking of program if it is already running but in my case i need to give authorisation for program
Hello,
You might be having the transaction code for your program.
Use the authority-object S_TCODE in your code & assign it in SU21.
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD 'ZTCODE'. "Give the T-Code for your program
IF SY-SUBRC NE 0.
* Give Error message
ENDIF.I hope i am clear.
BR,
Suhas
Edited by: Suhas Saha on Feb 3, 2009 11:04 AM
‎2009 Feb 03 5:44 AM
Suhas i think it can help to some extent just one doubt.
If user will use Tcode i think this will check for authorisation, but in case user has access to program and it runs directly without using TCODE will it work.
‎2009 Feb 03 6:01 AM
Hello Vikrant,
In Production you DONOT have access to SE38 )
I hope this is the case with your client as well.
BR,
Suhas
‎2009 Feb 03 5:31 AM
Hi Vikrant,
Kindly go through this link below:
http://ezinearticles.com/?Sap-Abap-Syntax-For-Authority-Check&id=1086781
Hope it helps you
Regrds
Mansi
‎2009 Feb 17 6:35 AM
‎2009 Feb 17 7:39 AM
I recommend reading through the documentation on report RSCSAUTH (choose the Documentation radio button in SE38 or do a simple search for it). This will also be helpfull for protecting variants for the selection screen.
Another option is to call function module AUTHORITY_CHECK_TCODE from your program, and then define a list of coupled transactions in SE97.
Cheers,
Julius