SAP GET_INSTANCE_STATE_SDB Function Module for









GET_INSTANCE_STATE_SDB is a standard get instance state sdb 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 get instance state sdb FM, simply by entering the name GET_INSTANCE_STATE_SDB into the relevant SAP transaction such as SE37 or SE38.

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



Function GET_INSTANCE_STATE_SDB 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 'GET_INSTANCE_STATE_SDB'"
EXPORTING
CON_NAME = "Logical Name for a Database Connection
* USE_DBMRFC = 'C' "
* DETERMINE_STATE = "
* DETERMINE_PROPERTIES = "
* DETERMINE_KERNELVERSION = "
* DETERMINE_DBMVERSION = "
* DETERMINE_INSTANCE_TYPE = "

IMPORTING
EV_STATE = "
EV_DBMSERVER_VERSION = "SAP DB: Response line from DBM command
EV_PLATFORM = "SAP DB: Response line from DBM command
EV_ENABLED = "
EV_RESTART_DATE = "Date and Time, Current (Application Server) Date
EV_RESTART_TIME = "Date and Time, Current Application Server Time
EV_DB_FULL = "
EV_LOG_FULL = "
EV_KERNELVERSION = "SAP DB: Response line from DBM command
EV_KERNELVERSION_LONG = "Text (15 characters)
EV_INSTANCE_TYPE = "SAP DB: Response line from DBM command

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

EXCEPTIONS
NO_PERMISSION = 1 DBMCLI_COMMAND_EXECUTE_ERROR = 2 LC_GET_STATE_FAILED = 3 FIND_KERNELVERSION_ERROR = 4 DBM_VERSION_ERROR = 5
.



IMPORTING Parameters details for GET_INSTANCE_STATE_SDB

CON_NAME - Logical Name for a Database Connection

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

USE_DBMRFC -

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

DETERMINE_STATE -

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

DETERMINE_PROPERTIES -

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

DETERMINE_KERNELVERSION -

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

DETERMINE_DBMVERSION -

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

DETERMINE_INSTANCE_TYPE -

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

EXPORTING Parameters details for GET_INSTANCE_STATE_SDB

EV_STATE -

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

EV_DBMSERVER_VERSION - SAP DB: Response line from DBM command

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

EV_PLATFORM - SAP DB: Response line from DBM command

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

EV_ENABLED -

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

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

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

EV_RESTART_TIME - Date and Time, Current Application Server Time

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

EV_DB_FULL -

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

EV_LOG_FULL -

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

EV_KERNELVERSION - SAP DB: Response line from DBM command

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

EV_KERNELVERSION_LONG - Text (15 characters)

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

EV_INSTANCE_TYPE - 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 GET_INSTANCE_STATE_SDB

ACTION_PROTOCOL - Structure for Action Log for LiveCache Administration

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

EXCEPTIONS details

NO_PERMISSION -

Data type:
Optional: No
Call by Reference: Yes

DBMCLI_COMMAND_EXECUTE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

LC_GET_STATE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

FIND_KERNELVERSION_ERROR -

Data type:
Optional: No
Call by Reference: Yes

DBM_VERSION_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GET_INSTANCE_STATE_SDB 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_con_name  TYPE DBCON_NAME, "   
lv_ev_state  TYPE LVC_INFO-STATE, "   
lv_no_permission  TYPE LVC_INFO, "   
lt_action_protocol  TYPE STANDARD TABLE OF LVC_APROT, "   
lv_ev_dbmserver_version  TYPE SDB_LINE, "   
lv_ev_platform  TYPE SDB_LINE, "   
lv_ev_enabled  TYPE I, "   
lv_use_dbmrfc  TYPE SDBUSRSET-USE_DBMRFC, "   'C'
lv_dbmcli_command_execute_error  TYPE SDBUSRSET, "   
lv_determine_state  TYPE FLAG, "   
lv_ev_restart_date  TYPE SYDATUM, "   
lv_lc_get_state_failed  TYPE SYDATUM, "   
lv_ev_restart_time  TYPE SYUZEIT, "   
lv_determine_properties  TYPE FLAG, "   
lv_find_kernelversion_error  TYPE FLAG, "   
lv_ev_db_full  TYPE FLAG, "   
lv_dbm_version_error  TYPE FLAG, "   
lv_determine_kernelversion  TYPE FLAG, "   
lv_ev_log_full  TYPE FLAG, "   
lv_determine_dbmversion  TYPE FLAG, "   
lv_ev_kernelversion  TYPE SDB_LINE, "   
lv_determine_instance_type  TYPE FLAG, "   
lv_ev_kernelversion_long  TYPE CHAR15, "   
lv_ev_instance_type  TYPE SDB_LINE. "   

  CALL FUNCTION 'GET_INSTANCE_STATE_SDB'  "
    EXPORTING
         CON_NAME = lv_con_name
         USE_DBMRFC = lv_use_dbmrfc
         DETERMINE_STATE = lv_determine_state
         DETERMINE_PROPERTIES = lv_determine_properties
         DETERMINE_KERNELVERSION = lv_determine_kernelversion
         DETERMINE_DBMVERSION = lv_determine_dbmversion
         DETERMINE_INSTANCE_TYPE = lv_determine_instance_type
    IMPORTING
         EV_STATE = lv_ev_state
         EV_DBMSERVER_VERSION = lv_ev_dbmserver_version
         EV_PLATFORM = lv_ev_platform
         EV_ENABLED = lv_ev_enabled
         EV_RESTART_DATE = lv_ev_restart_date
         EV_RESTART_TIME = lv_ev_restart_time
         EV_DB_FULL = lv_ev_db_full
         EV_LOG_FULL = lv_ev_log_full
         EV_KERNELVERSION = lv_ev_kernelversion
         EV_KERNELVERSION_LONG = lv_ev_kernelversion_long
         EV_INSTANCE_TYPE = lv_ev_instance_type
    TABLES
         ACTION_PROTOCOL = lt_action_protocol
    EXCEPTIONS
        NO_PERMISSION = 1
        DBMCLI_COMMAND_EXECUTE_ERROR = 2
        LC_GET_STATE_FAILED = 3
        FIND_KERNELVERSION_ERROR = 4
        DBM_VERSION_ERROR = 5
. " GET_INSTANCE_STATE_SDB




ABAP code using 7.40 inline data declarations to call FM GET_INSTANCE_STATE_SDB

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 STATE FROM LVC_INFO INTO @DATA(ld_ev_state).
 
 
 
 
 
 
"SELECT single USE_DBMRFC FROM SDBUSRSET INTO @DATA(ld_use_dbmrfc).
DATA(ld_use_dbmrfc) = 'C'.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!