BW Training
BW Training
BW Training
BEX
BEX Query designer
● As the name suggests, it is used to define queries to retrieve data from SAP BW. Query
Designer acts as the bridge between SAP BW InfoProviders and the reporting front-end
tools (SAP BW / SAP BO).
● It limits the field list displayed, which is based on their requirements.
● It also defines the default placement of these report objects within a report Query
Designer and adds value by allowing users to define filters, selection screen variables
(a.k.a. Prompts), Calculations, Unit Conversions, etc. that are not available in
InfoProviders.
Accessing Query Designer:
To access BEx Query designer, follow the below steps.
Step 1)
In the middle pane, you have the Characteristics Restrictions – it shows all the filters that have been used in the query. You have 4 tabs under the characteristics restriction, which are −
● Filter
● Rows/Columns
● Conditions
● Exceptions
Filter − Here you can see the list of dimensions in the query on which the filter has been applied to restrict the values in the query.
Conditions − In this tab, you define the
Rows/Columns − In this tab, you can see the list of dimensions and key
figures under rows and columns section. You can also see the free Condition like ranking of the values under
characteristics and preview under this tab. key figures. You can select Top 5 values, Top
10 values and under conditions in the query.
You can select different Operator functions to
pass these Conditions.
Exceptions − You can also add Exceptions/Alert to key figures. You can create an Exception and keep it inactive by unchecking the
check box
Designer reusable query elements
In the Query Designer, you can define a number of objects and save them for reuse. This means
that you only need to define the objects once and can use them in all queries. When a reusable
object is changed, the changes are applied everywhere that the object is used.
Features
● Structures
● Filters
● Variables
A structure forms the basic framework of the axes in a table (rows or columns). It consists of
structural components. We differentiate between key figure structures and characteristic
structures.
Structural components of key figure structures are always based on the key figure selections
(basic key figures, restricted key figures, and calculated key figures). Characteristic structural
components cannot contain key figure selections.
Procedure
Defining a Formula
1. If the query does not have a key figure structure yet, create a New Structure in the Rows or Columns of the Query Designer by
highlighting the row or column directory using the secondary mouse button and selecting New Structure from the context menu.
2. If the structure does not yet contain any key figures, use drag a (basic) key figure from the InfoProvider to the directory of the
new structure.
3. Select the structure directory and choose New Formula. The New Formula entry is inserted, and the properties for the formula
are displayed in the Properties screen area.
4. Select the New Formula entry and choose Edit from the context menu (secondary mouse button). The Change Formula dialog
box appears.
The area to the bottom left contains all the operands available for defining the formula. These are:
- The structure elements that you have already defined for the structure
On the right side of the screen, you see the functions that are available as operators:
- Basic functions
Percentage functions
Data functions
- Mathematical functions
- Trigonometric functions
Boolean operators
Variables:
Variables are query parameters that we define in the Query Designer and are filled with values only when you execute the query. Variables are reusable objects. The variables defined in the Query Designer are available in all InfoProviders. They do not depend on the InfoProvider, but rather on the InfoObject for which they were created.
Characteristic Variable: This are used to give selections to the user(say user should be able to enter month for which he/she wants to see the sales orders)
Text Variable: This are are used to provide flexibility in displaying the report/fields in reports. Say when user executes report for 2008 sales data, then i want to display revenue key figure as '2009 sales revenue'. In this scenario we can use this.
Hierarchy Variable:This are used in query to restrict a characteristic or to display query result using hierarchy.
Hierarchy Node Variables:This are used to whenever a characteristic is restricted using a specific hierarchy node. say if customer has hierarchy has region and division, then using hierarchy node variables, customer can select for which region he wants to display the result.
Formula Variable:This are used whenever you want to calculate something.You can use this formula variables to create CKF,RKF, exceptions and conditions also.
Steps to create a variable:
Step 1)
1. To create a variable, browse to the folder called “Characteristic Value Variables” under the corresponding characteristic.
2. Right click on the folder and select the option “New Variable”.
Step 2)
Step 3)
These Key Figures are executed at run time. For example, if in the InfoProvider we have Sales, Material, Customer,
Quantity and Revenue figures but, in the report, we want to see Tax, then should use SAP Calculated Key Figures.
Suppose that Tax = 10% of Revenue. We can store this information in the InfoProvider. But what if in the future the
Tax percentage changes according to year and then it will be difficult to enter these changes. Because today our
tax percentage is 10% but tomorrow it might change. Imagine that for June 2013 we want to calculate Tax and it is
only 10%. Then, later in 2014 it was increased to 20%.
Can we think here that can we go back to the InfoProvider and load entire data according to these changes? The
answer is NO. It is very difficult and most time-consuming process.
Here some kind of calculations is involved (for getting the tax figure) but these calculations cannot be performed
automatically in the InfoProvider. In this scenario, SAP Calculated Key Figures are very useful.
SAP Restricted Key Figures
SAP Restricted Key Figures are defined by restricting basic key figures using a set of characteristics or by applying a filter on the data based
on a specific set of InfoObjects.
While creating SAP Restricted Key Figures we can add as many characteristics to restrict data as necessary. It means that the system will
create a new key figure at query definition time. Normally we can’t filter on key figure information because it’s a measurable object without
characteristic.
BUSINESS SCENARIO:
The BEx Analyzer provides you two different function modes that can be used for executing OLAP Analysis or to develop
interfaces for Query Applications.
Analysis Mode
This mode can be used for executing queries created in a query designer to perform OLAP analysis. You can also define new
queries by launching the BEx Query Designer. You can also use planning functions and advanced planning functions written in
VBA.
The workbooks created using the BEx analyzer can be saved on the server or you can also save it locally.
Design Mode
You can use the design mode to design the interface of your workbook where you can insert the Analysis Grid, Radio
Buttons, Dropdown Boxes into a Microsoft Excel workbook. You can perform workbook formatting and customize the chart
types in an excel workbook.
To access the BEx Analyzer, navigate to Program files → Business Explorer → Analyzer.
Business Explorer – Analysis Mode in Analyzer
When BEx analyzer is started, the menu bar and the BEx Analyzer-tool bar is displayed. You can also access the BEx Report Designer and the Web analyzer from BEx analyzer → Tools option.
How to Open a Workbook and Query in the BEx Analyzer?
You can open a workbook or a query in the BEx Analyzer toolbar. To open a query, navigate to BEx Analyzer → Open Query.
To open a workbook, navigate to the BEx Analyzer → Open Workbook.