SAP Function Modules

BDL_IMMEDIATE_SESSION_DATA SAP Function module - create session, collect and send data immediately







BDL_IMMEDIATE_SESSION_DATA 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 BDL_IMMEDIATE_SESSION_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BDL3
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BDL_IMMEDIATE_SESSION_DATA - BDL IMMEDIATE SESSION DATA





CALL FUNCTION 'BDL_IMMEDIATE_SESSION_DATA' "create session, collect and send data immediately
  EXPORTING
    sessno =                    " dsvas_stab-sessno  Character field 13 digits
    contract =                  " bdlservice-contract  Contract type
    descr =                     " bdlservice-descr  Session subtype
*   force =                     " bdl_datkey-type  Single-character flag
  IMPORTING
    session_planned =           " bdl_datkey-type  Single-character flag
    jobname =                   " tbtco-jobname  Background job name
    jobcount =                  " tbtco-jobcount  Job ID
    ping_problems =             " bdlservice-status  Status of object
  EXCEPTIONS
    BACKGROUNDJOB_FAILED = 1    "
    DATA_INVALID = 2            "
    UNKNOWN_SERVICE_TYPE = 3    "
    INSERT_SESSION_FAILED = 4   "
    .  "  BDL_IMMEDIATE_SESSION_DATA

ABAP code example for Function Module BDL_IMMEDIATE_SESSION_DATA





The ABAP code below is a full code listing to execute function module BDL_IMMEDIATE_SESSION_DATA 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_session_planned  TYPE BDL_DATKEY-TYPE ,
ld_jobname  TYPE TBTCO-JOBNAME ,
ld_jobcount  TYPE TBTCO-JOBCOUNT ,
ld_ping_problems  TYPE BDLSERVICE-STATUS .


SELECT single SESSNO
FROM DSVAS_STAB
INTO @DATA(ld_sessno).


SELECT single CONTRACT
FROM BDLSERVICE
INTO @DATA(ld_contract).


SELECT single DESCR
FROM BDLSERVICE
INTO @DATA(ld_descr).


DATA(ld_force) = some text here . CALL FUNCTION 'BDL_IMMEDIATE_SESSION_DATA' EXPORTING sessno = ld_sessno contract = ld_contract descr = ld_descr * force = ld_force IMPORTING session_planned = ld_session_planned jobname = ld_jobname jobcount = ld_jobcount ping_problems = ld_ping_problems EXCEPTIONS BACKGROUNDJOB_FAILED = 1 DATA_INVALID = 2 UNKNOWN_SERVICE_TYPE = 3 INSERT_SESSION_FAILED = 4 . " BDL_IMMEDIATE_SESSION_DATA
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 ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_session_planned  TYPE BDL_DATKEY-TYPE ,
ld_sessno  TYPE DSVAS_STAB-SESSNO ,
ld_jobname  TYPE TBTCO-JOBNAME ,
ld_contract  TYPE BDLSERVICE-CONTRACT ,
ld_jobcount  TYPE TBTCO-JOBCOUNT ,
ld_descr  TYPE BDLSERVICE-DESCR ,
ld_ping_problems  TYPE BDLSERVICE-STATUS ,
ld_force  TYPE BDL_DATKEY-TYPE .


SELECT single SESSNO
FROM DSVAS_STAB
INTO ld_sessno.


SELECT single CONTRACT
FROM BDLSERVICE
INTO ld_contract.


SELECT single DESCR
FROM BDLSERVICE
INTO ld_descr.


ld_force = some text here

Contribute (Add Comments)

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 BDL_IMMEDIATE_SESSION_DATA or its description.