SAP DD_DATABASE_UTILITY Function Module for
DD_DATABASE_UTILITY is a standard dd database utility 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 dd database utility FM, simply by entering the name DD_DATABASE_UTILITY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDDD
Program Name: SAPLSDDD
Main Program: SAPLSDDD
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DD_DATABASE_UTILITY 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_DATABASE_UTILITY'".
EXPORTING
FCT = "Function CRE, CNV, DEL, MDF etc...
* ID_NAME = ' ' "ID of a matchcode or an index
OBJ_NAME = "Object name
OBJ_TYPE = "Object type: TABL, VIEW, INDX, MCOB, MCID, ...
* EXEC_MODUS = 'S' "Execution mode: 'S' - online, 'B'- background
* POPUP_FLAG = ' ' "
* CALL_FROM_DBUT = ' ' "
IMPORTING
SUBRC = "
EXCEPTIONS
UNEXPECTED_ERROR = 1 UNSUPPORTED_FUNCTION = 2 UNSUPPORTED_OBJ_TYPE = 3 TABLE_IS_LOCKED_BY_TCNV = 4 AUTHORITY_CHECK_FAILED = 5 ABORT_FUNCTION = 6 CONVERSION_ERROR = 7
IMPORTING Parameters details for DD_DATABASE_UTILITY
FCT - Function CRE, CNV, DEL, MDF etc...
Data type: TBATG-FCTOptional: No
Call by Reference: No ( called with pass by value option)
ID_NAME - ID of a matchcode or an index
Data type: DD12L-INDEXNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJ_NAME - Object name
Data type: TBATG-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
OBJ_TYPE - Object type: TABL, VIEW, INDX, MCOB, MCID, ...
Data type: TBATG-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
EXEC_MODUS - Execution mode: 'S' - online, 'B'- background
Data type: DD02L-AS4LOCALDefault: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)
POPUP_FLAG -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALL_FROM_DBUT -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DD_DATABASE_UTILITY
SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
UNEXPECTED_ERROR - An unexpected error (database) occurred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNSUPPORTED_FUNCTION - A function which is not supported was used
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNSUPPORTED_OBJ_TYPE - An object was used which is not supported
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_IS_LOCKED_BY_TCNV - The table has a lock entry in TCNV
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AUTHORITY_CHECK_FAILED - The user has no authorization for the FCT.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ABORT_FUNCTION - The user terminated execution
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONVERSION_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DD_DATABASE_UTILITY 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_fct | TYPE TBATG-FCT, " | |||
| lv_subrc | TYPE SY-SUBRC, " | |||
| lv_unexpected_error | TYPE SY, " | |||
| lv_id_name | TYPE DD12L-INDEXNAME, " SPACE | |||
| lv_unsupported_function | TYPE DD12L, " | |||
| lv_obj_name | TYPE TBATG-TABNAME, " | |||
| lv_unsupported_obj_type | TYPE TBATG, " | |||
| lv_obj_type | TYPE TBATG-OBJECT, " | |||
| lv_table_is_locked_by_tcnv | TYPE TBATG, " | |||
| lv_exec_modus | TYPE DD02L-AS4LOCAL, " 'S' | |||
| lv_authority_check_failed | TYPE DD02L, " | |||
| lv_popup_flag | TYPE DD02L, " ' ' | |||
| lv_abort_function | TYPE DD02L, " | |||
| lv_call_from_dbut | TYPE DD02L, " ' ' | |||
| lv_conversion_error | TYPE DD02L. " |
|   CALL FUNCTION 'DD_DATABASE_UTILITY' " |
| EXPORTING | ||
| FCT | = lv_fct | |
| ID_NAME | = lv_id_name | |
| OBJ_NAME | = lv_obj_name | |
| OBJ_TYPE | = lv_obj_type | |
| EXEC_MODUS | = lv_exec_modus | |
| POPUP_FLAG | = lv_popup_flag | |
| CALL_FROM_DBUT | = lv_call_from_dbut | |
| IMPORTING | ||
| SUBRC | = lv_subrc | |
| EXCEPTIONS | ||
| UNEXPECTED_ERROR = 1 | ||
| UNSUPPORTED_FUNCTION = 2 | ||
| UNSUPPORTED_OBJ_TYPE = 3 | ||
| TABLE_IS_LOCKED_BY_TCNV = 4 | ||
| AUTHORITY_CHECK_FAILED = 5 | ||
| ABORT_FUNCTION = 6 | ||
| CONVERSION_ERROR = 7 | ||
| . " DD_DATABASE_UTILITY | ||
ABAP code using 7.40 inline data declarations to call FM DD_DATABASE_UTILITY
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 FCT FROM TBATG INTO @DATA(ld_fct). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_subrc). | ||||
| "SELECT single INDEXNAME FROM DD12L INTO @DATA(ld_id_name). | ||||
| DATA(ld_id_name) | = ' '. | |||
| "SELECT single TABNAME FROM TBATG INTO @DATA(ld_obj_name). | ||||
| "SELECT single OBJECT FROM TBATG INTO @DATA(ld_obj_type). | ||||
| "SELECT single AS4LOCAL FROM DD02L INTO @DATA(ld_exec_modus). | ||||
| DATA(ld_exec_modus) | = 'S'. | |||
| DATA(ld_popup_flag) | = ' '. | |||
| DATA(ld_call_from_dbut) | = ' '. | |||
Search for further information about these or an SAP related objects