SAP LDB_CONVERT_LDBNAME_2_DBPROG Function Module for
LDB_CONVERT_LDBNAME_2_DBPROG is a standard ldb convert ldbname 2 dbprog 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 ldb convert ldbname 2 dbprog FM, simply by entering the name LDB_CONVERT_LDBNAME_2_DBPROG into the relevant SAP transaction such as SE37 or SE38.
Function Group: SLDB
Program Name: SAPLSLDB
Main Program: SAPLSLDB
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LDB_CONVERT_LDBNAME_2_DBPROG 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 'LDB_CONVERT_LDBNAME_2_DBPROG'".
EXPORTING
LDB_NAME = "Name of Logical Database
FLAG_EXISTENCE_CHECK = "
IMPORTING
DB_NAME = "
SXXX_NAME = "
FLAG_LDB_EXISTENT = "
WA_LDBD = "
SEL_NAME = "
COM_NAME = "
TOP_NAME = "
NXXX_NAME = "
F_OHNE_NAME = "
F001_NAME = "
PUT_NAME = "
FXXX_NAME = "
EXCEPTIONS
WRONG_POSITION_OF_SLASHES = 1 LDB_NAME_TOO_LONG = 2
IMPORTING Parameters details for LDB_CONVERT_LDBNAME_2_DBPROG
LDB_NAME - Name of Logical Database
Data type: RSLDB-LDBOptional: No
Call by Reference: No ( called with pass by value option)
FLAG_EXISTENCE_CHECK -
Data type: RSLDB-X_SAPDBOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LDB_CONVERT_LDBNAME_2_DBPROG
DB_NAME -
Data type: SY-LDBPGOptional: No
Call by Reference: No ( called with pass by value option)
SXXX_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
FLAG_LDB_EXISTENT -
Data type: RSLDB-X_SAPDBOptional: No
Call by Reference: No ( called with pass by value option)
WA_LDBD -
Data type: LDBDOptional: No
Call by Reference: No ( called with pass by value option)
SEL_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
COM_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
TOP_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
NXXX_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
F_OHNE_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
F001_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
PUT_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
FXXX_NAME -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_POSITION_OF_SLASHES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_NAME_TOO_LONG -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LDB_CONVERT_LDBNAME_2_DBPROG 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_db_name | TYPE SY-LDBPG, " | |||
| lv_ldb_name | TYPE RSLDB-LDB, " | |||
| lv_wrong_position_of_slashes | TYPE RSLDB, " | |||
| lv_sxxx_name | TYPE SY-REPID, " | |||
| lv_flag_ldb_existent | TYPE RSLDB-X_SAPDB, " | |||
| lv_wa_ldbd | TYPE LDBD, " | |||
| lv_sel_name | TYPE SY-REPID, " | |||
| lv_ldb_name_too_long | TYPE SY, " | |||
| lv_flag_existence_check | TYPE RSLDB-X_SAPDB, " | |||
| lv_com_name | TYPE SY-REPID, " | |||
| lv_top_name | TYPE SY-REPID, " | |||
| lv_nxxx_name | TYPE SY-REPID, " | |||
| lv_f_ohne_name | TYPE SY-REPID, " | |||
| lv_f001_name | TYPE SY-REPID, " | |||
| lv_put_name | TYPE SY-REPID, " | |||
| lv_fxxx_name | TYPE SY-REPID. " |
|   CALL FUNCTION 'LDB_CONVERT_LDBNAME_2_DBPROG' " |
| EXPORTING | ||
| LDB_NAME | = lv_ldb_name | |
| FLAG_EXISTENCE_CHECK | = lv_flag_existence_check | |
| IMPORTING | ||
| DB_NAME | = lv_db_name | |
| SXXX_NAME | = lv_sxxx_name | |
| FLAG_LDB_EXISTENT | = lv_flag_ldb_existent | |
| WA_LDBD | = lv_wa_ldbd | |
| SEL_NAME | = lv_sel_name | |
| COM_NAME | = lv_com_name | |
| TOP_NAME | = lv_top_name | |
| NXXX_NAME | = lv_nxxx_name | |
| F_OHNE_NAME | = lv_f_ohne_name | |
| F001_NAME | = lv_f001_name | |
| PUT_NAME | = lv_put_name | |
| FXXX_NAME | = lv_fxxx_name | |
| EXCEPTIONS | ||
| WRONG_POSITION_OF_SLASHES = 1 | ||
| LDB_NAME_TOO_LONG = 2 | ||
| . " LDB_CONVERT_LDBNAME_2_DBPROG | ||
ABAP code using 7.40 inline data declarations to call FM LDB_CONVERT_LDBNAME_2_DBPROG
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 LDBPG FROM SY INTO @DATA(ld_db_name). | ||||
| "SELECT single LDB FROM RSLDB INTO @DATA(ld_ldb_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_sxxx_name). | ||||
| "SELECT single X_SAPDB FROM RSLDB INTO @DATA(ld_flag_ldb_existent). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_sel_name). | ||||
| "SELECT single X_SAPDB FROM RSLDB INTO @DATA(ld_flag_existence_check). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_com_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_top_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_nxxx_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_f_ohne_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_f001_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_put_name). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_fxxx_name). | ||||
Search for further information about these or an SAP related objects