SAP AUTHORITY SCRTY
Get Example source ABAP code based on a different SAP table
Insufficient Authorization Checks
Adequate authorization checks are an important part of secure ABAP programming. In many statements, an appropriate authorization check is performed implicitly, for example:
There are, however, many critical statements where no implicit authorization checks are performed, for example:
Any places in a program that a user can reach without sufficient authorizations and where no implicit authorization check takes place must be secured explicitly using the statement
A prerequisite for both implicit and explicit authorization checks is that all components required for the SAP authorization concept, such as
Example ABAP Coding
Checks explicitly whether the current user can create temporary programs. This check could be used to secure the
ID 'DEVCLASS' FIELD '$TMP'
ID 'OBJTYPE' FIELD 'PROG'
ID 'OBJNAME' DUMMY
ID 'P_GROUP' DUMMY
ID 'ACTVT' FIELD '02'.
IF sy-subrc <> 0.
LEAVE PROGRAM.
ENDIF.>
ABAP_EXAMPLE_END