HDB_DDL_EXECUTE_FROM_TEMPLATE 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 HDB_DDL_EXECUTE_FROM_TEMPLATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
HDB_SERVICE
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'HDB_DDL_EXECUTE_FROM_TEMPLATE' "Drop a view on HDB
EXPORTING
i_template = " progname Name of generation template
* it_scalar_variables = " hdb_tt_scalar_variable Table of Scalar Variables
* it_tabular_variables = " hdb_tt_tabular_variable Table of Tabular Variables
* i_application = " hdb_application Application
* i_subapplication = " hdb_subapplication Sub-Application
* i_key_value = " hdb_key_value Key Value
* i_hdbc_check = SPACE " flag Check main switches in HDBC
EXCEPTIONS
DBCON_NOT_EXIST = 1 " HDB Connection Does Not Exist
DBCON_NO_USE = 2 " HDB Connection should not be used in this context (see HDBC)
DBCON_ERROR = 3 " HDB Connection Cannot be Reached
HDB_ERROR = 4 " HDB SQL Error
TEMPLATE_NOT_EXIST = 5 " Generation template not found
TEMPLATE_BAD_FORMAT = 6 " Generation template not well-formed
. " HDB_DDL_EXECUTE_FROM_TEMPLATE
The ABAP code below is a full code listing to execute function module HDB_DDL_EXECUTE_FROM_TEMPLATE 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(ld_i_template) = 'Check type of data required'.
DATA(ld_it_scalar_variables) = 'Check type of data required'.
DATA(ld_it_tabular_variables) = 'Check type of data required'.
DATA(ld_i_application) = 'Check type of data required'.
DATA(ld_i_subapplication) = 'Check type of data required'.
DATA(ld_i_key_value) = 'Check type of data required'.
DATA(ld_i_hdbc_check) = 'Check type of data required'. . CALL FUNCTION 'HDB_DDL_EXECUTE_FROM_TEMPLATE' EXPORTING i_template = ld_i_template * it_scalar_variables = ld_it_scalar_variables * it_tabular_variables = ld_it_tabular_variables * i_application = ld_i_application * i_subapplication = ld_i_subapplication * i_key_value = ld_i_key_value * i_hdbc_check = ld_i_hdbc_check EXCEPTIONS DBCON_NOT_EXIST = 1 DBCON_NO_USE = 2 DBCON_ERROR = 3 HDB_ERROR = 4 TEMPLATE_NOT_EXIST = 5 TEMPLATE_BAD_FORMAT = 6 . " HDB_DDL_EXECUTE_FROM_TEMPLATE
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.
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_i_template | TYPE PROGNAME , |
| ld_it_scalar_variables | TYPE HDB_TT_SCALAR_VARIABLE , |
| ld_it_tabular_variables | TYPE HDB_TT_TABULAR_VARIABLE , |
| ld_i_application | TYPE HDB_APPLICATION , |
| ld_i_subapplication | TYPE HDB_SUBAPPLICATION , |
| ld_i_key_value | TYPE HDB_KEY_VALUE , |
| ld_i_hdbc_check | TYPE FLAG . |
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 HDB_DDL_EXECUTE_FROM_TEMPLATE or its description.
HDB_DDL_EXECUTE_FROM_TEMPLATE - Drop a view on HDB HDB_DBCON_GET_APPL - Get HDB Connection for a Specific Context HDB_DBCON_CHECK - Check HDB Connection HDB_CREATE_DBACOCKPIT_USER - Create/Modify the DB-User of DBACOCKPIT for HANA HDB_COPY_DATE_TO_FUGR - *** for internal usage only *** HDB_ADD_COCKPIT_ENTRY - HDB: insert into DB6NAVSYST