SAP SWW_WI_START Function Module for
SWW_WI_START is a standard sww wi start 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 FM, simply by entering the name SWW_WI_START 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 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'".
EXPORTING
* CALLBACK_FB = ' ' "FM for Completed WI Feedback
* LANGUAGE = SY-LANGU "Language of WI (for Importing Texts)
* LATEST_END_ACTION = SWFCO_WI_DEF_DH_ACT "Action on Latest End
* LATEST_END_DATE = SWFCO_NO_DATE "Latest End Date
* LATEST_END_ESCALATION = SWFCO_NO_ESC "Interval After Which Latest End Action Repeated
* LATEST_END_TIME = SWFCO_NO_TIME "Latest End Time
* LATEST_START_ACTION = SWFCO_WI_DEF_DH_ACT "Action on Latest Start
* LATEST_START_DATE = SWFCO_NO_DATE "Latest Start Date
* LATEST_START_TIME = SWFCO_NO_TIME "Latest Start Time
* MAX_EVENT_COUNT = SWFCO_DEF_MAX_EVT_CNT "Maximum Number of Events To Be Received
* PRIORITY = SWFCO_NO_PRIO "Priority of WI
* CHECKED_WI = SWFCO_NO_ID "ID of Associated WI (Only for Types D and N)
TASK = "Associated Task ID According to Task Catalog
* WORKITEM_TYPE = ' ' "Work Item Type
* DO_COMMIT = 'X' "Indicator for Control of Commit Logic
* DO_SYNC_CALLBACK = ' ' "Indicator for Control of Synchronous Callback
* TEXT = ' ' "Display Text for WI
* DO_SYNC_WI_CHAIN = ' ' "Indicator Showing Whether WI in Synchronous Processing Chain
* CREATED_BY_USER = SY-UNAME "User Who Created the WI
* CREATED_BY_ADDRESS = ' ' "Address That Created the WI
* CALLED_IN_BACKGROUND = ' ' "Indicator Showing Whether FM Called in Background
* STEP_MODELED_WI_DISPLAY = ' ' "Flag Showing Whether WI Display in WLC from Step Definition
* CONFIRM = ' ' "Indicator Showing Whether End of Processing Is To Be Confirmed
* NO_DEADLINE_PARAMETERS = ' ' "Indicator for Whether Deadline Data Was Passed
* RESTRICTED_LOG = ' ' "Indicator Showing Whether Selective Logging Is Switched On
* SECONDS_UNTIL_TIMEOUT = "Number of Seconds Until Timeout
* CREATE_EVENT = ' ' "Indicator Denoting Whether Event CREATED Is To Be Triggered
* STATUS_EVENT = ' ' "Indicator Denoting Whether STATUS_CHANGED Is To Be Triggered
* XML_PROTOCOL = "Settings for XML Data Transfer
* WLC_FLAGS = "Field for Packed WLC Indicators
* START_PROPERTIES = "Possible Properties of a Workflow Definition
* DEBUG_FLAG = ' ' "
* TRACE_FLAG = ' ' "
CREATOR = "WI Creator
* WI_CONTAINER_HANDLE = "Container
* START_ASYNCHRONOUS = ' ' "Start Workflow Asynchronously
* DESIRED_END_ACTION = SWFCO_WI_DEF_DH_ACT "Action on Requested End
* DESIRED_END_DATE = SWFCO_NO_DATE "Requested End Date
* DESIRED_END_TIME = SWFCO_NO_TIME "Requested End Time
* DESIRED_START_DATE = SWFCO_NO_DATE "Requested Start Date
* DESIRED_START_TIME = SWFCO_NO_TIME "Requested Start Time
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
NEW_STATUS = "Workflow interfaces: Work item status
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
* COMP_EVENTS = "List of Terminating Events
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
CALLBACK_FB - FM for Completed WI Feedback
Data type: SWWWIHEAD-WI_CBFBDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language of WI (for Importing Texts)
Data type: SWWWIHEAD-WI_LANGDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_END_ACTION - Action on Latest End
Data type: SWW_LEACTDefault: SWFCO_WI_DEF_DH_ACT
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_END_DATE - Latest End Date
Data type: SWW_LEDDefault: SWFCO_NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_END_ESCALATION - Interval After Which Latest End Action Repeated
Data type: SWW_LEESCDefault: SWFCO_NO_ESC
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_END_TIME - Latest End Time
Data type: SWW_LETDefault: SWFCO_NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_START_ACTION - Action on Latest Start
Data type: SWW_LSACTDefault: SWFCO_WI_DEF_DH_ACT
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_START_DATE - Latest Start Date
Data type: SWW_LSDDefault: SWFCO_NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_START_TIME - Latest Start Time
Data type: SWW_LSTDefault: SWFCO_NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAX_EVENT_COUNT - Maximum Number of Events To Be Received
Data type: SWWEI-MAX_COUNTDefault: SWFCO_DEF_MAX_EVT_CNT
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRIORITY - Priority of WI
Data type: SWWWIHEAD-WI_PRIODefault: SWFCO_NO_PRIO
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECKED_WI - ID of Associated WI (Only for Types D and N)
Data type: SWWWIHEAD-WI_CHCKWIDefault: SWFCO_NO_ID
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_TASKOptional: No
Call by Reference: No ( called with pass by value option)
WORKITEM_TYPE - Work Item Type
Data type: SWWWIHEAD-WI_TYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DO_COMMIT - Indicator for Control of Commit Logic
Data type: SWWCOMMIT-COMMITFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DO_SYNC_CALLBACK - Indicator for Control of Synchronous Callback
Data type: SWWCOMMIT-SYNCFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT - Display Text for WI
Data type: SWWWIHEAD-WI_TEXTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DO_SYNC_WI_CHAIN - Indicator Showing Whether WI in Synchronous Processing Chain
Data type: SWWWIHEAD-SYNCCHAINDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CREATED_BY_USER - User Who Created the WI
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
CREATED_BY_ADDRESS - Address That Created the WI
Data type: SWWADDRKEYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLED_IN_BACKGROUND - Indicator Showing Whether FM Called in Background
Data type: SWWCOMMIT-DIALOGFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STEP_MODELED_WI_DISPLAY - Flag Showing Whether WI Display in WLC from Step Definition
Data type: SWWWIHEAD-WLC_DISPLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONFIRM - Indicator Showing Whether End of Processing Is To Be Confirmed
Data type: SWWWIHEAD-WI_CONFIRMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_DEADLINE_PARAMETERS - Indicator for Whether Deadline Data Was Passed
Data type: SWWCOMMIT-DEADLCKFLGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RESTRICTED_LOG - Indicator Showing Whether Selective Logging Is Switched On
Data type: SWWWIHEAD-WI_RESTLOGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SECONDS_UNTIL_TIMEOUT - Number of Seconds Until Timeout
Data type: SWWWIHEAD-TIMEOUTOptional: Yes
Call by Reference: No ( called with pass by value option)
CREATE_EVENT - Indicator Denoting Whether Event CREATED Is To Be Triggered
Data type: SWWCOMMIT-EVENTFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS_EVENT - Indicator Denoting Whether STATUS_CHANGED Is To Be Triggered
Data type: SWWWIHEAD-STATUS_EVTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XML_PROTOCOL - Settings for XML Data Transfer
Data type: SWD_PROTCLOptional: Yes
Call by Reference: No ( called with pass by value option)
WLC_FLAGS - Field for Packed WLC Indicators
Data type: SWWWIHEAD-WLC_FLAGSOptional: Yes
Call by Reference: No ( called with pass by value option)
START_PROPERTIES - Possible Properties of a Workflow Definition
Data type: SWW_PROPSOptional: Yes
Call by Reference: No ( called with pass by value option)
DEBUG_FLAG -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRACE_FLAG -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CREATOR - WI Creator
Data type: SWWWIHEAD-WI_CREATOROptional: No
Call by Reference: No ( called with pass by value option)
WI_CONTAINER_HANDLE - Container
Data type: IF_SWF_CNT_CONTAINEROptional: Yes
Call by Reference: No ( called with pass by value option)
START_ASYNCHRONOUS - Start Workflow Asynchronously
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_END_ACTION - Action on Requested End
Data type: SWW_DEACTDefault: SWFCO_WI_DEF_DH_ACT
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_END_DATE - Requested End Date
Data type: SWW_DEDDefault: SWFCO_NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_END_TIME - Requested End Time
Data type: SWW_DETDefault: SWFCO_NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_START_DATE - Requested Start Date
Data type: SWW_DSDDefault: SWFCO_NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_START_TIME - Requested Start Time
Data type: SWW_DSTDefault: SWFCO_NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWW_WI_START
WI_ID - ID of WI Created
Data type: SWWWIHEAD-WI_IDOptional: No
Call by Reference: No ( called with pass by value option)
WI_HEADER - Header Data of WI Created
Data type: SWWWIHEADOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Data from Method Execution
Data type: SWOTRETURNOptional: No
Call by Reference: No ( called with pass by value option)
WI_RESULT - Return Data from WIM/WFM
Data type: SWWWIRESOptional: No
Call by Reference: No ( called with pass by value option)
SWF_RETURN - Return Data from Method Execution
Data type: SWF_RETURNOptional: No
Call by Reference: No ( called with pass by value option)
NEW_STATUS - Workflow interfaces: Work item status
Data type: SWR_WISTATOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SWW_WI_START
AGENTS - Selected Agents for Work Item
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
DEADLINE_AGENTS - Agents For Latest End
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
DESIRED_END_AGENTS - Agents for Requested End
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
LATEST_START_AGENTS - Agents for Latest Start
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCLUDED_AGENTS - Excluded Agents for Work Item
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
NOTIFICATION_AGENTS - Agents for End Notification
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
SECONDARY_METHODS - Object Methods To Be Called Additionally
Data type: SWWMETHODSOptional: Yes
Call by Reference: Yes
WI_CONTAINER - Data Container of Work Item
Data type: SWCONTOptional: Yes
Call by Reference: Yes
COMP_EVENTS - List of Terminating Events
Data type: SWWCOMPEVTOptional: Yes
Call by Reference: No ( called with pass by value option)
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 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_callback_fb | TYPE SWWWIHEAD-WI_CBFB, " SPACE | |||
| lv_id_not_created | TYPE SWWWIHEAD, " | |||
| lv_language | TYPE SWWWIHEAD-WI_LANG, " SY-LANGU | |||
| lv_latest_end_action | TYPE SWW_LEACT, " SWFCO_WI_DEF_DH_ACT | |||
| lv_latest_end_date | TYPE SWW_LED, " SWFCO_NO_DATE | |||
| lv_latest_end_escalation | TYPE SWW_LEESC, " SWFCO_NO_ESC | |||
| lv_latest_end_time | TYPE SWW_LET, " SWFCO_NO_TIME | |||
| lv_latest_start_action | TYPE SWW_LSACT, " SWFCO_WI_DEF_DH_ACT | |||
| lv_latest_start_date | TYPE SWW_LSD, " SWFCO_NO_DATE | |||
| lv_latest_start_time | TYPE SWW_LST, " SWFCO_NO_TIME | |||
| lv_max_event_count | TYPE SWWEI-MAX_COUNT, " SWFCO_DEF_MAX_EVT_CNT | |||
| lv_priority | TYPE SWWWIHEAD-WI_PRIO, " SWFCO_NO_PRIO | |||
| lv_wi_header | TYPE SWWWIHEAD, " | |||
| lv_checked_wi | TYPE SWWWIHEAD-WI_CHCKWI, " SWFCO_NO_ID | |||
| lv_read_failed | TYPE SWWWIHEAD, " | |||
| lt_deadline_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_task | TYPE SWWWIHEAD-WI_RH_TASK, " | |||
| lv_workitem_type | TYPE SWWWIHEAD-WI_TYPE, " SPACE | |||
| lv_do_commit | TYPE SWWCOMMIT-COMMITFLAG, " 'X' | |||
| lv_do_sync_callback | TYPE SWWCOMMIT-SYNCFLAG, " SPACE | |||
| lv_text | TYPE SWWWIHEAD-WI_TEXT, " SPACE | |||
| lv_do_sync_wi_chain | TYPE SWWWIHEAD-SYNCCHAIN, " SPACE | |||
| lv_created_by_user | TYPE SY-UNAME, " SY-UNAME | |||
| lv_created_by_address | TYPE SWWADDRKEY, " SPACE | |||
| lv_called_in_background | TYPE SWWCOMMIT-DIALOGFLAG, " SPACE | |||
| lv_step_modeled_wi_display | TYPE SWWWIHEAD-WLC_DISPL, " SPACE | |||
| lv_return | TYPE SWOTRETURN, " | |||
| lv_confirm | TYPE SWWWIHEAD-WI_CONFIRM, " SPACE | |||
| lt_desired_end_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_immediate_start_not_possible | TYPE SWHACTOR, " | |||
| lv_no_deadline_parameters | TYPE SWWCOMMIT-DEADLCKFLG, " SPACE | |||
| lv_restricted_log | TYPE SWWWIHEAD-WI_RESTLOG, " SPACE | |||
| lv_seconds_until_timeout | TYPE SWWWIHEAD-TIMEOUT, " | |||
| lv_create_event | TYPE SWWCOMMIT-EVENTFLAG, " SPACE | |||
| lv_status_event | TYPE SWWWIHEAD-STATUS_EVT, " SPACE | |||
| lv_xml_protocol | TYPE SWD_PROTCL, " | |||
| lv_wlc_flags | TYPE SWWWIHEAD-WLC_FLAGS, " | |||
| lv_start_properties | TYPE SWW_PROPS, " | |||
| lv_debug_flag | TYPE XFELD, " SPACE | |||
| lv_trace_flag | TYPE XFELD, " SPACE | |||
| lv_creator | TYPE SWWWIHEAD-WI_CREATOR, " | |||
| lv_wi_result | TYPE SWWWIRES, " | |||
| lv_execution_failed | TYPE SWWWIRES, " | |||
| lt_latest_start_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_wi_container_handle | TYPE IF_SWF_CNT_CONTAINER, " | |||
| lv_start_asynchronous | TYPE XFELD, " SPACE | |||
| lv_swf_return | TYPE SWF_RETURN, " | |||
| lv_invalid_status | TYPE SWF_RETURN, " | |||
| lt_excluded_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_desired_end_action | TYPE SWW_DEACT, " SWFCO_WI_DEF_DH_ACT | |||
| lv_new_status | TYPE SWR_WISTAT, " | |||
| lv_desired_end_date | TYPE SWW_DED, " SWFCO_NO_DATE | |||
| lt_notification_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_desired_end_time | TYPE SWW_DET, " SWFCO_NO_TIME | |||
| lt_secondary_methods | TYPE STANDARD TABLE OF SWWMETHODS, " | |||
| lt_wi_container | TYPE STANDARD TABLE OF SWCONT, " | |||
| lv_desired_start_date | TYPE SWW_DSD, " SWFCO_NO_DATE | |||
| lt_comp_events | TYPE STANDARD TABLE OF SWWCOMPEVT, " | |||
| lv_desired_start_time | TYPE SWW_DST. " SWFCO_NO_TIME |
|   CALL FUNCTION 'SWW_WI_START' " |
| EXPORTING | ||
| CALLBACK_FB | = lv_callback_fb | |
| LANGUAGE | = lv_language | |
| LATEST_END_ACTION | = lv_latest_end_action | |
| LATEST_END_DATE | = lv_latest_end_date | |
| LATEST_END_ESCALATION | = lv_latest_end_escalation | |
| LATEST_END_TIME | = lv_latest_end_time | |
| LATEST_START_ACTION | = lv_latest_start_action | |
| LATEST_START_DATE | = lv_latest_start_date | |
| LATEST_START_TIME | = lv_latest_start_time | |
| MAX_EVENT_COUNT | = lv_max_event_count | |
| PRIORITY | = lv_priority | |
| CHECKED_WI | = lv_checked_wi | |
| TASK | = lv_task | |
| WORKITEM_TYPE | = lv_workitem_type | |
| DO_COMMIT | = lv_do_commit | |
| DO_SYNC_CALLBACK | = lv_do_sync_callback | |
| TEXT | = lv_text | |
| DO_SYNC_WI_CHAIN | = lv_do_sync_wi_chain | |
| CREATED_BY_USER | = lv_created_by_user | |
| CREATED_BY_ADDRESS | = lv_created_by_address | |
| CALLED_IN_BACKGROUND | = lv_called_in_background | |
| STEP_MODELED_WI_DISPLAY | = lv_step_modeled_wi_display | |
| CONFIRM | = lv_confirm | |
| NO_DEADLINE_PARAMETERS | = lv_no_deadline_parameters | |
| RESTRICTED_LOG | = lv_restricted_log | |
| SECONDS_UNTIL_TIMEOUT | = lv_seconds_until_timeout | |
| CREATE_EVENT | = lv_create_event | |
| STATUS_EVENT | = lv_status_event | |
| XML_PROTOCOL | = lv_xml_protocol | |
| WLC_FLAGS | = lv_wlc_flags | |
| START_PROPERTIES | = lv_start_properties | |
| DEBUG_FLAG | = lv_debug_flag | |
| TRACE_FLAG | = lv_trace_flag | |
| CREATOR | = lv_creator | |
| WI_CONTAINER_HANDLE | = lv_wi_container_handle | |
| START_ASYNCHRONOUS | = lv_start_asynchronous | |
| DESIRED_END_ACTION | = lv_desired_end_action | |
| DESIRED_END_DATE | = lv_desired_end_date | |
| DESIRED_END_TIME | = lv_desired_end_time | |
| DESIRED_START_DATE | = lv_desired_start_date | |
| DESIRED_START_TIME | = lv_desired_start_time | |
| IMPORTING | ||
| WI_ID | = lv_wi_id | |
| WI_HEADER | = lv_wi_header | |
| RETURN | = lv_return | |
| WI_RESULT | = lv_wi_result | |
| SWF_RETURN | = lv_swf_return | |
| NEW_STATUS | = lv_new_status | |
| 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 | |
| COMP_EVENTS | = lt_comp_events | |
| EXCEPTIONS | ||
| ID_NOT_CREATED = 1 | ||
| READ_FAILED = 2 | ||
| IMMEDIATE_START_NOT_POSSIBLE = 3 | ||
| EXECUTION_FAILED = 4 | ||
| INVALID_STATUS = 5 | ||
| . " SWW_WI_START | ||
ABAP code using 7.40 inline data declarations to call FM SWW_WI_START
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_CBFB FROM SWWWIHEAD INTO @DATA(ld_callback_fb). | ||||
| DATA(ld_callback_fb) | = ' '. | |||
| "SELECT single WI_LANG FROM SWWWIHEAD INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| DATA(ld_latest_end_action) | = SWFCO_WI_DEF_DH_ACT. | |||
| DATA(ld_latest_end_date) | = SWFCO_NO_DATE. | |||
| DATA(ld_latest_end_escalation) | = SWFCO_NO_ESC. | |||
| DATA(ld_latest_end_time) | = SWFCO_NO_TIME. | |||
| DATA(ld_latest_start_action) | = SWFCO_WI_DEF_DH_ACT. | |||
| DATA(ld_latest_start_date) | = SWFCO_NO_DATE. | |||
| DATA(ld_latest_start_time) | = SWFCO_NO_TIME. | |||
| "SELECT single MAX_COUNT FROM SWWEI INTO @DATA(ld_max_event_count). | ||||
| DATA(ld_max_event_count) | = SWFCO_DEF_MAX_EVT_CNT. | |||
| "SELECT single WI_PRIO FROM SWWWIHEAD INTO @DATA(ld_priority). | ||||
| DATA(ld_priority) | = SWFCO_NO_PRIO. | |||
| "SELECT single WI_CHCKWI FROM SWWWIHEAD INTO @DATA(ld_checked_wi). | ||||
| DATA(ld_checked_wi) | = SWFCO_NO_ID. | |||
| "SELECT single WI_RH_TASK FROM SWWWIHEAD INTO @DATA(ld_task). | ||||
| "SELECT single WI_TYPE FROM SWWWIHEAD INTO @DATA(ld_workitem_type). | ||||
| DATA(ld_workitem_type) | = ' '. | |||
| "SELECT single COMMITFLAG FROM SWWCOMMIT INTO @DATA(ld_do_commit). | ||||
| DATA(ld_do_commit) | = 'X'. | |||
| "SELECT single SYNCFLAG FROM SWWCOMMIT INTO @DATA(ld_do_sync_callback). | ||||
| DATA(ld_do_sync_callback) | = ' '. | |||
| "SELECT single WI_TEXT FROM SWWWIHEAD INTO @DATA(ld_text). | ||||
| DATA(ld_text) | = ' '. | |||
| "SELECT single SYNCCHAIN FROM SWWWIHEAD INTO @DATA(ld_do_sync_wi_chain). | ||||
| DATA(ld_do_sync_wi_chain) | = ' '. | |||
| "SELECT single UNAME FROM SY INTO @DATA(ld_created_by_user). | ||||
| DATA(ld_created_by_user) | = SY-UNAME. | |||
| DATA(ld_created_by_address) | = ' '. | |||
| "SELECT single DIALOGFLAG FROM SWWCOMMIT INTO @DATA(ld_called_in_background). | ||||
| DATA(ld_called_in_background) | = ' '. | |||
| "SELECT single WLC_DISPL FROM SWWWIHEAD INTO @DATA(ld_step_modeled_wi_display). | ||||
| DATA(ld_step_modeled_wi_display) | = ' '. | |||
| "SELECT single WI_CONFIRM FROM SWWWIHEAD INTO @DATA(ld_confirm). | ||||
| DATA(ld_confirm) | = ' '. | |||
| "SELECT single DEADLCKFLG FROM SWWCOMMIT INTO @DATA(ld_no_deadline_parameters). | ||||
| DATA(ld_no_deadline_parameters) | = ' '. | |||
| "SELECT single WI_RESTLOG FROM SWWWIHEAD INTO @DATA(ld_restricted_log). | ||||
| DATA(ld_restricted_log) | = ' '. | |||
| "SELECT single TIMEOUT FROM SWWWIHEAD INTO @DATA(ld_seconds_until_timeout). | ||||
| "SELECT single EVENTFLAG FROM SWWCOMMIT INTO @DATA(ld_create_event). | ||||
| DATA(ld_create_event) | = ' '. | |||
| "SELECT single STATUS_EVT FROM SWWWIHEAD INTO @DATA(ld_status_event). | ||||
| DATA(ld_status_event) | = ' '. | |||
| "SELECT single WLC_FLAGS FROM SWWWIHEAD INTO @DATA(ld_wlc_flags). | ||||
| DATA(ld_debug_flag) | = ' '. | |||
| DATA(ld_trace_flag) | = ' '. | |||
| "SELECT single WI_CREATOR FROM SWWWIHEAD INTO @DATA(ld_creator). | ||||
| DATA(ld_start_asynchronous) | = ' '. | |||
| DATA(ld_desired_end_action) | = SWFCO_WI_DEF_DH_ACT. | |||
| DATA(ld_desired_end_date) | = SWFCO_NO_DATE. | |||
| DATA(ld_desired_end_time) | = SWFCO_NO_TIME. | |||
| DATA(ld_desired_start_date) | = SWFCO_NO_DATE. | |||
| DATA(ld_desired_start_time) | = SWFCO_NO_TIME. | |||
Search for further information about these or an SAP related objects