code pal for ABAP > Documentation > Chain Declaration Usage
This check verifies the usage of chain up-front declarations.
Change the chain up-front declarations to inline declarations.
In exceptional cases, you can suppress this finding by using the pseudo comment "#EC CHAIN_DECL_USAG
which should be placed after the declaration statement:
DATA: "#EC CHAIN_DECL_USAG
string TYPE string,
json TYPE REF TO cl_abap_json,
client LIKE sy-mandt.
TYPES: "#EC CHAIN_DECL_USAG
name TYPE string,
json TYPE REF TO cl_abap_json.
CONSTANTS: "#EC CHAIN_DECL_USAG
min_age TYPE i VALUE 18,
min_name_size TYPE i VALUE 3.
Before the check:
DATA:
string TYPE string,
json TYPE REF TO cl_abap_json,
client LIKE sy-mandt.
After the check:
DATA string TYPE string.
DATA json TYPE REF TO cl_abap_json.
DATA client LIKE sy-mandt.
Or even (which looks neat - but it won't be enforced):
DATA var1 TYPE a.
DATA var2 TYPE string.
DATA my_var3 TYPE int.
DATA a TYPE c.