SAP BDL_DO_GENERATION Function Module for Do generation of one report per groupid
BDL_DO_GENERATION is a standard bdl do generation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Do generation of one report per groupid 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 bdl do generation FM, simply by entering the name BDL_DO_GENERATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: BDL3
Program Name: SAPLBDL3
Main Program: SAPLBDL3
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BDL_DO_GENERATION 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 'BDL_DO_GENERATION'"Do generation of one report per groupid.
EXPORTING
TH_INSTANCE = "
TH_INSTNO = "
TH_SERVER = "
SY_DATUM = "Date and time, current (application server) date
RCODE = "
SESSION = "
CONTEXT = "
SERVICETYPE = "
TABLES
TO_DO_LOGFUNCNAME = "
ADDON = "
EXCEPTIONS
CANCEL_JOB = 1
IMPORTING Parameters details for BDL_DO_GENERATION
TH_INSTANCE -
Data type: MSXXLIST-NAMEOptional: No
Call by Reference: No ( called with pass by value option)
TH_INSTNO -
Data type: MSXXLIST-SERVOptional: No
Call by Reference: No ( called with pass by value option)
TH_SERVER -
Data type: MSXXLIST-HOSTOptional: No
Call by Reference: No ( called with pass by value option)
SY_DATUM - Date and time, current (application server) date
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
RCODE -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
SESSION -
Data type: BDLDATKEYOptional: No
Call by Reference: No ( called with pass by value option)
CONTEXT -
Data type: BDLGROUPS-CONTEXTOptional: No
Call by Reference: No ( called with pass by value option)
SERVICETYPE -
Data type: BDLSERVICE-TYPEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BDL_DO_GENERATION
TO_DO_LOGFUNCNAME -
Data type: BDLFUGRPSOptional: No
Call by Reference: No ( called with pass by value option)
ADDON -
Data type: BDLADDONOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANCEL_JOB -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BDL_DO_GENERATION 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_cancel_job | TYPE STRING, " | |||
| lv_th_instance | TYPE MSXXLIST-NAME, " | |||
| lt_to_do_logfuncname | TYPE STANDARD TABLE OF BDLFUGRPS, " | |||
| lt_addon | TYPE STANDARD TABLE OF BDLADDON, " | |||
| lv_th_instno | TYPE MSXXLIST-SERV, " | |||
| lv_th_server | TYPE MSXXLIST-HOST, " | |||
| lv_sy_datum | TYPE SY-DATUM, " | |||
| lv_rcode | TYPE SY-SUBRC, " | |||
| lv_session | TYPE BDLDATKEY, " | |||
| lv_context | TYPE BDLGROUPS-CONTEXT, " | |||
| lv_servicetype | TYPE BDLSERVICE-TYPE. " |
|   CALL FUNCTION 'BDL_DO_GENERATION' "Do generation of one report per groupid |
| EXPORTING | ||
| TH_INSTANCE | = lv_th_instance | |
| TH_INSTNO | = lv_th_instno | |
| TH_SERVER | = lv_th_server | |
| SY_DATUM | = lv_sy_datum | |
| RCODE | = lv_rcode | |
| SESSION | = lv_session | |
| CONTEXT | = lv_context | |
| SERVICETYPE | = lv_servicetype | |
| TABLES | ||
| TO_DO_LOGFUNCNAME | = lt_to_do_logfuncname | |
| ADDON | = lt_addon | |
| EXCEPTIONS | ||
| CANCEL_JOB = 1 | ||
| . " BDL_DO_GENERATION | ||
ABAP code using 7.40 inline data declarations to call FM BDL_DO_GENERATION
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 NAME FROM MSXXLIST INTO @DATA(ld_th_instance). | ||||
| "SELECT single SERV FROM MSXXLIST INTO @DATA(ld_th_instno). | ||||
| "SELECT single HOST FROM MSXXLIST INTO @DATA(ld_th_server). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_sy_datum). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_rcode). | ||||
| "SELECT single CONTEXT FROM BDLGROUPS INTO @DATA(ld_context). | ||||
| "SELECT single TYPE FROM BDLSERVICE INTO @DATA(ld_servicetype). | ||||
Search for further information about these or an SAP related objects