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 procedure

Former Member
0 Likes
884

hi, can any one provide me with the procedure to create and use the Authority check .....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Hi,

This statement checks whether authorization is entered in the user master record of the current user or the user specified in user for the authorization object entered in the field auth_obj, and whether this authorization is sufficient for the request specified in the statement. A flat character-type field that contains the name of an authorization object is expected for auth_obj. Without the addition FOR USER, the authorization of the current user is checked.

PARAMETERS carr TYPE spfli-carrid.

AT SELECTION-SCREEN.

AUTHORITY-CHECK OBJECT 'S_CARRID'

ID 'CARRID' FIELD carr

ID 'ACTVT' FIELD '03'.

IF sy-subrc <> 0.

MESSAGE 'No authorization' TYPE 'E'.

ENDIF.

Regards,

Jyothi CH.

hi, can any one provide me with the procedure to create and use the Authority check .....

6 REPLIES 6
Read only

GauthamV
Active Contributor
0 Likes
816

SEARCH in SCN you have lot of posts on the same.

Read only

Former Member
0 Likes
817

Hi,

This statement checks whether authorization is entered in the user master record of the current user or the user specified in user for the authorization object entered in the field auth_obj, and whether this authorization is sufficient for the request specified in the statement. A flat character-type field that contains the name of an authorization object is expected for auth_obj. Without the addition FOR USER, the authorization of the current user is checked.

PARAMETERS carr TYPE spfli-carrid.

AT SELECTION-SCREEN.

AUTHORITY-CHECK OBJECT 'S_CARRID'

ID 'CARRID' FIELD carr

ID 'ACTVT' FIELD '03'.

IF sy-subrc <> 0.

MESSAGE 'No authorization' TYPE 'E'.

ENDIF.

Regards,

Jyothi CH.

Read only

Former Member
0 Likes
816

Hi sarath,

Authorisation checks will be used in programs to verify the user accessibily to the program.

In the below example, ZSECOBJ is a securitization object created & maintained by a Basis person.

the ACTVT is an identification field under the Object.

Finally the Field value 16 is Execution Access Value.

Having this authorizations profile, a user can be able to execute the program.

initialization.                                                                                
authority-check object 'ZSECOBJ'       
            id 'ACTVT' field '16'.          
  if sy-subrc ne 0.                         
    message "No Authorisation for execution".                       
  endif.

Regards,

SB.

Read only

Former Member
0 Likes
816

Hi Sharath

You can search for authority check procedure in SCN.

There are various threads for this .

Use search option first like...

https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=createandusetheAuthoritycheck&adv=false&sortby=cm_rnd_rankvalue

so from next time

SEARCH IN SCN BEFORE POSTING.

regards

sachin

Edited by: sachin sharma on Feb 24, 2009 2:49 PM

Read only

Former Member
0 Likes
816

my question is answered

Read only

Former Member
0 Likes
816

Hi,

Goto SU21, to create an authorization object in any authorization class. It will ask you to specify the authorization fields do that by selecting a data element from search help.

Please check the following link to create authority check procedure,

http://www.sts.tu-rburg.de/teaching/sap_r3/ABAP4/authorit.htm

Regards,

Joan