Friday Features: Complex If Conditions in Studio v11
By Jennifer Hwang on Jan 20, 2017
This week’s Friday Features post focuses on a new feature in Studio v11 – Complex If Conditions. We’ve always had If Condition functionality and different types of If Conditions to support a script’s conditional needs. But the only way you used to be able to create complex If Condition scenarios was using multiple If Conditions or nested If Conditions. In previous versions, the If Condition itself could only contain one If statement. Anytime you needed more than one required multiple unique If Conditions. That method is still an option, now you can build all the complex If Condition scenarios on your wish list!
Let’s take a look at a couple examples. In the image below, you’ll see an ‘Or’ scenario. In this case, we’re saying that the value of the Lot size will be ZE if there is data in column R or column S. Prior to Studio v11, you would have needed to duplicate that field and put ‘If not’ blank conditions around those two separate fields.
Using Studio v11, you no longer need to duplicate any fields to handle Or scenarios. You only need to create one If Condition and define your condition to have multiple options using an Or. There’s no limit to how many Or options you can have. Just keep adding new ones using the plus sign!
The next example is an ‘And’ combined with an ‘Or’ scenario. This example shows that the value of Item Category Group will be ZCON if column V is equal to “TRUE” and column C is equal to 1,000 or 2,400. In this case I needed 3 total If Condition statements. The first for column V’s value, and then two additional nested If Condition statements for the duplicated field.
Using Studio v11, everything can go into one If Condition statement. The first line is for column V’s value and then there’s an ‘And’ line for what column C’s possible value is. In the example below, I am actually using the In List functionality to say that column C is either 1,000 or 2,400. I can also have two additional lines for column C as 1,000 or column C as 2,400. But using the In List option allows you to only use one line. Not only can you build complex If Conditions with Studio v11, you can also incorporate the newly improved In List functionality to simplify your If Conditions.
We hope you take advantage of this new feature and improve the conditional management of your SAP data!
Don’t miss the previous posts in this series:
About the author
Jennifer Hwang is a software consultant and business process analyst with 20+ years of experience implementing and optimizing various technical solutions. As a Solutions Engineer for Winshuttle, with 12+ years of Winshuttle consulting expertise, she ensures customer success by being their trusted technical advisor.
Questions or comments about this article?
Tweet @Winshuttle to continue the conversation!