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

AUTHORITY-CHECK problem

Former Member
0 Likes
1,142

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,108
Read only

0 Likes
1,108

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

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,108

>

> 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

Read only

0 Likes
1,108

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.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,108

Hello Vikrant,

In Production you DONOT have access to SE38 )

I hope this is the case with your client as well.

BR,

Suhas

Read only

Former Member
0 Likes
1,108

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

Read only

Former Member
0 Likes
1,108

.

Read only

Former Member
0 Likes
1,108

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