SAP LOOP AT ITAB - Reference ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for LOOP_AT_ITAB

LOOP AT itab

ABAP Reference
ABAP Code Snippet


ABAP Syntax LOOP AT itab { { INTO wa }

| { ASSIGNING <(><)> [CASTING] }
| { REFERENCE INTO dref }
| { TRANSPORTING NO FIELDS } }
[USING KEY key_name|(name)]
[FROM idx1] [TO idx2] [WHERE log_exp|(cond_syntax].
...
ENDLOOP.
ABAP Code Snippet

What does it do? Reads an internal table itab in a loop.

ABAP Addition INTO wa
Assigns the read line to a work area wa.
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 variable dref .
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 number idx1 and idx2 in the table index being used or by declaring a static condition log_exp or a dynamic condition in cond_syntax.

Return to menu