A Hard Coded Literal (HCL) is where developers have embedded a specific value, such as Customizing Data, directly into the source code of a program or other executable object. As a part of a consolidation if the Customizing Data changes then the hard coded literals need to be checked and updated as appropriate. For this reason Customizing Data must be completed before hard coded literals can complete the Execution phase.
For example the ABAP code below demonstrates where a hard coded literal has been declared for a company code and embedded into the IF statement as ‘1000’. The IF statement below means the code reacts differently for company code 1000, if in the Customizing Data stage company code 1000 has now been translated to company code 9000 then the ABAP code must be updated to reflect this.
IF p_bukrs = '1000'. PERFORM special_processing. ELSE. PERFORM regular_processing. ENDIF.
Executable Objects which are assessed for Hard Coded Literal are:
- Enhancement Spot
- SAP Script
- Function Group
- Function Module
- Workflow Template
- SAP Smartforms
- Type Group