SAP Function Modules

EWW_WORKFLOW_START SAP Function module







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

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


Pattern for FM EWW_WORKFLOW_START - EWW WORKFLOW START





CALL FUNCTION 'EWW_WORKFLOW_START' "
  EXPORTING
    x_task =                    " swwwihead-wi_rh_task
*   x_start_date = NO_DATE      " swwwideadl-wi_dsd
*   x_start_time = NO_TIME      " swwwideadl-wi_dst
  IMPORTING
    y_workflow_id =             " swwwihead-wi_id
* TABLES
*   x_container =               " swcont
*   x_agents =                  " swhactor
  EXCEPTIONS
    INVALID_TASK = 1            "
    NO_ACTIVE_PLVAR = 2         "
    START_FAILED = 3            "
    GENERAL_ERROR = 4           "
    .  "  EWW_WORKFLOW_START

ABAP code example for Function Module EWW_WORKFLOW_START





The ABAP code below is a full code listing to execute function module EWW_WORKFLOW_START 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_y_workflow_id  TYPE SWWWIHEAD-WI_ID ,
it_x_container  TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM
wa_x_container  LIKE LINE OF it_x_container ,
it_x_agents  TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM
wa_x_agents  LIKE LINE OF it_x_agents .


SELECT single WI_RH_TASK
FROM SWWWIHEAD
INTO @DATA(ld_x_task).


SELECT single WI_DSD
FROM SWWWIDEADL
INTO @DATA(ld_x_start_date).


SELECT single WI_DST
FROM SWWWIDEADL
INTO @DATA(ld_x_start_time).


"populate fields of struture and append to itab
append wa_x_container to it_x_container.

"populate fields of struture and append to itab
append wa_x_agents to it_x_agents. . CALL FUNCTION 'EWW_WORKFLOW_START' EXPORTING x_task = ld_x_task * x_start_date = ld_x_start_date * x_start_time = ld_x_start_time IMPORTING y_workflow_id = ld_y_workflow_id * TABLES * x_container = it_x_container * x_agents = it_x_agents EXCEPTIONS INVALID_TASK = 1 NO_ACTIVE_PLVAR = 2 START_FAILED = 3 GENERAL_ERROR = 4 . " EWW_WORKFLOW_START
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "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_y_workflow_id  TYPE SWWWIHEAD-WI_ID ,
ld_x_task  TYPE SWWWIHEAD-WI_RH_TASK ,
it_x_container  TYPE STANDARD TABLE OF SWCONT ,
wa_x_container  LIKE LINE OF it_x_container,
ld_x_start_date  TYPE SWWWIDEADL-WI_DSD ,
it_x_agents  TYPE STANDARD TABLE OF SWHACTOR ,
wa_x_agents  LIKE LINE OF it_x_agents,
ld_x_start_time  TYPE SWWWIDEADL-WI_DST .


SELECT single WI_RH_TASK
FROM SWWWIHEAD
INTO ld_x_task.


"populate fields of struture and append to itab
append wa_x_container to it_x_container.

SELECT single WI_DSD
FROM SWWWIDEADL
INTO ld_x_start_date.


"populate fields of struture and append to itab
append wa_x_agents to it_x_agents.

SELECT single WI_DST
FROM SWWWIDEADL
INTO ld_x_start_time.

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