ABAP Keyword Documentation → ABAP − Short Reference
COLLECT - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
COLLECT wa INTO itab { [ASSIGNING <fs> [CASTING]]
| [REFERENCE INTO dref] }.
Effect
Inserts the work area wa
as rows in an internal table itab
such that, where the primary table key is already available for some rows, the values of the other components are added to the values of existing rows.
Additions
-
ASSIGNING <fs> [CASTING]
The inserted row is assigned to the field symbol<fs>
, and a casting can be performed. -
REFERENCE INTO dref
The data reference indref
is set to the inserted row.