SAP DD_INDEX_INTERFACE Function Module for DD: Create, delete, activate indexes in the ABAP/4 Dictionary









DD_INDEX_INTERFACE is a standard dd index interface SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DD: Create, delete, activate indexes in the ABAP/4 Dictionary processing and below is the pattern details for this FM, 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 dd index interface FM, simply by entering the name DD_INDEX_INTERFACE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SDAP
Program Name: SAPLSDAP
Main Program: SAPLSDAP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function DD_INDEX_INTERFACE 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 'DD_INDEX_INTERFACE'"DD: Create, delete, activate indexes in the ABAP/4 Dictionary
EXPORTING
* LANGUAGE = SY-LANGU "Language in which the short text is to be written
TABLE_NAME = "Table name (4 to 10 positions)
* TRANSPORT_NUMBER = ' ' "Transport/repair request
INDEX_NAME = "Index ID (1 to 3 positions)
* UNIQUE = ' ' "Define index uniquely. (X = unique)
* ACTION = 'I' "Insert(I)/Change(U)/Delete(D)
* SHORTTEXT = ' ' "Short description
* ACTIVATE = ' ' "X: Activate immediately and create in DB
* NO_TRANSP_REQUEST = ' ' "

IMPORTING
ACTFAILED = "

TABLES
INDEX_FIELDS = "Index fields

EXCEPTIONS
CANCELLED = 1 ALREADY_EXIST = 2 PERMISSION_ERROR = 3 NAME_NOT_ALLOWED = 4 DB_ACCESS_ERROR = 5 BASETAB_ERROR = 6 NOT_EXIST = 7
.



IMPORTING Parameters details for DD_INDEX_INTERFACE

LANGUAGE - Language in which the short text is to be written

Data type: DD12V-DDLANGUAGE
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLE_NAME - Table name (4 to 10 positions)

Data type: DD12V-SQLTAB
Optional: No
Call by Reference: No ( called with pass by value option)

TRANSPORT_NUMBER - Transport/repair request

Data type: E070-TRKORR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

INDEX_NAME - Index ID (1 to 3 positions)

Data type: DD12V-INDEXNAME
Optional: No
Call by Reference: No ( called with pass by value option)

UNIQUE - Define index uniquely. (X = unique)

Data type: DD12V-UNIQUEFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACTION - Insert(I)/Change(U)/Delete(D)

Data type: DDREFSTRUC-FLAG
Default: 'I'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SHORTTEXT - Short description

Data type: DD12V-DDTEXT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACTIVATE - X: Activate immediately and create in DB

Data type: DDREFSTRUC-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_TRANSP_REQUEST -

Data type: DDREFSTRUC-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DD_INDEX_INTERFACE

ACTFAILED -

Data type: DDREFSTRUC-FLAG
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for DD_INDEX_INTERFACE

INDEX_FIELDS - Index fields

Data type: DDFLDNAM
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CANCELLED - Termination in correction number query

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ALREADY_EXIST - Insert not possible. Index already exists

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PERMISSION_ERROR - User has no authorization to import

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NAME_NOT_ALLOWED - Name not allowed. (Special character or similar)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DB_ACCESS_ERROR - Database error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BASETAB_ERROR - Base table is not active or of incorrect type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_EXIST - Object for deletion does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DD_INDEX_INTERFACE 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_language  TYPE DD12V-DDLANGUAGE, "   SY-LANGU
lv_actfailed  TYPE DDREFSTRUC-FLAG, "   
lv_cancelled  TYPE DDREFSTRUC, "   
lt_index_fields  TYPE STANDARD TABLE OF DDFLDNAM, "   
lv_table_name  TYPE DD12V-SQLTAB, "   
lv_already_exist  TYPE DD12V, "   
lv_permission_error  TYPE DD12V, "   
lv_transport_number  TYPE E070-TRKORR, "   SPACE
lv_index_name  TYPE DD12V-INDEXNAME, "   
lv_name_not_allowed  TYPE DD12V, "   
lv_unique  TYPE DD12V-UNIQUEFLAG, "   SPACE
lv_db_access_error  TYPE DD12V, "   
lv_action  TYPE DDREFSTRUC-FLAG, "   'I'
lv_basetab_error  TYPE DDREFSTRUC, "   
lv_not_exist  TYPE DDREFSTRUC, "   
lv_shorttext  TYPE DD12V-DDTEXT, "   SPACE
lv_activate  TYPE DDREFSTRUC-FLAG, "   SPACE
lv_no_transp_request  TYPE DDREFSTRUC-FLAG. "   SPACE

  CALL FUNCTION 'DD_INDEX_INTERFACE'  "DD: Create, delete, activate indexes in the ABAP/4 Dictionary
    EXPORTING
         LANGUAGE = lv_language
         TABLE_NAME = lv_table_name
         TRANSPORT_NUMBER = lv_transport_number
         INDEX_NAME = lv_index_name
         UNIQUE = lv_unique
         ACTION = lv_action
         SHORTTEXT = lv_shorttext
         ACTIVATE = lv_activate
         NO_TRANSP_REQUEST = lv_no_transp_request
    IMPORTING
         ACTFAILED = lv_actfailed
    TABLES
         INDEX_FIELDS = lt_index_fields
    EXCEPTIONS
        CANCELLED = 1
        ALREADY_EXIST = 2
        PERMISSION_ERROR = 3
        NAME_NOT_ALLOWED = 4
        DB_ACCESS_ERROR = 5
        BASETAB_ERROR = 6
        NOT_EXIST = 7
. " DD_INDEX_INTERFACE




ABAP code using 7.40 inline data declarations to call FM DD_INDEX_INTERFACE

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.

"SELECT single DDLANGUAGE FROM DD12V INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
"SELECT single FLAG FROM DDREFSTRUC INTO @DATA(ld_actfailed).
 
 
 
"SELECT single SQLTAB FROM DD12V INTO @DATA(ld_table_name).
 
 
 
"SELECT single TRKORR FROM E070 INTO @DATA(ld_transport_number).
DATA(ld_transport_number) = ' '.
 
"SELECT single INDEXNAME FROM DD12V INTO @DATA(ld_index_name).
 
 
"SELECT single UNIQUEFLAG FROM DD12V INTO @DATA(ld_unique).
DATA(ld_unique) = ' '.
 
 
"SELECT single FLAG FROM DDREFSTRUC INTO @DATA(ld_action).
DATA(ld_action) = 'I'.
 
 
 
"SELECT single DDTEXT FROM DD12V INTO @DATA(ld_shorttext).
DATA(ld_shorttext) = ' '.
 
"SELECT single FLAG FROM DDREFSTRUC INTO @DATA(ld_activate).
DATA(ld_activate) = ' '.
 
"SELECT single FLAG FROM DDREFSTRUC INTO @DATA(ld_no_transp_request).
DATA(ld_no_transp_request) = ' '.
 


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!