SAP K_WORKSPACE_SAVE Function Module for









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

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



Function K_WORKSPACE_SAVE 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 'K_WORKSPACE_SAVE'"
EXPORTING
KOKRS_IMP = "
* FLG_CREATENEWLY_SAVE = ' ' "
* MESSAGE_ON_SCREEN = ' ' "
* SUPPRESS_MESSAGES = ' ' "

IMPORTING
OP_PARTIALLY_FAILED_EXP = "

TABLES
T_WSSFOLDERS_CHG = "
T_WSSCONTENT_CHG = "

EXCEPTIONS
NO_AUTHORIZATION_AT_ALL = 1 CHECK_FAILED = 2 NO_FOLDERS_AVAILABLE = 3 SAVING_FAILED_COMPLETELY = 4
.



IMPORTING Parameters details for K_WORKSPACE_SAVE

KOKRS_IMP -

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

FLG_CREATENEWLY_SAVE -

Data type: XFLAG
Default: SPACE
Optional: Yes
Call by Reference: Yes

MESSAGE_ON_SCREEN -

Data type: XFLAG
Default: SPACE
Optional: Yes
Call by Reference: Yes

SUPPRESS_MESSAGES -

Data type: XFLAG
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for K_WORKSPACE_SAVE

OP_PARTIALLY_FAILED_EXP -

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

TABLES Parameters details for K_WORKSPACE_SAVE

T_WSSFOLDERS_CHG -

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

T_WSSCONTENT_CHG -

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

EXCEPTIONS details

NO_AUTHORIZATION_AT_ALL -

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

CHECK_FAILED -

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

NO_FOLDERS_AVAILABLE -

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

SAVING_FAILED_COMPLETELY -

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

Copy and paste ABAP code example for K_WORKSPACE_SAVE 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_kokrs_imp  TYPE KOKRS, "   
lt_t_wssfolders_chg  TYPE STANDARD TABLE OF WSFOLDERS, "   
lv_no_authorization_at_all  TYPE WSFOLDERS, "   
lv_op_partially_failed_exp  TYPE XFLAG, "   
lv_check_failed  TYPE XFLAG, "   
lt_t_wsscontent_chg  TYPE STANDARD TABLE OF WSCONTENT, "   
lv_flg_createnewly_save  TYPE XFLAG, "   SPACE
lv_message_on_screen  TYPE XFLAG, "   SPACE
lv_no_folders_available  TYPE XFLAG, "   
lv_suppress_messages  TYPE XFLAG, "   SPACE
lv_saving_failed_completely  TYPE XFLAG. "   

  CALL FUNCTION 'K_WORKSPACE_SAVE'  "
    EXPORTING
         KOKRS_IMP = lv_kokrs_imp
         FLG_CREATENEWLY_SAVE = lv_flg_createnewly_save
         MESSAGE_ON_SCREEN = lv_message_on_screen
         SUPPRESS_MESSAGES = lv_suppress_messages
    IMPORTING
         OP_PARTIALLY_FAILED_EXP = lv_op_partially_failed_exp
    TABLES
         T_WSSFOLDERS_CHG = lt_t_wssfolders_chg
         T_WSSCONTENT_CHG = lt_t_wsscontent_chg
    EXCEPTIONS
        NO_AUTHORIZATION_AT_ALL = 1
        CHECK_FAILED = 2
        NO_FOLDERS_AVAILABLE = 3
        SAVING_FAILED_COMPLETELY = 4
. " K_WORKSPACE_SAVE




ABAP code using 7.40 inline data declarations to call FM K_WORKSPACE_SAVE

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.

 
 
 
 
 
 
DATA(ld_flg_createnewly_save) = ' '.
 
DATA(ld_message_on_screen) = ' '.
 
 
DATA(ld_suppress_messages) = ' '.
 
 


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!