Require Fully Typed Variables and Parameters
WarningClean ABAP & Modern Syntax#EC FULL_TYPEDRemote Enabled
Overview
Enforce fully typed constant declarations.
ATC Finding Message:
Constant declaration should explicitly specify TYPE
Rationale
Untyped constants and data objects receive an implicit type whose length and value range are easy to misjudge. A later change to the literal can silently truncate data or alter comparisons. Declare explicit TYPE and LENGTH so the contract is visible to readers and checked by the compiler.
Non-Compliant
abap
CONSTANTS c_status VALUE 'A'.Compliant
abap
CONSTANTS c_status TYPE c LENGTH 1 VALUE 'A'.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC FULL_TYPED
" SAP CI_ prefix format:
... "#EC CI_FULL_TYPEDTechnical Details
- Native ATC Class:
ZCL_SKYLINT_PREF_FULL_TYPED - Implementation File: zcl_skylint_pref_full_typed.clas.abap