SAP LC_SAVE_DATA Function Module for









LC_SAVE_DATA is a standard lc save data 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 save data FM, simply by entering the name LC_SAVE_DATA into the relevant SAP transaction such as SE37 or SE38.

Function Group: SLCA
Program Name: SAPLSLCA
Main Program: SAPLSLCA
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function LC_SAVE_DATA 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_SAVE_DATA'"
EXPORTING
CON_NAME = "
MEDIA_NAME = "liveCache: Medium for Backup

IMPORTING
STATUS = "
EXITCODE = "

TABLES
DBMCLI_EXEC_PROTOCOL = "
ACTION_PROTOCOL = "

EXCEPTIONS
NO_PERMISSION = 1 SXPG_COMMAND_EXECUTE_ERROR = 2 DBMCLI_COMMAND_EXECUTE_ERROR = 3 UNKNOWN_CON_NAME = 4 EXECUTION_ERROR = 5 EMPTY_CON_ENV = 6 LC_GET_STATE_FAILED = 7 ERROR_LC_GET_STATE = 8 LC_NOT_IN_WARM_MODE = 9
.



IMPORTING Parameters details for LC_SAVE_DATA

CON_NAME -

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

MEDIA_NAME - liveCache: Medium for Backup

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

EXPORTING Parameters details for LC_SAVE_DATA

STATUS -

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

EXITCODE -

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

TABLES Parameters details for LC_SAVE_DATA

DBMCLI_EXEC_PROTOCOL -

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

ACTION_PROTOCOL -

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

EXCEPTIONS details

NO_PERMISSION -

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

SXPG_COMMAND_EXECUTE_ERROR -

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

DBMCLI_COMMAND_EXECUTE_ERROR -

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

UNKNOWN_CON_NAME -

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

EXECUTION_ERROR -

Data type:
Optional: No
Call by Reference: Yes

EMPTY_CON_ENV -

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

LC_GET_STATE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

ERROR_LC_GET_STATE -

Data type:
Optional: No
Call by Reference: Yes

LC_NOT_IN_WARM_MODE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for LC_SAVE_DATA 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_status  TYPE EXTCMDEXEX-STATUS, "   
lv_con_name  TYPE DBCON-CON_NAME, "   
lv_no_permission  TYPE DBCON, "   
lt_dbmcli_exec_protocol  TYPE STANDARD TABLE OF BTCXPM, "   
lv_exitcode  TYPE EXTCMDEXEX-EXITCODE, "   
lv_media_name  TYPE LVC_MEDIA, "   
lt_action_protocol  TYPE STANDARD TABLE OF LVC_APROT, "   
lv_sxpg_command_execute_error  TYPE LVC_APROT, "   
lv_dbmcli_command_execute_error  TYPE LVC_APROT, "   
lv_unknown_con_name  TYPE LVC_APROT, "   
lv_execution_error  TYPE LVC_APROT, "   
lv_empty_con_env  TYPE LVC_APROT, "   
lv_lc_get_state_failed  TYPE LVC_APROT, "   
lv_error_lc_get_state  TYPE LVC_APROT, "   
lv_lc_not_in_warm_mode  TYPE LVC_APROT. "   

  CALL FUNCTION 'LC_SAVE_DATA'  "
    EXPORTING
         CON_NAME = lv_con_name
         MEDIA_NAME = lv_media_name
    IMPORTING
         STATUS = lv_status
         EXITCODE = lv_exitcode
    TABLES
         DBMCLI_EXEC_PROTOCOL = lt_dbmcli_exec_protocol
         ACTION_PROTOCOL = lt_action_protocol
    EXCEPTIONS
        NO_PERMISSION = 1
        SXPG_COMMAND_EXECUTE_ERROR = 2
        DBMCLI_COMMAND_EXECUTE_ERROR = 3
        UNKNOWN_CON_NAME = 4
        EXECUTION_ERROR = 5
        EMPTY_CON_ENV = 6
        LC_GET_STATE_FAILED = 7
        ERROR_LC_GET_STATE = 8
        LC_NOT_IN_WARM_MODE = 9
. " LC_SAVE_DATA




ABAP code using 7.40 inline data declarations to call FM LC_SAVE_DATA

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 STATUS FROM EXTCMDEXEX INTO @DATA(ld_status).
 
"SELECT single CON_NAME FROM DBCON INTO @DATA(ld_con_name).
 
 
 
"SELECT single EXITCODE FROM EXTCMDEXEX INTO @DATA(ld_exitcode).
 
 
 
 
 
 
 
 
 
 
 


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!