SAP LC_GET_INSTANCE_STATE Function Module for
LC_GET_INSTANCE_STATE is a standard lc get instance 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 lc get instance state FM, simply by entering the name LC_GET_INSTANCE_STATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SLCA
Program Name: SAPLSLCA
Main Program: SAPLSLCA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function LC_GET_INSTANCE_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 'LC_GET_INSTANCE_STATE'".
EXPORTING
CON_NAME = "
KERNELVERSION_LONG = "Char 15
IMPORTING
EV_STATE = "
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 = "General Flag
EV_LOG_FULL = "General Flag
TABLES
ACTION_PROTOCOL = "Structure for Action Log for LiveCache Administration
EXCEPTIONS
NO_PERMISSION = 1 DBMCLI_COMMAND_EXECUTE_ERROR = 2 LC_GET_STATE_FAILED = 3
IMPORTING Parameters details for LC_GET_INSTANCE_STATE
CON_NAME -
Data type: DBCON-CON_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
KERNELVERSION_LONG - Char 15
Data type: CHAR15Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LC_GET_INSTANCE_STATE
EV_STATE -
Data type: LVC_INFO-STATEOptional: No
Call by Reference: No ( called with pass by value option)
EV_ENABLED -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
EV_RESTART_DATE - Date and Time, Current (Application Server) Date
Data type: SYDATUMOptional: No
Call by Reference: No ( called with pass by value option)
EV_RESTART_TIME - Date and Time, Current Application Server Time
Data type: SYUZEITOptional: No
Call by Reference: No ( called with pass by value option)
EV_DB_FULL - General Flag
Data type: FLAGOptional: No
Call by Reference: No ( called with pass by value option)
EV_LOG_FULL - General Flag
Data type: FLAGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for LC_GET_INSTANCE_STATE
ACTION_PROTOCOL - Structure for Action Log for LiveCache Administration
Data type: LVC_APROTOptional: No
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
Copy and paste ABAP code example for LC_GET_INSTANCE_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_con_name | TYPE DBCON-CON_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_enabled | TYPE I, " | |||
| lv_kernelversion_long | TYPE CHAR15, " | |||
| lv_dbmcli_command_execute_error | TYPE CHAR15, " | |||
| lv_ev_restart_date | TYPE SYDATUM, " | |||
| lv_lc_get_state_failed | TYPE SYDATUM, " | |||
| lv_ev_restart_time | TYPE SYUZEIT, " | |||
| lv_ev_db_full | TYPE FLAG, " | |||
| lv_ev_log_full | TYPE FLAG. " |
|   CALL FUNCTION 'LC_GET_INSTANCE_STATE' " |
| EXPORTING | ||
| CON_NAME | = lv_con_name | |
| KERNELVERSION_LONG | = lv_kernelversion_long | |
| IMPORTING | ||
| EV_STATE | = lv_ev_state | |
| 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 | |
| TABLES | ||
| ACTION_PROTOCOL | = lt_action_protocol | |
| EXCEPTIONS | ||
| NO_PERMISSION = 1 | ||
| DBMCLI_COMMAND_EXECUTE_ERROR = 2 | ||
| LC_GET_STATE_FAILED = 3 | ||
| . " LC_GET_INSTANCE_STATE | ||
ABAP code using 7.40 inline data declarations to call FM LC_GET_INSTANCE_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_con_name). | ||||
| "SELECT single STATE FROM LVC_INFO INTO @DATA(ld_ev_state). | ||||
Search for further information about these or an SAP related objects