Skip to content

Avoid Obsolete Control Flow and Procedural Forms ​

WarningAnti-Patterns & Bad Practices#EC NO_OBS_CONTROLRemote Enabled

Overview ​

Obsolete Control Flow and Procedural Statements.

ATC Finding Message: Avoid obsolete control flow (FORM, AT NEW, BREAK, DEFINE, etc.)

Rationale ​

Subroutines (FORM / PERFORM), macro definitions (DEFINE), hardcoded break points (BREAK-POINT / BREAK), control break statements (AT NEW, AT END, ON CHANGE OF, SUM), and SET EXTENDED CHECK belong to legacy procedural programming. They lack proper scope isolation, cause unpredictable side effects, and are completely prohibited in modern ABAP Cloud. Encapsulate all logic within methods, modern LOOP GROUP BY syntax, and unit tests.

Non-Compliant ​

abap
PERFORM calculate_total USING lv_subtotal.
AT NEW order_id.
  SUM.
ENDAT.

Compliant ​

abap
calculate_total( iv_subtotal = lv_subtotal ).
LOOP AT lt_orders INTO DATA(ls_order) GROUP BY ls_order-order_id ...

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_FORMBooleantrueDetect obsolete PERFORM / FORM subroutine routines
CHECK_LOOP_CTLBooleantrueDetect obsolete control break statements (ON CHANGE OF, EXIT FROM STEP-LOOP)
CHECK_BREAKBooleantrueDetect unconditioned BREAK-POINT statements in non-test code
CHECK_DEFINEBooleantrueDetect DEFINE macro declarations
CHECK_TEST_SEAMSBooleantrueDetect TEST-SEAM injection blocks in production logic
CHECK_CATCH_SYSTEMBooleantrueDetect obsolete CATCH SYSTEM-EXCEPTIONS syntax
CHECK_SET_EXT_CHECKBooleantrueDetect obsolete SET EXTENDED CHECK statements
CHECK_SELECT_NO_INTOBooleantrueDetect obsolete SELECT without INTO statements
CHECK_EXIT_SQLBooleantrueDetect obsolete EXIT FROM SQL statements
CHECK_SORT_BY_FSBooleantrueDetect obsolete dynamic SORT BY field symbol syntax

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.