SAP Function Modules

DB4_INDEX_USED_INFO SAP Function module - AS/400: Get index used info for ST04 Detail Analysis







DB4_INDEX_USED_INFO is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name DB4_INDEX_USED_INFO into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STU4_ST04
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM DB4_INDEX_USED_INFO - DB4 INDEX USED INFO





CALL FUNCTION 'DB4_INDEX_USED_INFO' "AS/400: Get index used info for ST04 Detail Analysis
* EXPORTING
*   resetflag = SPACE           " db4qqpar-qreset  Feld vom Typ CHAR z.Zt nicht verwendet
*   current_system =            " db6navsyst    DB6: Globale Steuerdaten für Navigationsrahmen
* TABLES
*   idu_0100 =                  " db4idu0100    Overview info about indexes used performed
*   indexes_for_details =       " db4idulst     List of indexes for which details are requested
*   idu_0200 =                  " db4idu0200    Detail index used info for indexes specified
  EXCEPTIONS
    NO_DATA_FOUND = 1           "               No data found about indexes used
    NO_INDEX_FOR_DETAIL_SPECIFIED = 2  "        Internal table INDEXES_FOR_DETAILS is empty
    NO_DETAIL_DATA_FOUND = 3    "               No detail data found for indexes specified
    .  "  DB4_INDEX_USED_INFO

ABAP code example for Function Module DB4_INDEX_USED_INFO





The ABAP code below is a full code listing to execute function module DB4_INDEX_USED_INFO including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_idu_0100  TYPE STANDARD TABLE OF DB4IDU0100,"TABLES PARAM
wa_idu_0100  LIKE LINE OF it_idu_0100 ,
it_indexes_for_details  TYPE STANDARD TABLE OF DB4IDULST,"TABLES PARAM
wa_indexes_for_details  LIKE LINE OF it_indexes_for_details ,
it_idu_0200  TYPE STANDARD TABLE OF DB4IDU0200,"TABLES PARAM
wa_idu_0200  LIKE LINE OF it_idu_0200 .


DATA(ld_resetflag) = some text here
DATA(ld_current_system) = 'some text here'.

"populate fields of struture and append to itab
append wa_idu_0100 to it_idu_0100.

"populate fields of struture and append to itab
append wa_indexes_for_details to it_indexes_for_details.

"populate fields of struture and append to itab
append wa_idu_0200 to it_idu_0200. . CALL FUNCTION 'DB4_INDEX_USED_INFO' * EXPORTING * resetflag = ld_resetflag * current_system = ld_current_system * TABLES * idu_0100 = it_idu_0100 * indexes_for_details = it_indexes_for_details * idu_0200 = it_idu_0200 EXCEPTIONS NO_DATA_FOUND = 1 NO_INDEX_FOR_DETAIL_SPECIFIED = 2 NO_DETAIL_DATA_FOUND = 3 . " DB4_INDEX_USED_INFO
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_resetflag  TYPE DB4QQPAR-QRESET ,
it_idu_0100  TYPE STANDARD TABLE OF DB4IDU0100 ,
wa_idu_0100  LIKE LINE OF it_idu_0100,
ld_current_system  TYPE DB6NAVSYST ,
it_indexes_for_details  TYPE STANDARD TABLE OF DB4IDULST ,
wa_indexes_for_details  LIKE LINE OF it_indexes_for_details,
it_idu_0200  TYPE STANDARD TABLE OF DB4IDU0200 ,
wa_idu_0200  LIKE LINE OF it_idu_0200.


ld_resetflag = some text here

"populate fields of struture and append to itab
append wa_idu_0100 to it_idu_0100.
ld_current_system = 'some text here'.

"populate fields of struture and append to itab
append wa_indexes_for_details to it_indexes_for_details.

"populate fields of struture and append to itab
append wa_idu_0200 to it_idu_0200.

SAP Documentation for FM DB4_INDEX_USED_INFO


The function module collects data from the mySAP ERP database performance tables about indexes used. ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name DB4_INDEX_USED_INFO or its description.