1/8/2024 0 Comments Refresh and clear itab abapSelect a value that provides sufficient space in the first (or first and second) page for most cases. Consequently, for small tables it is important that INITIAL SIZE is not selected too small. Relatively few rows (13, for example) require relatively much memory (three pages, third page with a size of 8 to 16 KB), whereas one page would have been sufficient if a higher value (for example, 14) had been specified for INITIAL SIZE. For example, if 4 was specified for INITIAL SIZE, the third page may already be required as of the 13th row if the second page is twice as large as the first page. However, if considerably more rows are required than originally specified for INITIAL SIZE, the third page is created faster with the maximum page size. It can provide information on the size of the first page, so a smaller memory allocation than in the standard case occurs. For example, you can quickly query the number of rows using DESCRIBE TABLE LINES or the integrated function, LINES( itab ), from the table header.Īs very small internal tables with only a few rows can result in wastage due to the memory use of the automatically calculated first page, INITIAL SIZE is added for the declaration of internal tables. The table header includes the most important information about an internal table. You learn more about internal tables in Section 7.3, Table Types, for the table types because they are directly related to this topic. For this purpose, the index or hash administration provides support for the internal tables. The effort for searching table entries (or data records) is comparable to the database tables. So if you access a row of an internal table, the system reads only one row. Unlike database tables, the access is not per page but per row. The first two pages are - depending on the row length and other factors - usually smaller than the pages 3 to n (if the row lengths are not so long that the maximum page size is reached already at the beginning).Īs of the third page, the pages are created with the maximum page size, which is usually between 8 KB and 16 KB. The table body consists of pages that can include the table rows. The space required for page management depends on the number of pages. The table header occupies about 100 bytes of memory space depending on the platform. The table reference currently occupies 8 bytes of memory space. Page management manages the addresses of the pages in the main memory. The table header has a reference to the first page of the table body and another reference to page management. Figure 7.2 shows a schematic diagram of the organization in the main memory.įigure 7.2 Schematic Diagram of the Organization of the Internal Tables in the Main Memory Only when entries are written to the table does the system create a table header and a table body. When an internal table is declared in an ABAP program, the system only creates a reference (table reference) in the main memory initially. ![]() In the context of internal tables, the following sections use the term pages. In the main memory, the internal tables, just like the database tables, are organized in blocks or pages. Section 7.3, Table Types, discusses the various access types and table types.īefore describing the table types in detail, let’s first discuss the organization of internal tables in the main memory. The combination of access type and table type is mainly relevant for the performance. Key components (taking the sequence into account) The key components and their sequence specify the criteria based on which the table rows are identified.įigure 7.1 illustrates this syntactically. ![]() Standard tables only allow for non-unique keys and hashed tables only for unique keys.Ĥ. The uniqueness is based on the table type. In case of unique keys, there are no multiple entries (regarding the key) in the internal tables. Uniqueness of the key The key can be specified as unique or non-unique. Row type The row type of an internal table can be any ABAP data type.ģ. Section 7.3, Table Types, discusses this topic in great detail.Ģ. Table type The access type to the table type determines how ABAP accesses the individual table rows. Internal tables are completely specified by four properties:ġ. Typical problematic examples and solution options are presented here. The major part of this chapter then details the performance aspects for the processing of internal tables. ![]() The subsequent section discusses the different types of internal tables. This is followed by a description of how the internal tables are organized in the main memory. The following sections first provide a general overview of the internal tables. ![]() This excerpt from ABAP Performance Tuning by Hermann Gahm is reprinted here with permission from SAP Press, copyright 2011.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |