ABAP Keyword Documentation → ABAP - Short Reference
LOOP AT itab - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
LOOP AT itab { { INTO wa }
| { ASSIGNING <fs> [CASTING] }
| { REFERENCE INTO dref }
| { TRANSPORTING NO FIELDS } }
[USING KEY key_name|(name)]
[FROM idx1] [TO idx2] [WHERE log_exp|(cond_syntax].
...
ENDLOOP.
Effect
Reads an internal table itab
in a loop.
Additions
-
INTO wa
Assigns the read line to a work areawa
. -
ASSIGNING <fs> [CASTING]
Assigns the read line to a field symbol<fs>
, where a casting can be executed. -
REFERENCE INTO dref
Assigns a reference to the read line of a reference variabledref
. -
TRANSPORTING NO FIELDS
Read line is not assigned. -
USING KEY key_name|(name)
Declares statically or dynamically a (secondary) table key that determines the processing sequence. -
[FROM idx1] [TO idx2] [WHERE log_exp|(cond_syntax)]
Limits the rows to be read by declaring of a lower and upper numberidx1
andidx2
in the table index being used or by declaring a static conditionlog_exp
or a dynamic condition incond_syntax
.