Avoid INTO with Field Symbols
WarningAnti-Patterns & Bad Practices#EC NO_INTO_FSRemote Enabled
Overview
Do not use INTO with a field symbol; use ASSIGNING instead.
ATC Finding Message:
Do not use INTO with a field symbol; use ASSIGNING instead
Rationale
Using INTO with a field symbol in READ TABLE or LOOP AT causes value assignment rather than pointer binding, which is almost always an accidental bug. Use ASSIGNING instead.
Non-Compliant
abap
READ TABLE lt_data INTO <fs_row> INDEX 1.Compliant
abap
READ TABLE lt_data ASSIGNING <fs_row> INDEX 1.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC NO_INTO_FS
" SAP CI_ prefix format:
... "#EC CI_NO_INTO_FSRelated Rules
- Prefer Strict SQL Host Variable Escaping —
#EC PREF_STRICT_SQL - Avoid Ambiguous Statements —
#EC NO_AMBIGUOUS_STMT
Technical Details
- Native ATC Class:
ZCL_SKYLINT_NO_INTO_FS - Implementation File: zcl_skylint_no_into_fs.clas.abap