Prefer CORRESPONDING #( ) Operator
WarningClean ABAP & Modern SyntaxQuickFix Ready#EC CORRESPRemote Enabled
Overview
Prefer CORRESPONDING Expression over MOVE-CORRESPONDING.
ATC Finding Message:
Prefer functional CORRESPONDING #( ... ) over MOVE-CORRESPONDING
Rationale
MOVE-CORRESPONDING is a procedural statement that copies same-named fields implicitly and cannot be nested in expressions. CORRESPONDING #( ) is expression-capable and supports EXCEPT, MAPPING, and DISCARDING to control the mapping explicitly. Use it to make structure transfers visible and type-safe.
Non-Compliant
abap
MOVE-CORRESPONDING ls_customer_api TO ls_customer_db.Compliant
abap
ls_customer_db = CORRESPONDING #( ls_customer_api ).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.
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC CORRESP
" SAP CI_ prefix format:
... "#EC CI_CORRESPTechnical Details
- Native ATC Class:
ZCL_SKYLINT_PREF_CORRESP - Implementation File: zcl_skylint_pref_corresp.clas.abap