SAP SWW_WI_START_SIMPLE Function Module for









SWW_WI_START_SIMPLE is a standard sww wi start simple 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 sww wi start simple FM, simply by entering the name SWW_WI_START_SIMPLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWR_DEPRECATED_RUNTIME
Program Name: SAPLSWR_DEPRECATED_RUNTIME
Main Program: SAPLSWR_DEPRECATED_RUNTIME
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SWW_WI_START_SIMPLE 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 'SWW_WI_START_SIMPLE'"
EXPORTING
* CREATOR = ' ' "WI Creator
* PRIORITY = SWFCO_NO_PRIO "Priority of WI
TASK = "Associated Task ID According to Task Catalog
* CALLED_IN_BACKGROUND = ' ' "Indicator Showing Whether FM Called in Background
* DEADLINE_DATA = ' ' "Deadline Monitoring Data
* NO_DEADLINE_PARAMETERS = ' ' "Indicator Showing Whether Deadline Data Was Passed

IMPORTING
WI_ID = "ID of WI Created
WI_HEADER = "Header Data of WI Created
RETURN = "Return Data from Method Execution
WI_RESULT = "Return Data from WIM/WFM
SWF_RETURN = "Return Data from Method Execution

CHANGING
* WI_CONTAINER_HANDLE = "Container - Implementation of a 'Collection'

TABLES
AGENTS = "Selected Agents for Work Item
* DEADLINE_AGENTS = "Agents For Latest End
* DESIRED_END_AGENTS = "Agents for Requested End
* LATEST_START_AGENTS = "Agents for Latest Start
* EXCLUDED_AGENTS = "Excluded Agents for Work Item
* NOTIFICATION_AGENTS = "Agents for End Notification
* SECONDARY_METHODS = "Object Methods To Be Called Additionally
* WI_CONTAINER = "Data Container of Work Item

EXCEPTIONS
ID_NOT_CREATED = 1 READ_FAILED = 2 IMMEDIATE_START_NOT_POSSIBLE = 3 EXECUTION_FAILED = 4 INVALID_STATUS = 5
.



IMPORTING Parameters details for SWW_WI_START_SIMPLE

CREATOR - WI Creator

Data type: SWWWIHEAD-WI_CREATOR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PRIORITY - Priority of WI

Data type: SWWWIHEAD-WI_PRIO
Default: SWFCO_NO_PRIO
Optional: Yes
Call by Reference: No ( called with pass by value option)

TASK - Associated Task ID According to Task Catalog

Data type: SWWWIHEAD-WI_RH_TASK
Optional: No
Call by Reference: No ( called with pass by value option)

CALLED_IN_BACKGROUND - Indicator Showing Whether FM Called in Background

Data type: SWWCOMMIT-DIALOGFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DEADLINE_DATA - Deadline Monitoring Data

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

NO_DEADLINE_PARAMETERS - Indicator Showing Whether Deadline Data Was Passed

Data type: SWWCOMMIT-DEADLCKFLG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SWW_WI_START_SIMPLE

WI_ID - ID of WI Created

Data type: SWWWIHEAD-WI_ID
Optional: No
Call by Reference: No ( called with pass by value option)

WI_HEADER - Header Data of WI Created

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

RETURN - Return Data from Method Execution

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

WI_RESULT - Return Data from WIM/WFM

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

SWF_RETURN - Return Data from Method Execution

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

CHANGING Parameters details for SWW_WI_START_SIMPLE

WI_CONTAINER_HANDLE - Container - Implementation of a 'Collection'

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

TABLES Parameters details for SWW_WI_START_SIMPLE

AGENTS - Selected Agents for Work Item

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

DEADLINE_AGENTS - Agents For Latest End

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

DESIRED_END_AGENTS - Agents for Requested End

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

LATEST_START_AGENTS - Agents for Latest Start

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

EXCLUDED_AGENTS - Excluded Agents for Work Item

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

NOTIFICATION_AGENTS - Agents for End Notification

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

SECONDARY_METHODS - Object Methods To Be Called Additionally

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

WI_CONTAINER - Data Container of Work Item

Data type: SWCONT
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ID_NOT_CREATED - Work Item ID Cannot Be Created

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

READ_FAILED - Task Cannot Be Read

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

IMMEDIATE_START_NOT_POSSIBLE - Task Cannot Be Read

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

