Get Example source ABAP code based on a different SAP table
VX_EXA_ONLY
Deep Data Objects, Memory Consumption The example illustrates the administrative costs of deep components with low data content.
ABAP_SOURCE_CODE DEMO CL_DEMO_MEMORY_USAGE
ABAP_DESCRIPTION At the breakpoints, the memory requirements of the four internal tables itab>, rtab>, ttab>, and otab> can be displayed by the ABAP Debugger. At the first breakpoint, the four tables have the same dynamic but not duplicate data content, that is, 1000 different integers. In itab >, the data content of about 4 KB is only increased by the administrative costs for itab> itself (around 100 bytes); in all other tables, administrative costs are created for each table line. In the case of the deep line types in rtab>, ttab>, and otab>, the data content size of 4 KB compares with administrative costs of 100, 200, and 300 KB. The costs for the inner internal table in ttab> are higher than that for the data reference in rtab> and the administrative costs for otab> consist of the costs for the object references and for the internal tables in the referenced objects. At the second breakpoint, all lines of each of the four tables were initialized using FREE>. Of course, this has no effect on the memory requirements of itab>. In the case of rtab>, all data and all administrative information of the individual reference variables was deleted, leaving memory requirements of about 8 KB for the initial references as well as the administrative costs for rtab> itself. In the case of ttab>, all data was deleted but the individual table headers were retained, which means that, even though they are less than before, there are still administrative costs of about 100 KB. For otab> however, the same applies as to rtab>, leaving only the costs for the initial references. This example shows, for example, that for internal tables with deep line types the administrative costs may easily exceed the data content and, on the other hand, that a table with object references is less expensive after the deletion of data than a table with inner tables.