Rule Definition
In order to ease change and to avoid specific information potential misuse, it is highly recommended not to use literals (hard-coded values). Theu can be managed through constants.
Remediation
Try to use constant as much as possible in order to avoid using literals in the ABAP code.
Violation Code Sample
wa_val = 'CD-15000'.
...
IF wa_val = 'CD-15000'.
ADD 1 TO l_count1.
ENDIF.
Fixed Code Sample
Remediation example:
CONSTANTS: rad TYPE i VALUE 'CD-15000'.
...
wa_val = rad.
...
IF wa_val = rad.
ADD 1 TO l_count1.
ENDIF.
Related Technologies
Technical Criterion
Architecture - OS and Platform Independence
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.