Show TOC

Creating Database IndexesLocate this document in the navigation structure

Use

To avoid long runtimes when archive information structures are accessed, we recommend that you create a database index for every infostructure. The index helps speed up accesses to the database table of the infostructure. If you are using an infostructure that does not have a database index, you can use this function to create an index.

Recommendation

Do not create your own database indexes for SAP infostructures, because this may create problems during the transport of the infostructures, due to naming conventions. Instead, copy the relevant SAP infostructure into your own namespace and then create an index for the new infostructure.

Integration

The data of the infostructure is saved in the database table, which is generated when the infostructure is activated, that is, directly in the production system. Because productive systems are protected against changes to cross-client objects (settings in system change option), it is not possible to create database indexes for generated Archive Information System tables. Instead, you can use the function described below, provided by the Archive Information System, to do so.

Features

To create a database index for an infostructure, simply define it The index will then be generated when you activate its infostructure in the database. The index definition is stored in table AIND_STR8.

To use the function for the definition of a database index from the Archive Information System, choose Start of the navigation path Customizing Next navigation step Goto Next navigation step Database Index End of the navigation path.

You will see a table whose rows correspond to the fields of the index you want to define. The columns of the table have the following meanings:

Column

Meaning

Index Name

Name under which the index is saved in the ABAP dictionary

Position

Position of a field in the index

Field Name

Technical name of the filed in the infostructure

Assign the relevant fields to the table. If you need the field MANDT (Client), then you must incorporate it manually.

Note the following when you work with database indexes for archive information structures:

  • Entries in table AIND_STR8 are transported automatically together with the infostructure. You only need to trigger the transport manually if the infostructure itself is not to be transported.

  • If you delete an infostructure, the corresponding entries in table AIND_STR8 are also deleted.

  • If you remove a field that is also part of an archive index from an infostructure, you must adapt table AIND_STR8 manually, otherwise you will encounter problems when you try to activate the infostructure.

  • The system only recognizes index definition entries if no database table exists yet for the infostructure. Therefore, you may have to delete the database table of the infostructure. You can find this function in the Archive Information System under Start of the navigation path Customizing Next navigation step Utilities Next navigation step Delete Table End of the navigation path.

    Note

    Creating or changing a database index for an already existing infostructure generally means long runtimes, because you must deactivate the infostructure, delete the corresponding tables, activate the infostructure, and then refill it. You can use program ASCORRINDX to make changes to database indexes without having to delete the corresponding infostructures and fill them again. For more information about how to use this program see the corresponding program documentation.

Example

The index definition for the standard infostructure SAP_FI_DOC_002 contains the following rows:

Index Name

Position

Field Name

LIF

10

MANDT

LIF

20

LIFNR

LIF

30

BUKRS

REF

10

MANDT

REF

20

AWKEY

When you activate the infostructure a database table with two indexes is creates: The index LIF contains the fields MANDT, LIFNR, and BUKRS (in that order), and the index REF contains the fields MANDT and AWKEY.