SAP Function Modules

IW_C_CONTEXT_SET SAP Function module







IW_C_CONTEXT_SET 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 IW_C_CONTEXT_SET into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM IW_C_CONTEXT_SET - IW C CONTEXT SET





CALL FUNCTION 'IW_C_CONTEXT_SET' "
* EXPORTING
*   language =                  " sy-langu
*   country =                   " t005-land1
*   industry =                  " iwextend-id
*   source_language =           " sy-langu
*   target_language =           " sy-langu
*   release =                   " iwextend-rel
*   task = SPACE                " sdokr3llst-task_name
*   structure_class =           " sdokobject-class  Document Class
*   structure_objid =           " sdokobject-objid
*   folder_id =                 " sdokobject-objid
*   refresh_context = SPACE     " c
*   try_other_lang = SPACE      " iwparams-flag
*   try_other_industry = SPACE  " iwparams-flag
*   try_other_country = SPACE   " iwparams-flag
*   ignore_init_vers = SPACE    " iwparams-flag
*   accept_del_obj = SPACE      " iwparams-flag
*   iwb_state = SPACE           " sdokpropty-value
  TABLES
    context =                   " sdokpropty
    .  "  IW_C_CONTEXT_SET

ABAP code example for Function Module IW_C_CONTEXT_SET





The ABAP code below is a full code listing to execute function module IW_C_CONTEXT_SET 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:
it_context  TYPE STANDARD TABLE OF SDOKPROPTY,"TABLES PARAM
wa_context  LIKE LINE OF it_context .

DATA(ld_language) = 'Check type of data required'.

SELECT single LAND1
FROM T005
INTO @DATA(ld_country).


SELECT single ID
FROM IWEXTEND
INTO @DATA(ld_industry).

DATA(ld_source_language) = 'Check type of data required'.
DATA(ld_target_language) = 'Check type of data required'.

SELECT single REL
FROM IWEXTEND
INTO @DATA(ld_release).


DATA(ld_task) = some text here

DATA(ld_structure_class) = some text here

DATA(ld_structure_objid) = some text here

DATA(ld_folder_id) = some text here
DATA(ld_refresh_context) = 'Check type of data required'.

DATA(ld_try_other_lang) = some text here

DATA(ld_try_other_industry) = some text here

DATA(ld_try_other_country) = some text here

DATA(ld_ignore_init_vers) = some text here

DATA(ld_accept_del_obj) = some text here

DATA(ld_iwb_state) = some text here

"populate fields of struture and append to itab
append wa_context to it_context. . CALL FUNCTION 'IW_C_CONTEXT_SET' * EXPORTING * language = ld_language * country = ld_country * industry = ld_industry * source_language = ld_source_language * target_language = ld_target_language * release = ld_release * task = ld_task * structure_class = ld_structure_class * structure_objid = ld_structure_objid * folder_id = ld_folder_id * refresh_context = ld_refresh_context * try_other_lang = ld_try_other_lang * try_other_industry = ld_try_other_industry * try_other_country = ld_try_other_country * ignore_init_vers = ld_ignore_init_vers * accept_del_obj = ld_accept_del_obj * iwb_state = ld_iwb_state TABLES context = it_context . " IW_C_CONTEXT_SET
IF SY-SUBRC EQ 0. "All OK 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_language  TYPE SY-LANGU ,
it_context  TYPE STANDARD TABLE OF SDOKPROPTY ,
wa_context  LIKE LINE OF it_context,
ld_country  TYPE T005-LAND1 ,
ld_industry  TYPE IWEXTEND-ID ,
ld_source_language  TYPE SY-LANGU ,
ld_target_language  TYPE SY-LANGU ,
ld_release  TYPE IWEXTEND-REL ,
ld_task  TYPE SDOKR3LLST-TASK_NAME ,
ld_structure_class  TYPE SDOKOBJECT-CLASS ,
ld_structure_objid  TYPE SDOKOBJECT-OBJID ,
ld_folder_id  TYPE SDOKOBJECT-OBJID ,
ld_refresh_context  TYPE C ,
ld_try_other_lang  TYPE IWPARAMS-FLAG ,
ld_try_other_industry  TYPE IWPARAMS-FLAG ,
ld_try_other_country  TYPE IWPARAMS-FLAG ,
ld_ignore_init_vers  TYPE IWPARAMS-FLAG ,
ld_accept_del_obj  TYPE IWPARAMS-FLAG ,
ld_iwb_state  TYPE SDOKPROPTY-VALUE .

ld_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_context to it_context.

SELECT single LAND1
FROM T005
INTO ld_country.


SELECT single ID
FROM IWEXTEND
INTO ld_industry.

ld_source_language = 'Check type of data required'.
ld_target_language = 'Check type of data required'.

SELECT single REL
FROM IWEXTEND
INTO ld_release.


ld_task = some text here

ld_structure_class = some text here

ld_structure_objid = some text here

ld_folder_id = some text here
ld_refresh_context = 'Check type of data required'.

ld_try_other_lang = some text here

ld_try_other_industry = some text here

ld_try_other_country = some text here

ld_ignore_init_vers = some text here

ld_accept_del_obj = some text here

ld_iwb_state = 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 IW_C_CONTEXT_SET or its description.