SAP INITIAL MEMORY REQU - Guide
Get Example source ABAP code based on a different SAP table
Initial Memory Requirement
ABAP_BACKGROUND
Internal tables are stored in the memory block by block. The ABAP runtime framework allocates a suitable memory area for the data of the table by default as the
The
ABAP_RULE
Only use the
ABAP_DETAILS
The
Latest notes:
Instance attributes of classes that are declared as inner tables can also be considered as nested tables. If many instances of a class with tabular attributes are expected, it can be useful to specify
ABAP_HINT_END
ABAP_EXAMPLE_BAD
The following source text shows the declaration of a nested table, where the initial memory requirement is specified incorrectly for the outer large table, not the inner small table.
WITH NON-UNIQUE KEY ...
TYPES: BEGIN OF line_structure,
...
int_table TYPE small_table,
...
END OF line_structure,
big_table TYPE SORTED TABLE OF line_structure
WITH UNIQUE KEY ...
INITIAL SIZE 10000.>
ABAP_EXAMPLE_END
ABAP_EXAMPLE_GOOD
The following source text shows the declaration of a nested table, where the initial memory requirement is specified according to the above rule: for the inner small table and not the outer large table.
WITH NON-UNIQUE KEY ...
INITIAL SIZE 4.
TYPES: BEGIN OF line_structure,
...
int_table TYPE small_table,
...
END OF line_structure,
big_table TYPE SORTED TABLE OF line_structure
WITH UNIQUE KEY ...>
ABAP_EXAMPLE_END