SAP Workflow Switch in Multiple Condition

SAP® has introduced new features in Business Workflow in the releases 6.20, NW04 and NW04s.

Before that you can read : Create Simple SAP Workflow Tutorial

This Tutorial introduces you to a new feature SWITCH provided in the step “Multiple Condition” of SAP® Workflow. It is assumed that the reader of this Tutorial has already some knowledge in Business Workflow and has worked on “Multiple Condition” step earlier. The SWITCH feature in the step “Multiple Condition” is provided from the release NW04. The only feature available before NW04 with this step is “CASE”. In the case of “CASE”, the workflow system checks the value of the basis of comparison against the defined comparison values (as shown below).

In SWITCH, each branch of it carries a condition definition. We can visualize “Multiple Condition” with SWITCH as a group of “Condition” steps.  

Small scenario using “Multiple Condition” with SWITCH is shown below:

Create a new workflow definition with a container element “CARRID” (Well known example for training purposes).

screen appears:

Set the “Properties” as import.

Double click on the undefined step to create a step “Multiple Condition”. Following     

Select the “Switch” option in the Type field. 

Different types of conditions can be defined for each “Outcome”. Please note that:

  • The conditions are defined in the given order.
  • The first branch whose condition is evaluated TRUE is considered.
  •  If none of the condition is TRUE, a default branch is taken (“Other values” in the definition).

Following are the conditions used in our example:   

The workflow definition would appear as follows:

 Insert an email step for each branch and check the output for various “Carrid” values.  

Leave a Reply

Your email address will not be published. Required fields are marked *