Skip to content

Prefer Functional RETURNING Parameters ​

WarningClean ABAP & Modern Syntax#EC RETURNINGRemote Enabled

Overview ​

Prefer RETURNING over single EXPORTING.

ATC Finding Message: Prefer functional RETURNING parameter over single EXPORTING parameter

Rationale ​

A single EXPORTING parameter forces callers to declare a target and invoke the method as a statement. A RETURNING parameter makes the method usable directly in assignments, expressions, and assertions. Prefer RETURNING for value-producing methods and reserve EXPORTING for methods that genuinely return several outputs.

Non-Compliant ​

abap
METHODS get_total
  EXPORTING ev_total TYPE i.

Compliant ​

abap
METHODS get_total
  RETURNING VALUE(rv_total) TYPE i.

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.