Skip to content

Enforce Class, Interface, Type and Object Naming Conventions ​

WarningClean ABAP & Modern Syntax#EC PREF_NAME_OBJECTSRemote Enabled

Overview ​

Class, Interface, Type and Object Naming.

ATC Finding Messages:

  • Local class name does not match configured pattern
  • Global class name does not match configured pattern
  • Local interface name does not match configured pattern
  • Global interface name does not match configured pattern
  • Type name does not match configured pattern
  • Event or event handler name does not match configured pattern
  • Test method name does not match configured pattern
  • Macro name does not match configured pattern
  • Form routine name does not match configured pattern
  • Function module name does not match configured pattern
  • Function group name does not match configured pattern
  • Program name does not match configured pattern

Rationale ​

Object-oriented entities and global artifacts must maintain standardized prefixes (such as zcl_ / lcl_ for classes, zif_ / lif_ for interfaces, ty_ for type definitions, and on_* for event handlers). This standard maintains harmony across packages, enhances IDE searchability, and reinforces Clean ABAP architecture.

Non-Compliant ​

abap
CLASS my_service DEFINITION.
INTERFACE my_contract.
TYPES item_type TYPE string.

Compliant ​

abap
CLASS lcl_my_service DEFINITION.
INTERFACE lif_my_contract.
TYPES ty_item TYPE string.

Configuration & Thresholds ​

This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:

Parameter NameData TypeDefault ValueDescription & Guidance
CLASS_LOCALString^LC(L|X)_.+$Regex pattern for local class names (default: ^LC(L|X)_.+$)
CLASS_TESTString^LTCL_.+$Regex pattern for test class names (default: ^LTCL_.+$)
CLASS_GLOBALString^ZC(L|X)_.+$Regex pattern for global class names (default: ^ZC(L|X)_.+$)
INTF_LOCALString^LIF_.+$Regex pattern for local interface names (default: ^LIF_.+$)
INTF_GLOBALString^ZIF_.+$Regex pattern for global interface names (default: ^ZIF_.+$)
TYPES_PATTERNString^TY_.+$Regex pattern for type definitions (default: ^TY_.+$)
MACRO_PATTERNString^_.+$Regex pattern for macros (default: ^_.+$)
FORM_PATTERNString^F_.+$Regex pattern for form routines (default: ^F_.+$)
FUNCTION_PATTERNString^Z.*$Regex pattern for function modules (default: ^Z.*$)
EVENT_NAMEString^[A-Z][A-Z0-9_]+$Regex pattern for event names
EVENT_HANDLERString^ON_.+$Regex pattern for event handlers (default: ^ON_.+$)
TEST_METHODString^(TEST|SHOULD)_.+$Regex pattern for test method names (default: ^(TEST|SHOULD)_.+$)
PROG_PATTERNString^Z.+$Regex pattern for program names (default: ^Z.+$)
FUGR_PATTERNString^Z.+$Regex pattern for function groups (default: ^Z.+$)

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC PREF_NAME_OBJECTS

" SAP CI_ prefix format:
... "#EC CI_PREF_NAME_OBJECTS

Technical Details ​

Released under the MIT License.