SAP Function Modules

K_WORKSPACE_COORDINATE SAP Function module







K_WORKSPACE_COORDINATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name K_WORKSPACE_COORDINATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: KKGL
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM K_WORKSPACE_COORDINATE - K WORKSPACE COORDINATE





CALL FUNCTION 'K_WORKSPACE_COORDINATE' "
  EXPORTING
    kokrs_imp =                 " kokrs
*   chg_share_to_imp = SPACE    " syuname
*   read_all_imp = SPACE        " xflag
*   save_all_imp = 'X'          " xflag
*   delete_all_imp = SPACE      " xflag
*   rename_folder_imp = SPACE   " xflag
*   add_all_imp = SPACE         " xflag
*   add_container_imp = SPACE   " xflag
*   container_2_folder_imp = SPACE  " xflag
*   folder_2_container_imp = SPACE  " xflag
*   flg_defaultco_may_be_used = 'X'  " xflag
*   message_on_screen = SPACE   " xflag
*   suppress_messages = SPACE   " xflag
  IMPORTING
    op_partially_failed_exp =   " xflag
  TABLES
    t_wsc_knotinfo_imp =        " wsknotinfo
*   t_wsc_knotinfo_exp =        " wsknotinfo
  EXCEPTIONS
    OP_FAILED = 1               "
    OP_FAILED_INTERNALCAUSE = 2  "
    NO_AUTHORIZATION_AT_ALL = 3  "
    .  "  K_WORKSPACE_COORDINATE

ABAP code example for Function Module K_WORKSPACE_COORDINATE





The ABAP code below is a full code listing to execute function module K_WORKSPACE_COORDINATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_op_partially_failed_exp  TYPE XFLAG ,
it_t_wsc_knotinfo_imp  TYPE STANDARD TABLE OF WSKNOTINFO,"TABLES PARAM
wa_t_wsc_knotinfo_imp  LIKE LINE OF it_t_wsc_knotinfo_imp ,
it_t_wsc_knotinfo_exp  TYPE STANDARD TABLE OF WSKNOTINFO,"TABLES PARAM
wa_t_wsc_knotinfo_exp  LIKE LINE OF it_t_wsc_knotinfo_exp .

DATA(ld_kokrs_imp) = 'Check type of data required'.
DATA(ld_chg_share_to_imp) = 'some text here'.
DATA(ld_read_all_imp) = 'some text here'.
DATA(ld_save_all_imp) = 'some text here'.
DATA(ld_delete_all_imp) = 'some text here'.
DATA(ld_rename_folder_imp) = 'some text here'.
DATA(ld_add_all_imp) = 'some text here'.
DATA(ld_add_container_imp) = 'some text here'.
DATA(ld_container_2_folder_imp) = 'some text here'.
DATA(ld_folder_2_container_imp) = 'some text here'.
DATA(ld_flg_defaultco_may_be_used) = 'some text here'.
DATA(ld_message_on_screen) = 'some text here'.
DATA(ld_suppress_messages) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_wsc_knotinfo_imp to it_t_wsc_knotinfo_imp.

"populate fields of struture and append to itab
append wa_t_wsc_knotinfo_exp to it_t_wsc_knotinfo_exp. . CALL FUNCTION 'K_WORKSPACE_COORDINATE' EXPORTING kokrs_imp = ld_kokrs_imp * chg_share_to_imp = ld_chg_share_to_imp * read_all_imp = ld_read_all_imp * save_all_imp = ld_save_all_imp * delete_all_imp = ld_delete_all_imp * rename_folder_imp = ld_rename_folder_imp * add_all_imp = ld_add_all_imp * add_container_imp = ld_add_container_imp * container_2_folder_imp = ld_container_2_folder_imp * folder_2_container_imp = ld_folder_2_container_imp * flg_defaultco_may_be_used = ld_flg_defaultco_may_be_used * message_on_screen = ld_message_on_screen * suppress_messages = ld_suppress_messages IMPORTING op_partially_failed_exp = ld_op_partially_failed_exp TABLES t_wsc_knotinfo_imp = it_t_wsc_knotinfo_imp * t_wsc_knotinfo_exp = it_t_wsc_knotinfo_exp EXCEPTIONS OP_FAILED = 1 OP_FAILED_INTERNALCAUSE = 2 NO_AUTHORIZATION_AT_ALL = 3 . " K_WORKSPACE_COORDINATE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_op_partially_failed_exp  TYPE XFLAG ,
ld_kokrs_imp  TYPE KOKRS ,
it_t_wsc_knotinfo_imp  TYPE STANDARD TABLE OF WSKNOTINFO ,
wa_t_wsc_knotinfo_imp  LIKE LINE OF it_t_wsc_knotinfo_imp,
ld_chg_share_to_imp  TYPE SYUNAME ,
it_t_wsc_knotinfo_exp  TYPE STANDARD TABLE OF WSKNOTINFO ,
wa_t_wsc_knotinfo_exp  LIKE LINE OF it_t_wsc_knotinfo_exp,
ld_read_all_imp  TYPE XFLAG ,
ld_save_all_imp  TYPE XFLAG ,
ld_delete_all_imp  TYPE XFLAG ,
ld_rename_folder_imp  TYPE XFLAG ,
ld_add_all_imp  TYPE XFLAG ,
ld_add_container_imp  TYPE XFLAG ,
ld_container_2_folder_imp  TYPE XFLAG ,
ld_folder_2_container_imp  TYPE XFLAG ,
ld_flg_defaultco_may_be_used  TYPE XFLAG ,
ld_message_on_screen  TYPE XFLAG ,
ld_suppress_messages  TYPE XFLAG .

ld_kokrs_imp = 'some text here'.

"populate fields of struture and append to itab
append wa_t_wsc_knotinfo_imp to it_t_wsc_knotinfo_imp.
ld_chg_share_to_imp = 'some text here'.

"populate fields of struture and append to itab
append wa_t_wsc_knotinfo_exp to it_t_wsc_knotinfo_exp.
ld_read_all_imp = 'some text here'.
ld_save_all_imp = 'some text here'.
ld_delete_all_imp = 'some text here'.
ld_rename_folder_imp = 'some text here'.
ld_add_all_imp = 'some text here'.
ld_add_container_imp = 'some text here'.
ld_container_2_folder_imp = 'some text here'.
ld_folder_2_container_imp = 'some text here'.
ld_flg_defaultco_may_be_used = 'some text here'.
ld_message_on_screen = 'some text here'.
ld_suppress_messages = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name K_WORKSPACE_COORDINATE or its description.