SAP SD_LDB_DATA_GET Function Module for NOTRANSL: SD-Reporting : Datenselektion
SD_LDB_DATA_GET is a standard sd ldb data get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: SD-Reporting : Datenselektion 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 sd ldb data get FM, simply by entering the name SD_LDB_DATA_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: V05T
Program Name: SAPLV05T
Main Program: SAPLV05T
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SD_LDB_DATA_GET 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 'SD_LDB_DATA_GET'"NOTRANSL: SD-Reporting : Datenselektion.
EXPORTING
LDBNAME = "
* VARIANT = "
* EXPRESSIONS = "
* FIELD_SELECTION = "
TABLES
CALLBACK = "
* SELECTIONS = "
EXCEPTIONS
LDB_NOT_REENTRANT = 1 FREE_SELECTIONS_ERROR = 10 CALLBACK_NO_EVENT = 11 CALLBACK_NODE_DUPLICATE = 12 LDB_INCORRECT = 2 LDB_ALREADY_RUNNING = 3 LDB_ERROR = 4 LDB_SELECTIONS_ERROR = 5 LDB_SELECTIONS_NOT_ACCEPTED = 6 VARIANT_NOT_EXISTENT = 7 VARIANT_OBSOLETE = 8 VARIANT_ERROR = 9
IMPORTING Parameters details for SD_LDB_DATA_GET
LDBNAME -
Data type: TRDIR-LDBNAMEOptional: No
Call by Reference: No ( called with pass by value option)
VARIANT -
Data type: SY-SLSETOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPRESSIONS -
Data type: RSDS_TEXPROptional: Yes
Call by Reference: No ( called with pass by value option)
FIELD_SELECTION -
Data type: RSFS_FIELDSOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_LDB_DATA_GET
CALLBACK -
Data type: LDBCBOptional: No
Call by Reference: No ( called with pass by value option)
SELECTIONS -
Data type: RSPARAMSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
LDB_NOT_REENTRANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FREE_SELECTIONS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CALLBACK_NO_EVENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CALLBACK_NODE_DUPLICATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_INCORRECT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_ALREADY_RUNNING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_SELECTIONS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LDB_SELECTIONS_NOT_ACCEPTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VARIANT_NOT_EXISTENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VARIANT_OBSOLETE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VARIANT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SD_LDB_DATA_GET 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_ldbname | TYPE TRDIR-LDBNAME, " | |||
| lt_callback | TYPE STANDARD TABLE OF LDBCB, " | |||
| lv_ldb_not_reentrant | TYPE LDBCB, " | |||
| lv_free_selections_error | TYPE LDBCB, " | |||
| lv_callback_no_event | TYPE LDBCB, " | |||
| lv_callback_node_duplicate | TYPE LDBCB, " | |||
| lv_variant | TYPE SY-SLSET, " | |||
| lt_selections | TYPE STANDARD TABLE OF RSPARAMS, " | |||
| lv_ldb_incorrect | TYPE RSPARAMS, " | |||
| lv_expressions | TYPE RSDS_TEXPR, " | |||
| lv_ldb_already_running | TYPE RSDS_TEXPR, " | |||
| lv_ldb_error | TYPE RSDS_TEXPR, " | |||
| lv_field_selection | TYPE RSFS_FIELDS, " | |||
| lv_ldb_selections_error | TYPE RSFS_FIELDS, " | |||
| lv_ldb_selections_not_accepted | TYPE RSFS_FIELDS, " | |||
| lv_variant_not_existent | TYPE RSFS_FIELDS, " | |||
| lv_variant_obsolete | TYPE RSFS_FIELDS, " | |||
| lv_variant_error | TYPE RSFS_FIELDS. " |
|   CALL FUNCTION 'SD_LDB_DATA_GET' "NOTRANSL: SD-Reporting : Datenselektion |
| EXPORTING | ||
| LDBNAME | = lv_ldbname | |
| VARIANT | = lv_variant | |
| EXPRESSIONS | = lv_expressions | |
| FIELD_SELECTION | = lv_field_selection | |
| TABLES | ||
| CALLBACK | = lt_callback | |
| SELECTIONS | = lt_selections | |
| EXCEPTIONS | ||
| LDB_NOT_REENTRANT = 1 | ||
| FREE_SELECTIONS_ERROR = 10 | ||
| CALLBACK_NO_EVENT = 11 | ||
| CALLBACK_NODE_DUPLICATE = 12 | ||
| LDB_INCORRECT = 2 | ||
| LDB_ALREADY_RUNNING = 3 | ||
| LDB_ERROR = 4 | ||
| LDB_SELECTIONS_ERROR = 5 | ||
| LDB_SELECTIONS_NOT_ACCEPTED = 6 | ||
| VARIANT_NOT_EXISTENT = 7 | ||
| VARIANT_OBSOLETE = 8 | ||
| VARIANT_ERROR = 9 | ||
| . " SD_LDB_DATA_GET | ||
ABAP code using 7.40 inline data declarations to call FM SD_LDB_DATA_GET
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 LDBNAME FROM TRDIR INTO @DATA(ld_ldbname). | ||||
| "SELECT single SLSET FROM SY INTO @DATA(ld_variant). | ||||
Search for further information about these or an SAP related objects