CRITICAL
Rule Definition
For security and testability reasons, coding must be independent of a specific user. Part of the program logic must not be activated or deactivated regarding the user who runs the program.
Remediation
As much as possible remove the test of the SY-UNAME system field with the name of a specific user.
Violation Code Sample
Example #1
AT SELECTION-SCREEN ON p_entity.
IF NOT SY-UNAME = 'JOHN'.
PERFORM check_authorization_le using p_entity.
ENDIF.
Example #2
IF SY-UNAME = 'JOHN'.
CHECK mara-zzcop eq k_pf.
LOOP AT screen.
IF screen-group1 eq k_zpf.
screen-input = k_x.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Related Technologies
Technical Criterion
Secure Coding - Input Validation
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.