![]() ![]() ![]() WITH NON-UNIQUE SORTED KEY sort_key COMPONENTS bismt. The internal table definition could be as shown below. But, on the other hand, secondary keys also incur additional administration costs due to memory consumption and run-time.įor example, lets create a secondary index into the internal table IT_MARA for the column BISMT, this is just like having a secondary Z- index on BISMT in the database table definition. The SAP Help states that using the secondary key could increases read access performance significantly. Well now as of ABAP 7.2 can declare secondary keys for internal tables. OK, back to internal tables, traditionally, if you wanted to read an internal table in two different ways (e.g.,looking for a material by Material Number or by Reference Number), then you either had to keep sorting the table just before a read, or have two identical tables sorted differently. Why do we create a custom index or z-index? For performance… we recognize that a table could be queried in more ways then just by the primary key, so we setup customer indexes that we believe will be used by the Database Optimizer when determining the access path and thus make the query performant. Using Secondary Keys to Access Internal Tables in ABAP 7.4Īll of us who have been developing in ABAP at one time or another have created a custom index on a database table. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |