Avoid Obsolete & Forbidden Statements
Overview
Avoid obsolete statements (MOVE, REFRESH, FORM, etc.).
ATC Finding Message:
Avoid obsolete or deprecated statement; use modern Clean ABAP construct
Rationale
Statements such as MOVE, REFRESH, TABLES, STATICS, FORM, and LEAVE are legacy constructs that are discouraged by Clean ABAP and several are forbidden in ABAP Cloud. They bypass modern type checking and object-oriented structure, and they make the code harder to migrate. Replace them with direct assignments, modern table operations, and class methods.
Non-Compliant
MOVE lv_source TO lv_target.Compliant
lv_target = lv_source.Automated QuickFix
This rule provides an automated QuickFix directly in Eclipse ABAP Development Tools (ADT):
- Position the cursor on the flagged statement.
- Press Ctrl + 1 (Quick Assist).
- 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 Name | Data Type | Default Value |
|---|---|---|
CHECK_MOVE | Boolean | true |
CHECK_REFRESH | Boolean | true |
CHECK_COMPUTE | Boolean | true |
CHECK_TABLES | Boolean | true |
CHECK_FIELD_GROUPS | Boolean | true |
CHECK_TEST_SEAMS | Boolean | true |
CHECK_BREAK | Boolean | true |
CHECK_STATICS | Boolean | true |
CHECK_DEFINE | Boolean | true |
CHECK_EXPORT_MEMORY | Boolean | true |
CHECK_FORM | Boolean | true |
CHECK_LOOP_CTL | Boolean | true |
CHECK_ADD | Boolean | true |
CHECK_ADD_CORR | Boolean | true |
CHECK_TYPE_POOLS | Boolean | true |
CHECK_RANGES | Boolean | true |
CHECK_HEADER_LINE | Boolean | true |
CHECK_LOAD | Boolean | true |
CHECK_PACK | Boolean | true |
CHECK_UNPACK | Boolean | true |
CHECK_EXTRACT | Boolean | true |
CHECK_COMMON_PART | Boolean | true |
CHECK_FREE_MEMORY | Boolean | true |
CHECK_PROVIDE | Boolean | true |
CHECK_CONTEXTS | Boolean | true |
CHECK_INITIAL_SIZE | Boolean | true |
CHECK_CATCH_SYSTEM | Boolean | true |
CHECK_GET_REFERENCE | Boolean | true |
CHECK_INFOTYPES | Boolean | true |
CHECK_COMMUNICATION | Boolean | true |
CHECK_SET_EXT_CHECK | Boolean | true |
CHECK_OCCURS | Boolean | true |
CHECK_FS_STRUCTURE | Boolean | true |
CHECK_PARAMETER | Boolean | true |
CHECK_SELECT_NO_INTO | Boolean | true |
CHECK_EXIT_SQL | Boolean | true |
CHECK_SORT_BY_FS | Boolean | true |
CHECK_CALL_TRANSF | Boolean | true |
CHECK_REGEX | Boolean | true |
CHECK_OCCURENCES | Boolean | true |
CHECK_REPLACE_INTO | Boolean | true |
CHECK_LOOP_EXTRACT | Boolean | true |
CHECK_SORT_EXTRACT | Boolean | true |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
" Standard pseudo-comment:
... "#EC OBSOLETE
" SAP CI_ prefix format:
... "#EC CI_OBSOLETETechnical Details
- Native ATC Class:
ZCL_SKYLINT_NO_OBSOLETE - Implementation File: zcl_skylint_no_obsolete.clas.abap