In this tutorials we will see how to use condition step in sap workflow. For more tutorials sap workflow tutorials.
1. Go to Workflow Builder SWDD.Create an element called “Flag” of type CHAR1 in Workflow container.if you do not how to create an element please have a look at How to create an Element in Workflow container before proceeding further.
2. Drag and drop the condition step on graphical model in the workflow designer. you will be navigated to the below screen.
3. Provide the Step Name and click under Condition to create a new condition.
4. When you click on it you will be prompted with below popup and provide the following condition parameters.
Lets understand what we have in the above pop up screen
- Workflow Container Elements
- Condition Operators like = , > , < and Logic expressions like AND, OR etc.
- Constant value
- Condition expression
To build the condition expression
- select(double click) the container element >>
- choose the operators >>
- Enter the constant value to which you want to compare >>
After performing the above actions you will find the condition build like below
5. You can also add one or more conditions by using Logical expressions AND, OR. To add a new condition first click on AND, OR buttons under Logic and repeat the above steps specified. you condition step will look like below
6. After specifying the conditions click on OK and you will see the conditions in the workflow step like below.
7. As we know Condition step have two outcomes True and False. We can name them of your own. You can see the outcomes under “Outcomes” if you don’t see them just scroll down.
8. Click on OK to go back the graphical model of the workflow.After adding the condition step will look like below.
9. You can see in the graphical model there are two branches formed before completing the workflow. one branch is for True and other is False of condition you have provided. You can add any step in workflow in these branches. In our case we will add Mail step in Yes branch to send email if the condition is true.
10. Save and activate the workflow.This completes the designing of Condition step in SAP Workflow. To test your workflow go to tcode SWUS or press execute in application toolbar.
11. You see the below screen. Provide the container element Flag value as ‘A’ and F8.
if you dont see the container element, go back to the container where you have defined the element and go the properties tab check “Import“.
12. You should see an email in you SAP Inbox(SWBP) after successful execution.
This completes the condition step. Now you can use this in any workflow you build as per your requirement. For more tutorials visit sap workflow tutorials
Click here to join our channel and stay updated with the latest tutorials and updates.