SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Data Types and Data Objects → Types and Objects - Overview → Data Objects → Memory Consumption of Deep Data Objects →Memory Requirements for Deep Data Objects
The memory requirement for a deep data object consists of constantly required memory for the reference and dynamically required memory for the header and the actual objects.
Dynamic memory (header and data) is requested:
When a deep data object is initialized with CLEAR, REFRESH, or FREE, the actual data is deleted, but the reference variables and, for dynamic data objects also the header, are retained. The latter is reused when memory is requested again. The memory requirement of a dynamic data object that is used once and then deleted therefore consists of the reference and the memory requirement of the header, with the exception of boxed components. Only when using the FREE statement on internal tables are table headers sometimes deleted if they would take up too much memory. For static components, initialization does not currently lead to memory being released. Initializing a static box that the initial value sharing has been canceled for does not delete the instance in the internal session, but assigns its initial values with suitable types to the instance.
The memory requirement of the different headers is approximately as follows:
For internal tables, there are additional row-related administration costs in the header. This memory is not created in the table header, but is created in parallel to the table body. This means that when rows are deleted, the corresponding administration data is also deleted.
The exact memory requirement of a deep data object can be determined in the ABAP Debugger using the memory consumption function and by creating a memory snapshot for the Memory Inspector.
Example
See Deep Data Objects, Memory Usage.