SAP BEx Conditions

SAP BEx ConditionsSAP BEx Conditions are needed to efficiently do the data analysis. Data gets filtered in the query output as per the conditions defined in the query. Conditions just hide the data that is not relevant to you but they don’t delete any data. Multiple conditions can be defined for a query. They get applied independently. These multiple conditions are linked with an ‘AND’ logical operator. The data is shown in the query output, only if it satisfies all the conditions defined on the query. In SAP BEx, below given is the list of some of the areas where you can define SAP BEx conditions:

  • BEx Query Designer
  • Ad-hoc Query Designer
  • Toolbar of the standard Web template
  • Web Applications

As in the SAP BEx Exceptions tutorial, let us consider the Deliveries Report. The query definition looks as follows:

Query: Query Designer (1)
Query: Query Designer (1)

Division and Ship-To Party are present in the rows, whereas Delivered quantity is present in the columns section of the query.

There is also a filter on the Division characteristic. The screenshot is given below:

Query: Query Designer (2)
Query: Query Designer (2)

Requirement

The requirement is mentioned below:

  • Create SAP BEx condition on ‘Delivered quantity’ key figure to display data only when the Delivered quantity >21,000.
  • Change SAP BEx condition to display data only when the Delivered quantity >25,000.
  • Delete SAP BEx condition defined in the above step.

Create SAP BEx Conditions

In order to open the Conditions pane, click on Conditions button highlighted in the below screen.

SAP BEx Query Designer: Toolbar (Conditions)
SAP BEx Query Designer: Toolbar (Conditions)
SAP BEx Query Designer: Conditions
SAP BEx Query Designer: Conditions

Create a new condition by right clicking on the Conditions pane as per the following screen:

New Condition Creation
New Condition Creation

The following screen appears:

Defining the Condition (1)
Defining the Condition (1)

Define the condition by double clicking on it. The following screen appears:

Defining the Condition (2)
Defining the Condition (2)

Enter the name for the condition. The screenshot is given below:

Defining the Condition (3)
Defining the Condition (3)

Condition is set to active by default. The screenshot is given below:

Defining the Condition (4)
Defining the Condition (4)

Now, define the condition by clicking on ‘New’ button highlighted in the below screen:

Defining the Condition (5)
Defining the Condition (5)

The Key Figures, Operator, and Values fields are enabled as can be seen below:

Defining the Condition (6)
Defining the Condition (6)

Now, enter the key figure as ‘Delivered quantity’, operator as ‘greater than’, and values as 21,000.

Defining the Condition (7)
Defining the Condition (7)

Let us now transfer the condition by clicking on ‘Transfer’ button highlighted in the below screen:

Defining the Condition (8)
Defining the Condition (8)

The following screen appears:

Defining the Condition (9)
Defining the Condition (9)

Let us now click on ‘OK’ button that is highlighted in the below screen:

Defining the Condition (10)
Defining the Condition (10)

This is how the defined conditions looks:

Defined Condition (11)
Defined Condition (11)

Now, click on to save the query. The screenshot is given below:

Saving the Query
Saving the Query

Run the query through BEx Analyzer. The screenshot is given below:

Query in BEx Analyzer
Query in BEx Analyzer

Division ‘East’ has been selected in the selection screen.

Select Values for Variables in BEx Analyzer (1)
Select Values for Variables in BEx Analyzer (1)

Click ‘OK’ to proceed further:

Select Values for Variables in BEx Analyzer (2)
Select Values for Variables in BEx Analyzer (2)

The output of the query is given below.

Report Output
Report Output

The output confirms that the condition got applied successfully. The records which met the condition (Delivered quantity > 21,000) have been displayed in the output, others got filtered out.

Change SAP BEx Conditions

As per the requirement mentioned above, the condition needs to be changed to display data only when the Delivered quantity >25,000.

To change the condition created in the previous section, just right click on the condition and click on ‘Edit…’. The screenshot is given below:

Changing the Condition (1)
Changing the Condition (1)

Change the condition parameters as per the following screen:

Changing the Condition (2)
Changing the Condition (2)

Click on ‘Transfer’ button to transfer the condition parameters.

Changing the Condition (3)
Changing the Condition (3)

The changed condition looks as follows. Click ‘Ok’ to continue further.

Modified Condition
Modified Condition

Now, click on to save the query. The screenshot is given below:

Saving the Query
Saving the Query

Run the query through BEx Analyzer. The screenshot is given below:

Query in BEx Analyzer
Query in BEx Analyzer

Division ‘East’ has been selected in the selection screen.

Select Values for Variables in BEx Analyzer (1)
Select Values for Variables in BEx Analyzer (1)

Click ‘OK’ to proceed further:

Select Values for Variables in BEx Analyzer (2)
Select Values for Variables in BEx Analyzer (2)

The output of the query is given below.

Report Output
Report Output

As can be seen from the report output, the condition got applied successfully. The records which met the condition (Delivered quantity > 25,000) have been displayed in the output, others got filtered out.

Delete SAP BEx Conditions

As per the requirement mentioned above, the condition needs to be removed finally.

To change the condition created in the previous section just right click on the condition and click on ‘Remove’. The screenshot is given below:

Removing the Condition
Removing the Condition

Now, click on to save the query. The screenshot is given below:

Saving the Query
Saving the Query

Run the query through BEx Analyzer. The screenshot is given below:

Query in BEx Analyzer
Query in BEx Analyzer

Division ‘East’ has been selected in the selection screen.

Select Values for Variables in BEx Analyzer (1)
Select Values for Variables in BEx Analyzer (1)

Click ‘OK’ to proceed further:

Select Values for Variables in BEx Analyzer (2)
Select Values for Variables in BEx Analyzer (2)

The output of the query is given below.

Report Output
Report Output

As can be seen from the report output, the condition is not present in the report anymore.

SAP BEx conditions help in restricting the data of the query either through threshold values or through ranked list. The requirement which is illustrated in this tutorial is all about threshold values. One can also try working on Ranked list. Operators such as Top N, Bottom N, Top percent, Bottom percent, Top total, Bottom total help you to create ranked lists.

  • Top N, Bottom N: The ranked list gets arranged as per a particular number.
  • Top percent, Bottom percent: The ranked list gets arranged as per a particular percentage.
  • Top total, Bottom total: The ranked list gets arranged as per a particular totals value.

Sorting gets applied automatically when you activate the condition for the ranked lists. Following are some of the scenarios where ranked lists can be used:

  • Displaying top 10 customers with highest sales
  • Display top 10% students with highest scores
  • Top total 35,000$ of delivered volume

In real time, C-level executives really find these kinds of scenarios to be of much value add. You should try to practically create SAP BEx conditions for these sorts of scenarios to understand their applications and appreciate their purpose.

Did you like this tutorial? Have any questions or comments? We would love to hear your feedback in the comments section below. It’d be a big help for us, and hopefully it’s something we can address for you in improvement of our free SAP BW tutorials.

Navigation Links

Go to next lesson: SAP BW InfoProviders

Go to previous lesson: SAP BEx Exceptions

Go to overview of the course: SAP BW Training

Page last updated by Prasanthi A on

Leave a Reply

Do you have a question and want it to be answered ASAP? Post it on our FORUM here --> SAP FORUM!

Your email address will not be published. Required fields are marked *