Specify TRANSPORTING in Internal Table MODIFY and READ Operations
WarningPerformance & Database#EC PREF_TRANSPORTRemote Enabled
Overview
Avoid MODIFY itab in LOOP without TRANSPORTING clause.
ATC Finding Message:
Specify TRANSPORTING fields in MODIFY itab inside loop for performance
Rationale
When updating internal table rows using MODIFY itab FROM workarea, ABAP by default copies every single field from the work area into the internal table row. If the table row contains wide structures, nested tables, or large string fields, copying unchanged fields incurs severe CPU cache misses and memory reallocation overhead.
Best Practice: Use the TRANSPORTING addition to explicitly specify only the specific columns being modified.
Non-Compliant
abap
" Anti-pattern: Deep copies all 60 columns of ls_customer back into the table row
ls_customer-status = 'ACTIVE'.
MODIFY lt_customers FROM ls_customer INDEX lv_tabix.Compliant
abap
" Clean ABAP: Only transfers the modified status column (zero overhead on other fields)
ls_customer-status = 'ACTIVE'.
MODIFY lt_customers FROM ls_customer INDEX lv_tabix TRANSPORTING status.
" Even better: Mutate directly in-place via field symbol (zero copy)
<ls_customer>-status = 'ACTIVE'.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC PREF_TRANSPORT
" SAP CI_ prefix format:
... "#EC CI_PREF_TRANSPORTRelated Rules
- Do Not Mutate the Internal Table Currently Being Looped (Iterator Invalidation) —
#EC NO_MOD_LOOP_TAB - Modernize READ TABLE (Table Expressions & line_exists) —
#EC PREF_TAB_EXPR - Prefer FILTER for a Simple LOOP with IF and APPEND —
#EC PREF_FILTER
Technical Details
- Native ATC Class:
ZCL_SKYLINT_PREF_TRANSPORT - Implementation File: zcl_skylint_pref_transport.clas.abap