0% found this document useful (0 votes)
72 views44 pages

BW Training

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 44

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)

1. Navigate to Start -> All Programs.


2. Under the folder “Business Explorer”, the “Query Designer” is available. Click on “Query Designer”.
Step 2)

1. Select required BW system


2. Click the Ok button
1. Enter the Client
2. User Name
3. Password
4. Logon Language
5. Click the Ok Button
Query Panel:
1. InfoProvider Details are available here.
2. Tabs to view various report components.
3. Properties Box which shows the properties of each component selected in the query.
4. System Messages such as any error or warning messages during the Query check is displayed here.
5. Shows the Where-Used List of any component selected within the query.
Query Elements:
1. Key Figures : Key Figures represent the numerical data or the KPIs(Key Performance Indicator). They are further divided into Calculated Key Figures (CKF) and Restricted Key Figures (RKF).
2. Characteristics : A characteristic provides the criteria according to which objects are classified. e.g. Material,Period, Location, etc.
3. Navigational attributes appear as characteristics in Query designer.
Query controls with Variables
1. Select the Tab “Variable Sequence”. The tab “Variable Sequence” is used to
control the order in which selection screen variables are displayed to users.
2. List the variables used in the Query. There can be multiple variables present
here. These variables can be sequenced as per our need.
3. Select the “Display” tab.
4. The Check box “Hide Repeated Key Values” controls whether the
characteristic will repeat in each row or not.
5. The option “Display Scaling Factors for Key Figures” controls whether the
scaling factor is reported at the top of corresponding column.
6. Select the “Advanced” tab. The tab “Advanced” is most important from BO perspective . It controls whether the query is
visible to BO or not. The option must be checked to allow query access to BO.
7. The Check box “Allow External Access to this Query” should be checked if this Query is to be used from BO
8. Select the “Rows/Columns” tab.
9. The options under “Result position” section decide the Location of sub-total (a.k.a.
results in BW world) as below / above or right / left of the Characteristics.
10.The options under “Suppress Zeros” section decide the application of Zero-Suppression
on the query.
Business Explorer – Functions in a Query Designer
On the left side of the home screen of the Query Designer, you have the InfoProvider pane – it has the name of the Infocube and the list of all the characteristics and key figures available under that Infocube. It also shows all the Calculated Key figures and Restricted Key figures in the Infocube.

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

The following objects can be defined for reuse:

● Structures

● Filters

The following objects are always reusable:

● Variables

● Restricted Key Figures

● Calculated Key Figures


Structures
Objects that appear in the Query Designer and can be defined freely.

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.

1. Structures with key figures


2. Structures with characteristics (without key figures)
Key figure structure Characteristic figure structure
Formulae
You can recalculate the key figures in a structure using a formula. You can include basic key figures, restricted key figures, and
calculated key figures in the formula definition.

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

- The cells that you have defined as exception cells

- All form variables

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)

1. In the subsequent window, enter the Description.


2. Enter the Technical name.
3. Variable Processing Types
4. Under reference characteristic, the variable can be assigned to either the specific
InfoObject or all Info-Objects based on same reference characteristic.
1. Under the “Details” tab, we can specify whether the variable accept:
2. Single Value/ Multiple Values/ Range
3. Selection Option (allows any of the above at runtime, is not supported in BW-BO)

Step 3)

1. Click the “Default values” tab.


2. We can specify the default filter applied to the report. This
value can be over-written by user at run-time.
Calculated Key figures
As the name itself suggests, in certain cases key figures cannot stored in an InfoProvider. In this case, will
create a Key Figure with some Calculations in Query Designer.

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:

We have sales data for CUSTOMER, MATERIAL,


QUANTITY and REVENUE. In below picture, you can see
how the data is structured for reporting.

Now, we have sales data and want to see revenue


only for a particular material, for example M01. So,
for that we have to restrict Revenue for Material to
M01. We have to create SAP Restricted Key
Figure on Material characteristic.
BEX Analyzer
The BEx analyzer is an analysis based reporting and designing tool embedded with Microsoft Excel which can be used to the
analyze data in the InfoProvider. You can also add different control types such as, Analysis Grids, Dropdown Boxes and Button in
an Excel workbook.

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.

How to Save a Workbook?


To save a workbook in the BEx Analyzer, you need to navigate to Save → Save Workbook in the analysis toolbar or you
can also click on the BEx Analyzer → Save Workbook in the menu.
You can also save a workbook with a new name. To do so, select Save → Save Workbook As in the analysis toolbar or
you can also click on BEx Analyzer → Save Workbook As in the menu.
Refresh
You can also control the automatic refreshing of the workbook in the BEx Analyzer. For activating this, navigate to BEx Analyzer → Refresh
Changing Variable Values
You can use this option to change the variable values in your query. In the analysis toolbar, Select BEx Analyzer → Change Variable Values as shown in the following screenshot.
Global Settings
This option can be used to configure the Global settings and it allows you to enter the setting that is applicable to the full application.
There are other options that you can select from the BEx Analyzer drop down box. You can access the SAP Documentation
on the BEx Analyzer by going to the “Application Help” option.
Business Explorer – Design Mode in Analyzer
When you are in the Analysis mode, to switch to the design mode you should navigate to the BEx Analyzer → Design Toolbar → Design Mode in the menu as shown in the following screenshot.
There are 11 design items from which you can select under the Design Toolbar. When you click on the Design Toolbar, you
can find the following options −
Business Explorer – Creating Planning Applications
A Planning application can contain a planning function such as – Copy, Save or Delete, or Selection List, etc. Let us see how to create a planning application.
To start with, you need to check the security settings. Choose Tools → Macro → Security and set the indicator for Trust access to the Visual Basic Project.
Create a new workbook and to put the title of workbook move to the required cell in the workbook → Enter the Title and assign a font to it.
To design the workbook, move to the Design mode. Navigate to Design Toolbar → Design Mode as shown in the following
screenshot.
To show the query results with the actual and plan data, move to the relevant cell and select Insert Analysis Grid in the Design toolbar and open the properties of the design item as mentioned in the previous topic.
Go to the General tab of the Properties and select create a new data provider and it will open the dialog box which displays the name of current data provider.
To define start view of the data provider, click on the Query view and a dialog box appears.
The next step is to select the required query or the query view and the select Open. This will allow the system to insert the name of
the InfoProvider on which the query is created and this information is displayed in the InfoCube field as shown below −
Once your data provider is configured, click OK and this will take to Properties of Analysis Grid design item. You should
select the check box for Apply Formatting and Allow Navigation.
In a similar way, add the dropdown box to the required cell and select Properties. Select the configured data provider and check the option Label Indicator. Now, the next step
is to go to the Dimensions tab page, you need to select the dimensions for which you want to be able to select values in the dropdown as shown in following screenshot.
The next step is to add the push button for this special function. Go to the Design Toolbar and add a design item type Button.
Go to the context menu of the button and select Planning specific command → Select the required planning function and data provider.
● Planning function − PF_Copy
● Planning function − PF_Revaluate01
● Planning function − PF_Delete
Click on the Finish button and select the save button.
Thank you!

You might also like