2009 Feb 24 8:51 AM
hi, can any one provide me with the procedure to create and use the Authority check .....
2009 Feb 24 9:01 AM
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 .....
2009 Feb 24 8:52 AM
2009 Feb 24 9:01 AM
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.
2009 Feb 24 9:13 AM
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.
2009 Feb 24 9:17 AM
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
2009 Feb 24 9:23 AM
2009 Feb 24 9:24 AM
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