SAP IW_C_USER_CONTEXT_SET Function Module for









IW_C_USER_CONTEXT_SET is a standard iw c user context set 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 iw c user context set FM, simply by entering the name IW_C_USER_CONTEXT_SET into the relevant SAP transaction such as SE37 or SE38.

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



Function IW_C_USER_CONTEXT_SET 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 'IW_C_USER_CONTEXT_SET'"
EXPORTING
* USER = SY-UNAME "
* ENTRY_OBJECT = "
* FOLDER_TO_DELETE = "
* AREA = 'IWBHELP' "
* SUBAREA = 'IOM' "
* MODE = 'DOCU' "
* SRC_LANGUAGE = "
* TRG_LANGUAGE = "
* COUNTRY = "
* EXTENSION = "
* REL = "

TABLES
* CONTEXT = "
* FOLDERS_TO_INSERT = "
* FOLDERS_TO_DELETE = "
* PROPERTIES_TO_INSERT = "
* PROPERTIES_TO_DELETE = "
* MULTI_PROPS_TO_INSERT = "
* MULTI_PROPS_TO_DELETE = "
.



IMPORTING Parameters details for IW_C_USER_CONTEXT_SET

USER -

Data type: SY-UNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENTRY_OBJECT -

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

FOLDER_TO_DELETE -

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

AREA -

Data type: IW_AREA
Default: 'IWBHELP'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SUBAREA -

Data type: SY-UCOMM
Default: 'IOM'
Optional: Yes
Call by Reference: No ( called with pass by value option)

MODE -

Data type: IWBENTRY_S-WRK_MODE
Default: 'DOCU'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SRC_LANGUAGE -

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

TRG_LANGUAGE -

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

COUNTRY -

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

EXTENSION -

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

REL -

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

TABLES Parameters details for IW_C_USER_CONTEXT_SET

CONTEXT -

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

FOLDERS_TO_INSERT -

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

FOLDERS_TO_DELETE -

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

PROPERTIES_TO_INSERT -

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

PROPERTIES_TO_DELETE -

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

MULTI_PROPS_TO_INSERT -

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

MULTI_PROPS_TO_DELETE -

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

Copy and paste ABAP code example for IW_C_USER_CONTEXT_SET 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_user  TYPE SY-UNAME, "   SY-UNAME
lt_context  TYPE STANDARD TABLE OF SDOKPROPTY, "   
lv_entry_object  TYPE SDOKOBJECT, "   
lv_folder_to_delete  TYPE SDOKOBJECT, "   
lv_area  TYPE IW_AREA, "   'IWBHELP'
lt_folders_to_insert  TYPE STANDARD TABLE OF SDOKOBJECT, "   
lv_subarea  TYPE SY-UCOMM, "   'IOM'
lt_folders_to_delete  TYPE STANDARD TABLE OF SDOKOBJECT, "   
lv_mode  TYPE IWBENTRY_S-WRK_MODE, "   'DOCU'
lt_properties_to_insert  TYPE STANDARD TABLE OF IWBVALUE2, "   
lv_src_language  TYPE SY-LANGU, "   
lt_properties_to_delete  TYPE STANDARD TABLE OF SDOKPROPTN, "   
lv_trg_language  TYPE SY-LANGU, "   
lt_multi_props_to_insert  TYPE STANDARD TABLE OF IWBVALUE, "   
lv_country  TYPE T005-LAND1, "   
lt_multi_props_to_delete  TYPE STANDARD TABLE OF IWBVALUE, "   
lv_extension  TYPE IWEXTEND-ID, "   
lv_rel  TYPE IWEXTEND-REL. "   

  CALL FUNCTION 'IW_C_USER_CONTEXT_SET'  "
    EXPORTING
         USER = lv_user
         ENTRY_OBJECT = lv_entry_object
         FOLDER_TO_DELETE = lv_folder_to_delete
         AREA = lv_area
         SUBAREA = lv_subarea
         MODE = lv_mode
         SRC_LANGUAGE = lv_src_language
         TRG_LANGUAGE = lv_trg_language
         COUNTRY = lv_country
         EXTENSION = lv_extension
         REL = lv_rel
    TABLES
         CONTEXT = lt_context
         FOLDERS_TO_INSERT = lt_folders_to_insert
         FOLDERS_TO_DELETE = lt_folders_to_delete
         PROPERTIES_TO_INSERT = lt_properties_to_insert
         PROPERTIES_TO_DELETE = lt_properties_to_delete
         MULTI_PROPS_TO_INSERT = lt_multi_props_to_insert
         MULTI_PROPS_TO_DELETE = lt_multi_props_to_delete
. " IW_C_USER_CONTEXT_SET




ABAP code using 7.40 inline data declarations to call FM IW_C_USER_CONTEXT_SET

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 UNAME FROM SY INTO @DATA(ld_user).
DATA(ld_user) = SY-UNAME.
 
 
 
 
DATA(ld_area) = 'IWBHELP'.
 
 
"SELECT single UCOMM FROM SY INTO @DATA(ld_subarea).
DATA(ld_subarea) = 'IOM'.
 
 
"SELECT single WRK_MODE FROM IWBENTRY_S INTO @DATA(ld_mode).
DATA(ld_mode) = 'DOCU'.
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_src_language).
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_trg_language).
 
 
"SELECT single LAND1 FROM T005 INTO @DATA(ld_country).
 
 
"SELECT single ID FROM IWEXTEND INTO @DATA(ld_extension).
 
"SELECT single REL FROM IWEXTEND INTO @DATA(ld_rel).
 


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!