Avoid Hungarian Notation and Type Prefixes
WarningClean ABAP & Modern Syntax#EC NO_HUNGARIANRemote Enabled
Overview
Avoid Hungarian notation and encoding prefixes.
ATC Finding Message:
Avoid Hungarian notation and encoding prefixes in names
Rationale
Hungarian notation prefixes (such as lv_, ls_, lt_, mv_, iv_, rv_) add visual clutter, encode technical types that frequently change, and conflict with modern Clean ABAP principles. Name variables and parameters after their domain meaning instead.
Non-Compliant
abap
DATA lv_count TYPE i.
DATA mv_value TYPE string.
METHODS process IMPORTING iv_input TYPE string.Compliant
abap
DATA count TYPE i.
DATA value TYPE string.
METHODS process IMPORTING input TYPE string.Configuration & Thresholds
This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:
| Parameter Name | Data Type | Default Value | Description & Guidance |
|---|---|---|---|
CHECK_ATTR | Boolean | true | Report legacy Hungarian notation type prefixes on class attributes |
CHECK_LOCAL | Boolean | true | Report legacy Hungarian notation type prefixes on local variables |
CHECK_PARAM | Boolean | true | Report legacy Hungarian notation type prefixes on method parameters |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC NO_HUNGARIAN
" SAP CI_ prefix format:
... "#EC CI_NO_HUNGARIANRelated Rules
- Enforce Class, Interface, Type and Object Naming Conventions —
#EC PREF_NAME_OBJECTS - Enforce Local Variable and Field-Symbol Naming Conventions —
#EC PREF_NAMING_VARS - Enforce Class Attribute and Method Parameter Naming Conventions —
#EC PREF_NAME_MEMBERS
Technical Details
- Native ATC Class:
ZCL_SKYLINT_NO_HUNGARIAN - Implementation File: zcl_skylint_no_hungarian.clas.abap