This article will provide an introduction to a new feature called SWITCH, which is provided in the "Multiple Condition" step of SAP Workflow. It is assumed that the reader of this article has some knowledge of Business Workflow and has worked with the "Multiple Condition" step.
The SWITCH feature in the step "Multiple Condition" is available as of the release NW04. Before NW04, the only feature available with this step was "CASE". In the situation 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 carries a condition definition. We can visualize "Multiple Condition" with SWITCH as a group of "Condition" steps.
A small scenario using "Multiple Condition" with SWITCH is shown below:
1. Create a new workflow definition with a container element "CARRID".
(A well known example for training purposes)
Set the "Properties" as import.
2. Double-click on the undefined step to create a step "Multiple Condition". The following screen appears:
3. Select the "Switch" option in the Type field.
4. 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 conditions is TRUE, a
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial Director- default branch is taken ("Other values" in the definition)
Following are the conditions used in our example:
5. The workflow definition would appear as follows:
6. Insert an email step for each branch and check the output for various "Carrid" values.
This was first published in December 2006