SAP EWW_WORKFLOW_START Function Module for NOTRANSL: INTERN: Startet einen Workflow
EWW_WORKFLOW_START is a standard eww workflow start SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: INTERN: Startet einen Workflow processing and below is the pattern details for this FM, 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 eww workflow start FM, simply by entering the name EWW_WORKFLOW_START into the relevant SAP transaction such as SE37 or SE38.
Function Group: EWW1
Program Name: SAPLEWW1
Main Program: SAPLEWW1
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EWW_WORKFLOW_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 'EWW_WORKFLOW_START'"NOTRANSL: INTERN: Startet einen Workflow.
EXPORTING
X_TASK = "Task ID
* X_START_DATE = NO_DATE "Requested Start Date for Work Item
* X_START_TIME = NO_TIME "Requested start time for work item
IMPORTING
Y_WORKFLOW_ID = "Work item ID
TABLES
* X_CONTAINER = "Instance Structure
* X_AGENTS = "Rule Resolution Result
EXCEPTIONS
INVALID_TASK = 1 NO_ACTIVE_PLVAR = 2 START_FAILED = 3 GENERAL_ERROR = 4
IMPORTING Parameters details for EWW_WORKFLOW_START
X_TASK - Task ID
Data type: SWWWIHEAD-WI_RH_TASKOptional: No
Call by Reference: No ( called with pass by value option)
X_START_DATE - Requested Start Date for Work Item
Data type: SWWWIDEADL-WI_DSDDefault: NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_START_TIME - Requested start time for work item
Data type: SWWWIDEADL-WI_DSTDefault: NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EWW_WORKFLOW_START
Y_WORKFLOW_ID - Work item ID
Data type: SWWWIHEAD-WI_IDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EWW_WORKFLOW_START
X_CONTAINER - Instance Structure
Data type: SWCONTOptional: Yes
Call by Reference: No ( called with pass by value option)
X_AGENTS - Rule Resolution Result
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_TASK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ACTIVE_PLVAR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
START_FAILED - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EWW_WORKFLOW_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_x_task | TYPE SWWWIHEAD-WI_RH_TASK, " | |||
| lt_x_container | TYPE STANDARD TABLE OF SWCONT, " | |||
| lv_invalid_task | TYPE SWCONT, " | |||
| lv_y_workflow_id | TYPE SWWWIHEAD-WI_ID, " | |||
| lt_x_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_x_start_date | TYPE SWWWIDEADL-WI_DSD, " NO_DATE | |||
| lv_no_active_plvar | TYPE SWWWIDEADL, " | |||
| lv_start_failed | TYPE SWWWIDEADL, " | |||
| lv_x_start_time | TYPE SWWWIDEADL-WI_DST, " NO_TIME | |||
| lv_general_error | TYPE SWWWIDEADL. " |
|   CALL FUNCTION 'EWW_WORKFLOW_START' "NOTRANSL: INTERN: Startet einen Workflow |
| EXPORTING | ||
| X_TASK | = lv_x_task | |
| X_START_DATE | = lv_x_start_date | |
| X_START_TIME | = lv_x_start_time | |
| IMPORTING | ||
| Y_WORKFLOW_ID | = lv_y_workflow_id | |
| TABLES | ||
| X_CONTAINER | = lt_x_container | |
| X_AGENTS | = lt_x_agents | |
| EXCEPTIONS | ||
| INVALID_TASK = 1 | ||
| NO_ACTIVE_PLVAR = 2 | ||
| START_FAILED = 3 | ||
| GENERAL_ERROR = 4 | ||
| . " EWW_WORKFLOW_START | ||
ABAP code using 7.40 inline data declarations to call FM EWW_WORKFLOW_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_RH_TASK FROM SWWWIHEAD INTO @DATA(ld_x_task). | ||||
| "SELECT single WI_ID FROM SWWWIHEAD INTO @DATA(ld_y_workflow_id). | ||||
| "SELECT single WI_DSD FROM SWWWIDEADL INTO @DATA(ld_x_start_date). | ||||
| DATA(ld_x_start_date) | = NO_DATE. | |||
| "SELECT single WI_DST FROM SWWWIDEADL INTO @DATA(ld_x_start_time). | ||||
| DATA(ld_x_start_time) | = NO_TIME. | |||
Search for further information about these or an SAP related objects