EXECUTION_FAILED - Work Item Cannot Be Started Immediately

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

INVALID_STATUS - Execution of Work Item Failed

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

Copy and paste ABAP code example for SWW_WI_START_SIMPLE 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_wi_id  TYPE SWWWIHEAD-WI_ID, "   
lt_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_creator  TYPE SWWWIHEAD-WI_CREATOR, "   SPACE
lv_id_not_created  TYPE SWWWIHEAD, "   
lv_wi_container_handle  TYPE IF_SWF_CNT_CONTAINER, "   
lv_priority  TYPE SWWWIHEAD-WI_PRIO, "   SWFCO_NO_PRIO
lv_wi_header  TYPE SWWWIHEAD, "   
lv_read_failed  TYPE SWWWIHEAD, "   
lt_deadline_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_task  TYPE SWWWIHEAD-WI_RH_TASK, "   
lv_return  TYPE SWOTRETURN, "   
lt_desired_end_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_immediate_start_not_possible  TYPE SWHACTOR, "   
lv_wi_result  TYPE SWWWIRES, "   
lv_execution_failed  TYPE SWWWIRES, "   
lt_latest_start_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_called_in_background  TYPE SWWCOMMIT-DIALOGFLAG, "   SPACE
lv_swf_return  TYPE SWF_RETURN, "   
lv_deadline_data  TYPE SWWDEADDAT, "   SPACE
lv_invalid_status  TYPE SWWDEADDAT, "   
lt_excluded_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lt_notification_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_no_deadline_parameters  TYPE SWWCOMMIT-DEADLCKFLG, "   SPACE
lt_secondary_methods  TYPE STANDARD TABLE OF SWWMETHODS, "   
lt_wi_container  TYPE STANDARD TABLE OF SWCONT. "   

  CALL FUNCTION 'SWW_WI_START_SIMPLE'  "
    EXPORTING
         CREATOR = lv_creator
         PRIORITY = lv_priority
         TASK = lv_task
         CALLED_IN_BACKGROUND = lv_called_in_background
         DEADLINE_DATA = lv_deadline_data
         NO_DEADLINE_PARAMETERS = lv_no_deadline_parameters
    IMPORTING
         WI_ID = lv_wi_id
         WI_HEADER = lv_wi_header
         RETURN = lv_return
         WI_RESULT = lv_wi_result
         SWF_RETURN = lv_swf_return
    CHANGING
         WI_CONTAINER_HANDLE = lv_wi_container_handle
    TABLES
         AGENTS = lt_agents
         DEADLINE_AGENTS = lt_deadline_agents
         DESIRED_END_AGENTS = lt_desired_end_agents
         LATEST_START_AGENTS = lt_latest_start_agents
         EXCLUDED_AGENTS = lt_excluded_agents
         NOTIFICATION_AGENTS = lt_notification_agents
         SECONDARY_METHODS = lt_secondary_methods
         WI_CONTAINER = lt_wi_container
    EXCEPTIONS
        ID_NOT_CREATED = 1
        READ_FAILED = 2
        IMMEDIATE_START_NOT_POSSIBLE = 3
        EXECUTION_FAILED = 4
        INVALID_STATUS = 5
. " SWW_WI_START_SIMPLE




ABAP code using 7.40 inline data declarations to call FM SWW_WI_START_SIMPLE

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 WI_ID FROM SWWWIHEAD INTO @DATA(ld_wi_id).
 
 
"SELECT single WI_CREATOR FROM SWWWIHEAD INTO @DATA(ld_creator).
DATA(ld_creator) = ' '.
 
 
 
"SELECT single WI_PRIO FROM SWWWIHEAD INTO @DATA(ld_priority).
DATA(ld_priority) = SWFCO_NO_PRIO.
 
 
 
 
"SELECT single WI_RH_TASK FROM SWWWIHEAD INTO @DATA(ld_task).
 
 
 
 
 
 
 
"SELECT single DIALOGFLAG FROM SWWCOMMIT INTO @DATA(ld_called_in_background).
DATA(ld_called_in_background) = ' '.
 
 
DATA(ld_deadline_data) = ' '.
 
 
 
 
"SELECT single DEADLCKFLG FROM SWWCOMMIT INTO @DATA(ld_no_deadline_parameters).
DATA(ld_no_deadline_parameters) = ' '.
 
 
 


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!