ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Release 7.40 and Its SPs → Changes in Release 7.40, SP08
Internal Tables in Release 7.40, SP08
2. Expressions for internal tables
Other versions:
7.31 | 7.40 | 7.54
Modification 1
Groupings
A new variant LOOP AT itab
... GROUP BY of the statement
LOOP AT itab enables the rows in an internal table to be grouped and then the groups evaluated in a
group loop. The new statement LOOP AT GROUP for
member groups is used to access the rows in a group.
The new variants FOR
GROUPS ... OF and FOR ... IN GROUP in an
iteration expression for
table iterations using
FOR can be used to perform the same groupings (and evaluate them) in
table comprehensions and
table reductions as well.
The new options for grouping internal tables exist alongside the existing group level processing functions and can replace them in many cases.
Modification 2
Expressions for Internal Tables
The following new aspects of expressions apply in particular to the processing of internal tables:
-
Custom iteration expressions in constructor expressions
using
NEWandVALUEfor creating internal tables. -
Table reductions with the new
reduction operator
REDUCE. -
Table filtering with the new
filter operator
FILTER. -
LINES OFfor specifying rows in the constructor operators NEW andVALUE. -
Default value
OPTIONAL or
DEFAULTfor table expressions.