SAP DBAN_GET_STATE Function Module for









DBAN_GET_STATE is a standard dban get state SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 dban get state FM, simply by entering the name DBAN_GET_STATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SADY
Program Name: SAPLSADY
Main Program: SAPLSADY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function DBAN_GET_STATE 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 'DBAN_GET_STATE'"
EXPORTING
* IV_CON_NAME = "Logical Name for a Database Connection
* IV_USE_DBMRFC = "SAP DB: DBMRFC Call Mode

IMPORTING
EV_STATE = "SAP DB: Response line from DBM command
EV_SESSION_ID = "SAP DB: Response line from DBM command
EV_START_DATE = "Date and Time, Current (Application Server) Date
EV_START_TIME = "Date and Time, Current Application Server Time
EV_DBNAME = "SAP DB: Response line from DBM command
EV_DBNODE = "SAP DB: Response line from DBM command
EV_RUNDIRECTORY = "SAP DB: Response line from DBM command
EV_CONFIGFILE = "SAP DB: Response line from DBM command
EV_PROTOCOLDIRECTORY = "SAP DB: Response line from DBM command
EV_INTERVAL = "SAP DB: Response line from DBM command
EV_RECONNECT = "SAP DB: Response line from DBM command
EV_PROCESS_ID = "SAP DB: Response line from DBM command

TABLES
* ET_RESULT = "Structure for Action Log for LiveCache Administration

EXCEPTIONS
DATABASE_NOT_RUNNING = 1 NO_PERMISSION = 2 DBM_COMMAND_EXECUTE_ERROR = 3 CONNECT_INFO_ERROR = 4
.



IMPORTING Parameters details for DBAN_GET_STATE

IV_CON_NAME - Logical Name for a Database Connection

Data type: DBCON-CON_NAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_USE_DBMRFC - SAP DB: DBMRFC Call Mode

Data type: SDBUSRSET-USE_DBMRFC
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DBAN_GET_STATE

EV_STATE - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_SESSION_ID - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_START_DATE - Date and Time, Current (Application Server) Date

Data type: SYDATUM
Optional: No
Call by Reference: No ( called with pass by value option)

EV_START_TIME - Date and Time, Current Application Server Time

Data type: SYUZEIT
Optional: No
Call by Reference: No ( called with pass by value option)

EV_DBNAME - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_DBNODE - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_RUNDIRECTORY - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_CONFIGFILE - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_PROTOCOLDIRECTORY - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_INTERVAL - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_RECONNECT - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

EV_PROCESS_ID - SAP DB: Response line from DBM command

Data type: SDB_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for DBAN_GET_STATE

ET_RESULT - Structure for Action Log for LiveCache Administration

Data type: SDB_ANSW
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

DATABASE_NOT_RUNNING -

Data type:
Optional: No
Call by Reference: Yes

NO_PERMISSION -

Data type:
Optional: No
Call by Reference: Yes

DBM_COMMAND_EXECUTE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

CONNECT_INFO_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for DBAN_GET_STATE 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_ev_state  TYPE SDB_LINE, "   
lt_et_result  TYPE STANDARD TABLE OF SDB_ANSW, "   
lv_iv_con_name  TYPE DBCON-CON_NAME, "   
lv_database_not_running  TYPE DBCON, "   
lv_ev_session_id  TYPE SDB_LINE, "   
lv_ev_start_date  TYPE SYDATUM, "   
lv_ev_start_time  TYPE SYUZEIT, "   
lv_ev_dbname  TYPE SDB_LINE, "   
lv_iv_use_dbmrfc  TYPE SDBUSRSET-USE_DBMRFC, "   
lv_no_permission  TYPE SDBUSRSET, "   
lv_ev_dbnode  TYPE SDB_LINE, "   
lv_dbm_command_execute_error  TYPE SDB_LINE, "   
lv_ev_rundirectory  TYPE SDB_LINE, "   
lv_connect_info_error  TYPE SDB_LINE, "   
lv_ev_configfile  TYPE SDB_LINE, "   
lv_ev_protocoldirectory  TYPE SDB_LINE, "   
lv_ev_interval  TYPE SDB_LINE, "   
lv_ev_reconnect  TYPE SDB_LINE, "   
lv_ev_process_id  TYPE SDB_LINE. "   

  CALL FUNCTION 'DBAN_GET_STATE'  "
    EXPORTING
         IV_CON_NAME = lv_iv_con_name
         IV_USE_DBMRFC = lv_iv_use_dbmrfc
    IMPORTING
         EV_STATE = lv_ev_state
         EV_SESSION_ID = lv_ev_session_id
         EV_START_DATE = lv_ev_start_date
         EV_START_TIME = lv_ev_start_time
         EV_DBNAME = lv_ev_dbname
         EV_DBNODE = lv_ev_dbnode
         EV_RUNDIRECTORY = lv_ev_rundirectory
         EV_CONFIGFILE = lv_ev_configfile
         EV_PROTOCOLDIRECTORY = lv_ev_protocoldirectory
         EV_INTERVAL = lv_ev_interval
         EV_RECONNECT = lv_ev_reconnect
         EV_PROCESS_ID = lv_ev_process_id
    TABLES
         ET_RESULT = lt_et_result
    EXCEPTIONS
        DATABASE_NOT_RUNNING = 1
        NO_PERMISSION = 2
        DBM_COMMAND_EXECUTE_ERROR = 3
        CONNECT_INFO_ERROR = 4
. " DBAN_GET_STATE




ABAP code using 7.40 inline data declarations to call FM DBAN_GET_STATE

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 CON_NAME FROM DBCON INTO @DATA(ld_iv_con_name).
 
 
 
 
 
 
"SELECT single USE_DBMRFC FROM SDBUSRSET INTO @DATA(ld_iv_use_dbmrfc).
 
 
 
 
 
 
 
 
 
 
 


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!