ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Internal Tables → Expressions and Functions for Internal Tables → FOR - Table Iterations
FOR - cond
Other versions:
7.31 | 7.40 | 7.54
Syntax
... [USING KEY keyname]
[FROM idx1] [TO idx2]
[WHERE ( log_exp )|(cond_syntax)] ...
Effect
As with LOOP AT itab
,
the following is possible for each expression FOR
... IN itab and FOR GROUPS ... OF
of a constructor expression:
USING KEY
can be used to specify the table key with which table loop is evaluated.
FROM
andTO
can be used as upper and lower limits to restrict the rows in the table index used.
WHERE
can be used to specify static or dynamic conditions for column content.
The syntax and semantics are exactly the same as in
LOOP AT itab, apart from the fact that a statically specified logical expression log_exp
in the WHERE
condition must always be placed in parentheses.
In the expression FOR ... IN GROUP group
,
only static WHERE
conditions can be specified for cond
.
Note
The local auxiliary variables of the expression visible in this position can be used for idx1
,
idx2
, and in the logical expression of the WHERE
condition.