SAP MSS_GET_INDEXES Function Module for









MSS_GET_INDEXES is a standard mss get indexes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for mss get indexes FM, simply by entering the name MSS_GET_INDEXES into the relevant SAP transaction such as SE37 or SE38.

Function Group: SFMSS_SYSCAT
Program Name: SAPLSFMSS_SYSCAT
Main Program: SAPLSFMSS_SYSCAT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MSS_GET_INDEXES pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'MSS_GET_INDEXES'"
EXPORTING
* TABLE_NAME = "Table name
* SCHEMA_NAME = "Schema name
* DB_NAME = "Database name
* ONLY_UNIQUE_INDS = "If 'X', then only unique indexes are returned.
* ALSO_AUTOCRE_STATS = "If 'X', then also automatically created statistics groups are returned.
* ALSO_MANCRE_STATS = "If 'X', then also manually created statistics groups are returned.

TABLES
ALL_INDEXES = "Base table name, index name, index id

EXCEPTIONS
NOT_RUNNING_ON_MSSQL = 1 DB_ERROR = 2 INTERNAL_ERROR = 3 DB_NOT_FOUND = 4 NO_DB_ACCESS = 5 SCHEMA_NOT_FOUND = 6 INVALID_INPUT = 7 NO_INDEXES_FOUND = 8
.



IMPORTING Parameters details for MSS_GET_INDEXES

TABLE_NAME - Table name

Data type: MSSTABLE
Optional: Yes
Call by Reference: Yes

SCHEMA_NAME - Schema name

Data type: MSSSCHEMA
Optional: Yes
Call by Reference: Yes

DB_NAME - Database name

Data type: MSSDB
Optional: Yes
Call by Reference: Yes

ONLY_UNIQUE_INDS - If 'X', then only unique indexes are returned.

Data type: CHAR1
Optional: Yes
Call by Reference: Yes

ALSO_AUTOCRE_STATS - If 'X', then also automatically created statistics groups are returned.

Data type: CHAR1
Optional: Yes
Call by Reference: Yes

ALSO_MANCRE_STATS - If 'X', then also manually created statistics groups are returned.

Data type: CHAR1
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for MSS_GET_INDEXES

ALL_INDEXES - Base table name, index name, index id

Data type: MSS_INDEX
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NOT_RUNNING_ON_MSSQL -

Data type:
Optional: No
Call by Reference: Yes

DB_ERROR -

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

DB_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

NO_DB_ACCESS -

Data type:
Optional: No
Call by Reference: Yes

SCHEMA_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

INVALID_INPUT -

Data type:
Optional: No
Call by Reference: Yes

NO_INDEXES_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MSS_GET_INDEXES Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_table_name  TYPE MSSTABLE, "   
lt_all_indexes  TYPE STANDARD TABLE OF MSS_INDEX, "   
lv_not_running_on_mssql  TYPE MSS_INDEX, "   
lv_db_error  TYPE MSS_INDEX, "   
lv_schema_name  TYPE MSSSCHEMA, "   
lv_db_name  TYPE MSSDB, "   
lv_internal_error  TYPE MSSDB, "   
lv_db_not_found  TYPE MSSDB, "   
lv_only_unique_inds  TYPE CHAR1, "   
lv_no_db_access  TYPE CHAR1, "   
lv_also_autocre_stats  TYPE CHAR1, "   
lv_schema_not_found  TYPE CHAR1, "   
lv_also_mancre_stats  TYPE CHAR1, "   
lv_invalid_input  TYPE CHAR1, "   
lv_no_indexes_found  TYPE CHAR1. "   

  CALL FUNCTION 'MSS_GET_INDEXES'  "
    EXPORTING
         TABLE_NAME = lv_table_name
         SCHEMA_NAME = lv_schema_name
         DB_NAME = lv_db_name
         ONLY_UNIQUE_INDS = lv_only_unique_inds
         ALSO_AUTOCRE_STATS = lv_also_autocre_stats
         ALSO_MANCRE_STATS = lv_also_mancre_stats
    TABLES
         ALL_INDEXES = lt_all_indexes
    EXCEPTIONS
        NOT_RUNNING_ON_MSSQL = 1
        DB_ERROR = 2
        INTERNAL_ERROR = 3
        DB_NOT_FOUND = 4
        NO_DB_ACCESS = 5
        SCHEMA_NOT_FOUND = 6
        INVALID_INPUT = 7
        NO_INDEXES_FOUND = 8
. " MSS_GET_INDEXES




ABAP code using 7.40 inline data declarations to call FM MSS_GET_INDEXES

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!