首页 > SAP > ABAP > Condition step in sap workflow
2019
08-29

Condition step in sap workflow

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.

Element in Workflow Container

2. Drag and drop the condition step on graphical model in the workflow  designer. you will be navigated to the below screen.

Condition Step

3. Provide the Step Name and click under Condition to create a new condition.

Condition Step in SAP Workflow

4. When you click on it you will be prompted with below popup and provide the following condition parameters.

Condition step in sap workflow - 第4张  | 优通SAP
Condition Step

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 >>
Enter

After performing the above actions you will find the condition build like below

Condition step in sap workflow - 第5张  | 优通SAP

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

Condition step in sap workflow - 第6张  | 优通SAP
Multiple Conditions

6. After specifying the conditions click on OK and you will see the conditions in the workflow step like below.

Condition step in sap workflow - 第7张  | 优通SAP

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.

Condition step in sap workflow - 第8张  | 优通SAP
Outcomes in Condition Step

8. Click on OK to go back the graphical model of the workflow.After adding the condition step will look like below.

Condition step in sap workflow - 第9张  | 优通SAP

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.

Condition step in sap workflow - 第10张  | 优通SAP

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.

Condition step in sap workflow - 第11张  | 优通SAP

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“.Condition step in sap workflow - 第12张  | 优通SAP

12. You should see an email in you SAP Inbox(SWBP) after successful execution.

Condition step in sap workflow - 第13张  | 优通SAP Condition step in sap workflow - 第14张  | 优通SAP

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

最后编辑:
作者:yangsen
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519