Advanced Workflow features -- SWITCH

Advanced Workflow features -- SWITCH

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

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

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

  • 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

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.