Skip to content

Avoid Obsolete Declarations and Table Headers ​

WarningAnti-Patterns & Bad PracticesQuickFix Ready#EC NO_OBS_DECLRemote Enabled

Overview ​

Obsolete Data and Type Declarations.

ATC Finding Message: Avoid obsolete declaration constructs (TABLES, RANGES, TYPE-POOLS, etc.)

Rationale ​

Legacy declaration statements like TABLES, RANGES, TYPE-POOLS, and internal tables defined WITH HEADER LINE, OCCURS, or INITIAL SIZE carry significant technical debt and implicit global state. In modern Clean ABAP and ABAP Cloud, use explicit TYPES, DATA statements with modern table types, standard RANGE OF types, and CLEAR instead of REFRESH.

Non-Compliant ​

abap
TABLES mara.
RANGES lr_matnr FOR mara-matnr.
DATA lt_items TYPE STANDARD TABLE OF i WITH HEADER LINE.

Compliant ​

abap
DATA lt_items TYPE STANDARD TABLE OF i WITH EMPTY KEY.
DATA lr_matnr TYPE RANGE OF matnr.

Automated QuickFix ​

This rule provides an automated QuickFix directly in Eclipse ABAP Development Tools (ADT):

  1. Position the cursor on the flagged statement.
  2. Press Ctrl + 1 (Quick Assist).
  3. Select the automated refactoring to apply the clean syntax immediately.

Configuration & Thresholds ​

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

Parameter NameData TypeDefault ValueDescription & Guidance
CHECK_TABLESBooleantrueDetect obsolete TABLES declaration statement
CHECK_TYPE_POOLSBooleantrueDetect obsolete TYPE-POOLS declaration statement
CHECK_RANGESBooleantrueDetect obsolete RANGES declaration statement
CHECK_HEADER_LINEBooleantrueDetect internal tables with obsolete header lines (WITH HEADER LINE)
CHECK_OCCURSBooleantrueDetect obsolete INITIAL SIZE / OCCURS syntax
CHECK_INITIAL_SIZEBooleantrueDetect obsolete INITIAL SIZE additions
CHECK_COMMON_PARTBooleantrueDetect obsolete DATA COMMON PART statements
CHECK_STATICSBooleantrueDetect STATICS declarations inside instance methods
CHECK_FS_STRUCTUREBooleantrueDetect FIELD-SYMBOLS with obsolete structure typing
CHECK_LOADBooleantrueDetect obsolete LOAD-OF-PROGRAM statements
CHECK_PARAMETERBooleantrueDetect obsolete PARAMETER additions in selection screens
CHECK_REFRESHBooleantrueDetect obsolete REFRESH statement (prefer CLEAR)

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.