Skip to content

Avoid Excessive Method Chaining ​

WarningClean ABAP & Modern Syntax#EC NO_METHOD_CHAINRemote Enabled

Overview ​

Avoid excessive method chaining; extract into variables.

ATC Finding Message: Excessive method chaining; extract intermediate results into variables

Rationale ​

Chaining multiple method calls together degrades readability and makes debugging difficult. Extract intermediate results into explanatory local variables.

Non-Compliant ​

abap
lo_demo->meth1( )->meth2( ).

Compliant ​

abap
DATA(lo_step) = lo_demo->meth1( ).
lo_step->meth2( ).

Configuration & Thresholds ​

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

Parameter NameData TypeDefault ValueDescription & Guidance
MAX_CHAINInteger1Maximum allowed chained calls (defaults to 1)

Suppression ​

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

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

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

Technical Details ​

Released under the MIT License.