Ansicht
Dokumentation

ABENMEMORY_CONSUMPTION_4 - MEMORY CONSUMPTION 4

ABENMEMORY_CONSUMPTION_4 - MEMORY CONSUMPTION 4

Fill RESBD Structure from EBP Component Structure   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Complex Data Objects with Deep Components

If data objects of complex data types have many deep components, which often, for example, applies to internal tables with a deep line type for example, the administrative costs in the form of memory for references and headers must be prevented from growing disproportionately large compared to the actual data content.

For complex data objects with relatively little data content, three basic cases can be distinguished:

  1. Complex data objects with a sparse fill level
A complex deep data object is sparsely populated if it contains many deep components of which most are initial. The memory requirement of such a deep initial component like this is 8 bytes for as long as the component does not yet refer to a header.
  1. Complex data objects with a duplicative fill level
A complex deep data object has a duplicative fill level if it contains many deep components of which most refer to the same data. Such components share the dynamic memory and only contribute to the memory requirement of their references. For dynamic data objects, this is achieved by sharing.
  1. Complex data objects with a low fill level
A complex deep data object has a low fill level if it contains many deep components that refer to different objects, strings, or internal tables, but the objects only require very little memory or are empty.

Deep data objects with a fill level that is sparse, duplicative, and not too low can usually be used without any concerns.

For deep data objects with a sparse fill level and few duplicates, it is vital to consider the memory requirements for references and headers. Unlike other programming languages, ABAP is not suitable for the massive use of such data objects. If the dataset is low, a class wrapper can also be used as an alternative to internal tables, since the additional costs for objects are comparatively low.

Example

An example of a duplicative data object with a low fill level is an internal table whose line type itself is table-like or contains table-like components. Even if the inner internal tables are initialized after previous use, they still occupy memory for reference and header, which can cause considerable memory requirements for little or no work data in the case of a large outer internal table.

See Deep Data Objects, Memory Usage.






ABAP Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2994 Date: 20240425 Time: 021345     sap01-206 ( 64 ms )