Collect Statement of Internal Table
Collect Statement of Internal Table
Effect
Notes
40
20
Addition
... SORTED BY f
Effect
Note
Performance:
1. Avoid unnecessary assignments to the header line when using
internal tables with a header line. Whenever possible, use
statements that have an explicit work area.
For example, "APPEND wa TO itab." is approximately twice as
fast as "itab = wa. APPEND itab.". The same applies to
COLLECT and INSERT.
2. The runtime of a COLLECT increases with the width of the
table key and the number of numeric fields whose contents
are summated.
Note
Runtime errors:
- COLLECT_OVERFLOW: Overflow in an integer field during
addition
- COLLECT_OVERFLOW_TYPE_P: Overflow in a type P field during
addition.
- TABLE_COLLECT_CHAR_IN_FUNCTION: COLLECT on a non-numeric
field.