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.
  PERFORM regular_processing.

Executable Objects which are assessed for Hard Coded Literal are:

  • Classes
  • Enhancement Spot
  • SAP Script
  • Function Group
  • Function Module
  • Interface
  • Workflow Template
  • Program
  • SAP Smartforms
  • Type Group


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment