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

Function BDL_IMMEDIATE_SESSION_DATA 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_IMMEDIATE_SESSION_DATA'"create session, collect and send data immediately.
EXPORTING
SESSNO = "Character field 13 digits
CONTRACT = "Contract type
DESCR = "Session subtype
* FORCE = "Single-character flag
IMPORTING
SESSION_PLANNED = "Single-character flag
JOBNAME = "Background job name
JOBCOUNT = "Job ID
PING_PROBLEMS = "Status of object
EXCEPTIONS
BACKGROUNDJOB_FAILED = 1 DATA_INVALID = 2 UNKNOWN_SERVICE_TYPE = 3 INSERT_SESSION_FAILED = 4
IMPORTING Parameters details for BDL_IMMEDIATE_SESSION_DATA
SESSNO - Character field 13 digits
Data type: DSVAS_STAB-SESSNOOptional: No
Call by Reference: No ( called with pass by value option)
CONTRACT - Contract type
Data type: BDLSERVICE-CONTRACTOptional: No
Call by Reference: Yes
DESCR - Session subtype
Data type: BDLSERVICE-DESCROptional: No
Call by Reference: Yes
FORCE - Single-character flag
Data type: BDL_DATKEY-TYPEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for BDL_IMMEDIATE_SESSION_DATA
SESSION_PLANNED - Single-character flag
Data type: BDL_DATKEY-TYPEOptional: No
Call by Reference: Yes
JOBNAME - Background job name
Data type: TBTCO-JOBNAMEOptional: No
Call by Reference: Yes
JOBCOUNT - Job ID
Data type: TBTCO-JOBCOUNTOptional: No
Call by Reference: Yes
PING_PROBLEMS - Status of object
Data type: BDLSERVICE-STATUSOptional: No
Call by Reference: Yes
EXCEPTIONS details
BACKGROUNDJOB_FAILED -
Data type:Optional: No
Call by Reference: Yes
DATA_INVALID -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_SERVICE_TYPE -
Data type:Optional: No
Call by Reference: Yes
INSERT_SESSION_FAILED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BDL_IMMEDIATE_SESSION_DATA 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_sessno | TYPE DSVAS_STAB-SESSNO, " | |||
| lv_session_planned | TYPE BDL_DATKEY-TYPE, " | |||
| lv_backgroundjob_failed | TYPE BDL_DATKEY, " | |||
| lv_jobname | TYPE TBTCO-JOBNAME, " | |||
| lv_contract | TYPE BDLSERVICE-CONTRACT, " | |||
| lv_data_invalid | TYPE BDLSERVICE, " | |||
| lv_descr | TYPE BDLSERVICE-DESCR, " | |||
| lv_jobcount | TYPE TBTCO-JOBCOUNT, " | |||
| lv_unknown_service_type | TYPE TBTCO, " | |||
| lv_force | TYPE BDL_DATKEY-TYPE, " | |||
| lv_ping_problems | TYPE BDLSERVICE-STATUS, " | |||
| lv_insert_session_failed | TYPE BDLSERVICE. " |
|   CALL FUNCTION 'BDL_IMMEDIATE_SESSION_DATA' "create session, collect and send data immediately |
| EXPORTING | ||
| SESSNO | = lv_sessno | |
| CONTRACT | = lv_contract | |
| DESCR | = lv_descr | |
| FORCE | = lv_force | |
| IMPORTING | ||
| SESSION_PLANNED | = lv_session_planned | |
| JOBNAME | = lv_jobname | |
| JOBCOUNT | = lv_jobcount | |
| PING_PROBLEMS | = lv_ping_problems | |
| EXCEPTIONS | ||
| BACKGROUNDJOB_FAILED = 1 | ||
| DATA_INVALID = 2 | ||
| UNKNOWN_SERVICE_TYPE = 3 | ||
| INSERT_SESSION_FAILED = 4 | ||
| . " BDL_IMMEDIATE_SESSION_DATA | ||
ABAP code using 7.40 inline data declarations to call FM BDL_IMMEDIATE_SESSION_DATA
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 SESSNO FROM DSVAS_STAB INTO @DATA(ld_sessno). | ||||
| "SELECT single TYPE FROM BDL_DATKEY INTO @DATA(ld_session_planned). | ||||
| "SELECT single JOBNAME FROM TBTCO INTO @DATA(ld_jobname). | ||||
| "SELECT single CONTRACT FROM BDLSERVICE INTO @DATA(ld_contract). | ||||
| "SELECT single DESCR FROM BDLSERVICE INTO @DATA(ld_descr). | ||||
| "SELECT single JOBCOUNT FROM TBTCO INTO @DATA(ld_jobcount). | ||||
| "SELECT single TYPE FROM BDL_DATKEY INTO @DATA(ld_force). | ||||
| "SELECT single STATUS FROM BDLSERVICE INTO @DATA(ld_ping_problems). | ||||
Search for further information about these or an SAP related objects