SAP Function Modules

SWL_WL_USER_CONTEXT_QUERY SAP Function module







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

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


Pattern for FM SWL_WL_USER_CONTEXT_QUERY - SWL WL USER CONTEXT QUERY





CALL FUNCTION 'SWL_WL_USER_CONTEXT_QUERY' "
* EXPORTING
*   user = SY-UNAME             " sy-uname
*   buffered_access = 'X'       " swd_data-xfeld
  IMPORTING
    number_of_entries =         " twfs-s_cnt
* TABLES
*   current_wl_user_context =   " twfs
*   actual_inbox_view =         " hrwfuser_v
    .  "  SWL_WL_USER_CONTEXT_QUERY

ABAP code example for Function Module SWL_WL_USER_CONTEXT_QUERY





The ABAP code below is a full code listing to execute function module SWL_WL_USER_CONTEXT_QUERY 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_number_of_entries  TYPE TWFS-S_CNT ,
it_current_wl_user_context  TYPE STANDARD TABLE OF TWFS,"TABLES PARAM
wa_current_wl_user_context  LIKE LINE OF it_current_wl_user_context ,
it_actual_inbox_view  TYPE STANDARD TABLE OF HRWFUSER_V,"TABLES PARAM
wa_actual_inbox_view  LIKE LINE OF it_actual_inbox_view .

DATA(ld_user) = 'some text here'.

DATA(ld_buffered_access) = some text here

"populate fields of struture and append to itab
append wa_current_wl_user_context to it_current_wl_user_context.

"populate fields of struture and append to itab
append wa_actual_inbox_view to it_actual_inbox_view. . CALL FUNCTION 'SWL_WL_USER_CONTEXT_QUERY' * EXPORTING * user = ld_user * buffered_access = ld_buffered_access IMPORTING number_of_entries = ld_number_of_entries * TABLES * current_wl_user_context = it_current_wl_user_context * actual_inbox_view = it_actual_inbox_view . " SWL_WL_USER_CONTEXT_QUERY
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_number_of_entries  TYPE TWFS-S_CNT ,
ld_user  TYPE SY-UNAME ,
it_current_wl_user_context  TYPE STANDARD TABLE OF TWFS ,
wa_current_wl_user_context  LIKE LINE OF it_current_wl_user_context,
ld_buffered_access  TYPE SWD_DATA-XFELD ,
it_actual_inbox_view  TYPE STANDARD TABLE OF HRWFUSER_V ,
wa_actual_inbox_view  LIKE LINE OF it_actual_inbox_view.

ld_user = 'some text here'.

"populate fields of struture and append to itab
append wa_current_wl_user_context to it_current_wl_user_context.

ld_buffered_access = some text here

"populate fields of struture and append to itab
append wa_actual_inbox_view to it_actual_inbox_view.

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 SWL_WL_USER_CONTEXT_QUERY or its description.