USER
sy-uname . Not only is the user specified redundantly, the system
field is also at risk of being overwritten, for example in ABAP
Debugger.
See also User-Specific Program Flow .
Example ABAP Coding Checks whether the current user has the authorization to
display the airline he or she entered on the
selection screen . The authorization
object used here is S_CARRID and includes the authorization
fields CARRID for identifying an airline and ACTVT for the
activity. The code "03" represents the activity "Display", which is one
of the activities assigned to the authorization object S_CARRID .
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.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved