SAP Function Modules

SWW_WI_WITHOUT_WLC_EXECUTE SAP Function module







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

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


Pattern for FM SWW_WI_WITHOUT_WLC_EXECUTE - SWW WI WITHOUT WLC EXECUTE





CALL FUNCTION 'SWW_WI_WITHOUT_WLC_EXECUTE' "
  EXPORTING
    wi_id =                     " swwwihead-wi_id  Work item ID
*   wi_header =                 " swwwihead     Header data of work item
*   do_commit = 'X'             " swwcommit-commitflag  Indicator for Control of Commit Logic
*   debug_flag = SPACE          " swwcommit-syncflag
*   no_callback_on_completion = SPACE  " swwcommit-compflag  Indicator Showing Whether Callback Called Upon Completion
*   executed_by_user = SY-UNAME  " sy-uname     User Who Executed the WI
*   executed_by_address = SPACE  " swwaddrkey
*   called_in_background = SPACE  " swwcommit-dialogflag  Indicator Showing Whether FM Called in Background
*   wi_execution_type = SPACE   " rhwf_meth-class
  IMPORTING
    return =                    " swotreturn    Return code from call of object method
    swf_return =                " swf_return    Workflow: Method Exception
    wi_result =                 " swwwires      Return Codes from WIM
* TABLES
*   wi_container =              " swcont
*   return_codes =              " swp_return
*   om_bind_def =               " swabindef
*   method_exec_list =          " swwmethods
* CHANGING
*   wi_container_handle =       " if_swf_cnt_container
  EXCEPTIONS
    EXECUTION_FAILED = 1        "               Execution of work item failed
    INVALID_STATUS = 2          "
    .  "  SWW_WI_WITHOUT_WLC_EXECUTE

ABAP code example for Function Module SWW_WI_WITHOUT_WLC_EXECUTE





The ABAP code below is a full code listing to execute function module SWW_WI_WITHOUT_WLC_EXECUTE 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_return  TYPE SWOTRETURN ,
ld_swf_return  TYPE SWF_RETURN ,
ld_wi_result  TYPE SWWWIRES ,
it_wi_container  TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM
wa_wi_container  LIKE LINE OF it_wi_container ,
it_return_codes  TYPE STANDARD TABLE OF SWP_RETURN,"TABLES PARAM
wa_return_codes  LIKE LINE OF it_return_codes ,
it_om_bind_def  TYPE STANDARD TABLE OF SWABINDEF,"TABLES PARAM
wa_om_bind_def  LIKE LINE OF it_om_bind_def ,
it_method_exec_list  TYPE STANDARD TABLE OF SWWMETHODS,"TABLES PARAM
wa_method_exec_list  LIKE LINE OF it_method_exec_list .

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

SELECT single WI_ID
FROM SWWWIHEAD
INTO @DATA(ld_wi_id).

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

DATA(ld_do_commit) = some text here

DATA(ld_debug_flag) = some text here

DATA(ld_no_callback_on_completion) = some text here
DATA(ld_executed_by_user) = 'some text here'.
DATA(ld_executed_by_address) = 'some text here'.

DATA(ld_called_in_background) = some text here

DATA(ld_wi_execution_type) = some text here

"populate fields of struture and append to itab
append wa_wi_container to it_wi_container.

"populate fields of struture and append to itab
append wa_return_codes to it_return_codes.

"populate fields of struture and append to itab
append wa_om_bind_def to it_om_bind_def.

"populate fields of struture and append to itab
append wa_method_exec_list to it_method_exec_list. . CALL FUNCTION 'SWW_WI_WITHOUT_WLC_EXECUTE' EXPORTING wi_id = ld_wi_id * wi_header = ld_wi_header * do_commit = ld_do_commit * debug_flag = ld_debug_flag * no_callback_on_completion = ld_no_callback_on_completion * executed_by_user = ld_executed_by_user * executed_by_address = ld_executed_by_address * called_in_background = ld_called_in_background * wi_execution_type = ld_wi_execution_type IMPORTING return = ld_return swf_return = ld_swf_return wi_result = ld_wi_result * TABLES * wi_container = it_wi_container * return_codes = it_return_codes * om_bind_def = it_om_bind_def * method_exec_list = it_method_exec_list * CHANGING * wi_container_handle = ld_wi_container_handle EXCEPTIONS EXECUTION_FAILED = 1 INVALID_STATUS = 2 . " SWW_WI_WITHOUT_WLC_EXECUTE
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 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_wi_container_handle  TYPE IF_SWF_CNT_CONTAINER ,
ld_return  TYPE SWOTRETURN ,
ld_wi_id  TYPE SWWWIHEAD-WI_ID ,
it_wi_container  TYPE STANDARD TABLE OF SWCONT ,
wa_wi_container  LIKE LINE OF it_wi_container,
ld_swf_return  TYPE SWF_RETURN ,
ld_wi_header  TYPE SWWWIHEAD ,
it_return_codes  TYPE STANDARD TABLE OF SWP_RETURN ,
wa_return_codes  LIKE LINE OF it_return_codes,
ld_wi_result  TYPE SWWWIRES ,
ld_do_commit  TYPE SWWCOMMIT-COMMITFLAG ,
it_om_bind_def  TYPE STANDARD TABLE OF SWABINDEF ,
wa_om_bind_def  LIKE LINE OF it_om_bind_def,
ld_debug_flag  TYPE SWWCOMMIT-SYNCFLAG ,
it_method_exec_list  TYPE STANDARD TABLE OF SWWMETHODS ,
wa_method_exec_list  LIKE LINE OF it_method_exec_list,
ld_no_callback_on_completion  TYPE SWWCOMMIT-COMPFLAG ,
ld_executed_by_user  TYPE SY-UNAME ,
ld_executed_by_address  TYPE SWWADDRKEY ,
ld_called_in_background  TYPE SWWCOMMIT-DIALOGFLAG ,
ld_wi_execution_type  TYPE RHWF_METH-CLASS .

ld_wi_container_handle = 'some text here'.

SELECT single WI_ID
FROM SWWWIHEAD
INTO ld_wi_id.


"populate fields of struture and append to itab
append wa_wi_container to it_wi_container.
ld_wi_header = 'some text here'.

"populate fields of struture and append to itab
append wa_return_codes to it_return_codes.

ld_do_commit = some text here

"populate fields of struture and append to itab
append wa_om_bind_def to it_om_bind_def.

ld_debug_flag = some text here

"populate fields of struture and append to itab
append wa_method_exec_list to it_method_exec_list.

ld_no_callback_on_completion = some text here
ld_executed_by_user = 'some text here'.
ld_executed_by_address = 'some text here'.

ld_called_in_background = some text here

ld_wi_execution_type = 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 SWW_WI_WITHOUT_WLC_EXECUTE or its description.