SAP BDL_GET_SESSION_INFO Function Module for Read session information









BDL_GET_SESSION_INFO is a standard bdl get session info SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read session information 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 get session info FM, simply by entering the name BDL_GET_SESSION_INFO 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): Remote-Enabled
Update:



Function BDL_GET_SESSION_INFO 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_GET_SESSION_INFO'"Read session information
EXPORTING
INSTNO = "Installation number
SYSID = "System ID of SAP customer system
LIKEY = "R/3 license key
* DATE_FROM = SY-DATUM "Session date
DATE_TO = "Session date

IMPORTING
RFCERR_HOST = "Character field, length 32
RFCERR_SID = "R/3 System, name of R/3 System
RFCERR_MSG = "Character 100

TABLES
SESSIONS = "Information for a Service session

EXCEPTIONS
UNKNOWN_INSTALLATION = 1 INSTALLATION_LICENSE_MISMATCH = 2 NO_SESSION_DATABASE_FOUND = 3 RFC_SYSERROR = 4 RFC_COMMERROR = 5
.



IMPORTING Parameters details for BDL_GET_SESSION_INFO

INSTNO - Installation number

Data type: BDLSESRQ-INSTNO
Optional: No
Call by Reference: No ( called with pass by value option)

SYSID - System ID of SAP customer system

Data type: BDLSESRQ-SYSID
Optional: No
Call by Reference: No ( called with pass by value option)

LIKEY - R/3 license key

Data type: BDLSESRQ-LIKEY
Optional: No
Call by Reference: No ( called with pass by value option)

DATE_FROM - Session date

Data type: BDLSESRQ-DATE_FROM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_TO - Session date

Data type: BDLSESRQ-DATE_TO
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BDL_GET_SESSION_INFO

RFCERR_HOST - Character field, length 32

Data type: BDLDTOC-HOST
Optional: No
Call by Reference: No ( called with pass by value option)

RFCERR_SID - R/3 System, name of R/3 System

Data type: BDLDTOC-SID
Optional: No
Call by Reference: No ( called with pass by value option)

RFCERR_MSG - Character 100

Data type: BDLMSGLOG-TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BDL_GET_SESSION_INFO

SESSIONS - Information for a Service session

Data type: BDLSEINF
Optional: No
Call by Reference: Yes

EXCEPTIONS details

UNKNOWN_INSTALLATION -

Data type:
Optional: No
Call by Reference: Yes

INSTALLATION_LICENSE_MISMATCH -

Data type:
Optional: No
Call by Reference: Yes

NO_SESSION_DATABASE_FOUND -

Data type:
Optional: No
Call by Reference: Yes

RFC_SYSERROR -

Data type:
Optional: No
Call by Reference: Yes

RFC_COMMERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BDL_GET_SESSION_INFO 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_instno  TYPE BDLSESRQ-INSTNO, "   
lt_sessions  TYPE STANDARD TABLE OF BDLSEINF, "   
lv_rfcerr_host  TYPE BDLDTOC-HOST, "   
lv_unknown_installation  TYPE BDLDTOC, "   
lv_sysid  TYPE BDLSESRQ-SYSID, "   
lv_rfcerr_sid  TYPE BDLDTOC-SID, "   
lv_installation_license_mismatch  TYPE BDLDTOC, "   
lv_likey  TYPE BDLSESRQ-LIKEY, "   
lv_rfcerr_msg  TYPE BDLMSGLOG-TEXT, "   
lv_no_session_database_found  TYPE BDLMSGLOG, "   
lv_date_from  TYPE BDLSESRQ-DATE_FROM, "   SY-DATUM
lv_rfc_syserror  TYPE BDLSESRQ, "   
lv_date_to  TYPE BDLSESRQ-DATE_TO, "   
lv_rfc_commerror  TYPE BDLSESRQ. "   

  CALL FUNCTION 'BDL_GET_SESSION_INFO'  "Read session information
    EXPORTING
         INSTNO = lv_instno
         SYSID = lv_sysid
         LIKEY = lv_likey
         DATE_FROM = lv_date_from
         DATE_TO = lv_date_to
    IMPORTING
         RFCERR_HOST = lv_rfcerr_host
         RFCERR_SID = lv_rfcerr_sid
         RFCERR_MSG = lv_rfcerr_msg
    TABLES
         SESSIONS = lt_sessions
    EXCEPTIONS
        UNKNOWN_INSTALLATION = 1
        INSTALLATION_LICENSE_MISMATCH = 2
        NO_SESSION_DATABASE_FOUND = 3
        RFC_SYSERROR = 4
        RFC_COMMERROR = 5
. " BDL_GET_SESSION_INFO




ABAP code using 7.40 inline data declarations to call FM BDL_GET_SESSION_INFO

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 INSTNO FROM BDLSESRQ INTO @DATA(ld_instno).
 
 
"SELECT single HOST FROM BDLDTOC INTO @DATA(ld_rfcerr_host).
 
 
"SELECT single SYSID FROM BDLSESRQ INTO @DATA(ld_sysid).
 
"SELECT single SID FROM BDLDTOC INTO @DATA(ld_rfcerr_sid).
 
 
"SELECT single LIKEY FROM BDLSESRQ INTO @DATA(ld_likey).
 
"SELECT single TEXT FROM BDLMSGLOG INTO @DATA(ld_rfcerr_msg).
 
 
"SELECT single DATE_FROM FROM BDLSESRQ INTO @DATA(ld_date_from).
DATA(ld_date_from) = SY-DATUM.
 
 
"SELECT single DATE_TO FROM BDLSESRQ INTO @DATA(ld_date_to).
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!