Skip to content

Limit One Statement per Source Code Line (No Inline Colon Chains) ​

WarningMetrics & Complexity Limits#EC MAX_ONE_STMTRemote Enabled

Overview ​

Max One Statement Per Line.

ATC Finding Message: Only one statement is allowed per line

Rationale ​

Placing multiple statements on a single line (either via semicolons, colons, or simple chaining like a = 1. b = 2.) compromises readability, impairs debugger single-stepping, and destroys Git line-by-line diff precision. When a runtime error occurs, the debugger stops on the line without clarifying which of the statements failed.

Clean ABAP Guideline: Write exactly one ABAP statement per source code line.

Non-Compliant ​

abap
" Anti-pattern: Multiple statements on one line
lv_status = 'OPEN'. lv_count = 0. CLEAR ls_header.

Compliant ​

abap
" Clean ABAP: Dedicated line for each statement
lv_status = 'OPEN'.
lv_count = 0.
CLEAR ls_header.

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.