Ansicht
Dokumentation

ABAPTYPES_ITAB - TYPES ITAB

ABAPTYPES_ITAB - TYPES ITAB

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

TYPES, TABLE OF

Short Reference



TYPES table_type ${ ${TYPE tabkind OF $[REF TO$] type$}
                 $| ${LIKE tabkind OF dobj$} $}
                 $[tabkeys$]
                 $[INITIAL SIZE n$].


Addition:

... INITIAL SIZE n

Effect

This statement defines a table type table_type with a specific line type, a table category tabkind, and table keys tabkeys.

The line type is determined by entering the data type type after TYPE and data type dobj after LIKE:

  • type can be a non-generic data type from ABAP Dictionary, a non-generic public data type of a public data type of a global class, a non-generic data type local to a program, or any ABAP type from the tables of built-in ABAP types. The generic ABAP types c, n, p, and x are extended implicitly to the standard length without decimal places from the tables of built-in ABAP types.
If the addition REF TO is specified before type or dobj, the line type is a reference type. The information specified in the section reference types can then be specified for type and dobj.

Example

Definition of a non-generic sorted table type. The line type corresponds to the structure of the database table SPFLI. Two key fields are defined for the primary table key.

Addition

... INITIAL SIZE n

Effect

The optional addition INITIAL SIZE has two meanings:

  • Note for the internal memory management of internal tables
Internal tables are stored in blocks in the memory. After the optional addition INITIAL SIZE, a number of lines n can be specified directly as a positive number without +/- sign or as a numeric constant to notify the system of the size of the initial block in the memory reserved by the system for an internal table of the table type. By default, and if 0 is specified for n, the system automatically allocates a suitable initial memory area.
If the initial memory area becomes insufficient, further blocks are created using an internal duplicate strategy until a maximum size is reached. After this, all blocks are created with a constant size between 8 and 16 KB.
If the value of n would cause the initial blocks to become too big, the size of the initial memory area is also determined by the system.
  • Size of Ranking Lists
To create a ranking list in the internal table using the addition SORTED BY of the statement APPEND, a value greater than 0 must be specified after INITIAL SIZE. This value determines the size of the ranking list.

Modify the initial memory requirements only for nested tables

Notes

  • Specifying the initial memory requirement is only recommended if the number of entries in the table has been determined in advance and the initial main memory requirement is to be dimensioned in the most suitable way. This can be especially important for internal tables that are components of table types and only contain a few lines.
  • Instead of APPEND SORTED BY, the statement SORT should be used so that the addition INITIAL SIZE is no longer necessary.








General Material Data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5229 Date: 20240329 Time: 141816     sap01-206 ( 80 ms )