You are on page 1of 56

Advanced Tips and

Tricks Using BEx


Analyzer and BEx
Query Designer
Jeevan Kumar Ravindran
TekLink International
2008 Wellesley Information Services. All rights reserved.

In This Session ...

Highlights of this session:


Learn advanced tips and tricks
In BEx Query Designer and BEx Analyzer
Gain insight into the advanced features
Explained using business scenarios
Understand the obscure features
Out of sight features are brought to limelight
Get to know how BExGetData really works
Demystified with examples and demo
Plethora of demos to reinforce the topics presented
Lions share of the content is based on SAP NetWeaver
BI 7.0
2

What Well Cover

Advanced features of Query Designer


Creating Interactive Reports using BEx Analyzer
Advanced formatting features of BEx Analyzer
2 Properties and 2 Settings in BEx Analyzer
Wrap-up

Advanced Features of Query Designer

Topics covered in this sub-section:


An easy method to produce KPI reports
How can I report on Inactive (slow moving) items?
How can I create a Market Index report?
How can I create an Input-ready query?
A flexible method to translate currency in a report
Shortcuts and personalization options in Query Designer

An Easy Method to Produce KPI Reports

Exception Aggregation
Business case: You want to report number of items (products)
sold via each distribution channel
Below example: Show number of items sold per Dist.
Channel

Step 4 Rename Formula 1

Step 1 Create a formula

Step 2 Edit the formula key figure


Step 3 Drag the reference key figure

Exception Aggregation Example

Aggregation Setting
Step 5 Select Aggregation Tab
Pick Exception Aggregation Type (Fig 1)
For this example Count All Values <> 0
Step 6 Pick Reference Characteristic (Fig 2)
For this example, select Material

Fig. 2: Step 6 -Select Reference characteristic


Fig. 1: Step 5 - Select Aggregation option

Exception Aggregation Demo

When executed, the query shows Material count per distribution


channel

Nested Exception Aggregation


Key figure with exception aggregation can be used within other
key figure (calculated key figure) that uses exception
aggregation
7

How Can I Report on Inactive (Slow Moving) Items?

How can I report on a characteristic that has no transaction in a


selected period?
New SAP NetWeaver BI 7.0 feature eliminates the need of
Multi-provider and constant selection to achieve this
To do this, go to the Advanced Tab in properties pane of the
desired characteristic
Choose Master data for Result value
Now the query output will show
even non-posted values

For SAP BW 3.x, please refer to SAP Note Number: 541559


8

How Can I Create a Market Index Report?

Using Constant Selection feature


Navigation and filtering has no bearing on Constant selection
The key figure will always show same (constant) value
Constant Selection indicator set in Extended tab
Useful applications:
Calculating Market Index
Proper display of results in Multi-provider based queries

Constant Selection Example and Demo

Before Filtering
Net sales of all products in Product Group is $61,353.20
Normalized Sales for iPhones is 24.34%

After Filtering
Quarter Net Sales/Product Group still shows $61,353.20
Normalized Sales for iPhones still shows 24.34%

10

How Can I Create an Input-Ready Query (Planning


Layout)?

What is an Input-ready Query?


The key figure column(s) in the output of an Input ready
query, can be made available for entering data
Input-ready queries form the basis of manual planning layout
in SAP NetWeaver BI Integrated Planning
Manually entered data can be saved back to the cube
This type of query is created on a Real-Time InfoCube
(Transactional Cube) or at an Aggregation Level
A regular query is converted into an Input-ready Query by
setting parameters in the Planning Tab
Other prerequisites apply for query use in planning. They are
beyond the scope of this presentation.

11

Key Figures Planning Tab Settings

Step 1: Set planning options for a Key Figure (KF)


In Change data section of Key Figures properties tab
Option #2 or 3 makes KF or Restricted KF (RKF) input-ready
During planning, a lock will be set on this KF or RKF
Disaggregation and Types of Distribution
Used for Top-Down distribution
Step 2: Planning tab setting at Query level
For input-readiness, this flag (Fig. 2) must
be set
Set in Query-level
properties
Fig. 2: Querys Planning property

Fig. 1: Key Figures Planning Tab

12

Currency Translation

In BEx, you can specify currency translation in 2 places:


1. During Query definition for individual key figure
2. Run time in BEx Analyzer using context menu
Currency selection in Query Designer
Select the properties of an amount/price field
Then choose the tab name Conversions
Select Conversion type
Target Currency
You can introduce
a variable for
Target Curr.

13

Currency Translation in BEx Analyzer

In the query output, get the context menu of any amount field
Select Query properties option
Then, choose Currency Conversion tab
Select Target currency
Select Translation type

Query
Output

Query properties pop-up screen

Query output now


show a different
currency

14

Query Designer Shortcuts Multi-Select

Set common properties in single step


You can select multiple objects using Shift or Control keys
The property pane will show common settings

15

Query Design Shortcut Selection Favorites

Save and reuse selections restrictions


Step 1: Save the selection as a favorite
1
2

3
Step 1 Select values and move to right.

Step 2 Give a name

Click on Save selection button

Step 2: Reuse the saved favorite


1
2

Step 1 - Next time in the query designer,


you can pick the option Favorites
Step 2 You will see your saved
favorite. Select and Move to right.

16

Query Design Shortcut Personalization

Personalize how a characteristics is displayed


You can set your preference for value display
Example: Key and Text
This personalization is valid across InfoProviders
Mark the check box Use these Settings Next Time

Step 1 In the Characteristic Restriction screen, click


on the Settings Icon

Step 2 Select Custom and choose your display


options.

17

Query Design Shortcut Personalization (cont.)

More personalization options


You can set the criteria for value selection
Number of values to display
Data Read mode
Show from master data value
Show data from the InfoProvider

Show attributes of a Characteristic during value selection


1

Now the value restriction screen shows the attributes as well

18

What Well Cover

Advanced features of Query Designer


Creating Interactive Reports using BEx Analyzer
Advanced formatting features of BEx Analyzer
2 Properties and 2 Settings in BEx Analyzer
Wrap-up

19

Creating Interactive Reports Using BEx Analyzer

Topics covered in this sub-section:


Advanced Design Elements and features in BEx are explained
with an example Sales Analysis Report
Design Elements covered:
Analysis Grid Out of sight features explained
Drop-Down box
Radio-Button
Checkbox
Use of Local Formula

20

Interactive Reports

Create an Interactive Sales Report


Step 1 Click on the Analysis Grid icon
This item provides a link to the data provider (Query)

Step 2 Click on the icon


that is placed in cell D5.
This will pop-up Analysis Grid properties window
Click on the Create Data Provider button

21

Interactive Reports: Data Provider for Analysis Grid Item

Step 3 Data Provider Creation step


Here select a query or an InfoProvider
Other available options in the step are show below
Query/InfoProvider is
linked here

Provide Results Offline Mark this


indicator to save the query output
inside the workbook.
Note: Mark this indicator if you are
working in Formula mode.

This setting restores the original


navigational state saved in the query or
query view on the server.
In other words, the navigational state
saved in the workbook will be ignored.
Analysis Grid Properties window

22

Interactive Reports: Analysis Grid Items Properties

Step 4 Set other relevant settings in the General tab


Settings relevant to Planning and Formula mode are set here

Range Marks the location of


the Item in Microsoft Excel. This
fields value is also used for
Clipping.

When unchecked, SAP will


relinquish workbook
formatting duties to Excel

More about Use Formulas in


later sections

Adjusts the Microsoft Excel


print area to the size of the
analysis grid
In Input ready (Planning)
queries, marking this field will
lock non-input ready cells

When marked, no new lines


can be entered in Input ready
(Planning) queries

Mark this field to retain Unit of


Measure in Formula mode

23

Interactive Reports: Analysis Grid Item Clipping

Step 5 Enter Clipping info


Useful to optimize screen real estate
The output will be clipped to the values specified in the
Range field
If scroll option is set, a scroll bar appears in the output

Scroll bar

24

Interactive Reports: Drop-Down Box

Step 6 Insert a drop-down box


Business case: Show a list of Product Group for selection

Step 2

Step 1 Click on Drop-down box icon

Step 4 Workbook display

Step 3 Set read mode

25

Interactive Reports: Radio Button

Step 7 Inset a radio button group


Business case: An easy way to select Calendar Year/Quarter

Step 2

Step 1
Step 3

Step 5

Step 4

26

Interactive Reports: Check Boxes

Step 8 Insert a check box item


Business case: To customize the display of key figures

Step 2

Step 3
Step 1

Step 5

Step 4

27

A Way to Create Worksheets Based on Characteristic Values

BEx Analyzer context menu in the Filter section


Add drill down in new worksheets
New worksheets will be created for each value of the
characteristics
Each design item and data provider used in the current
worksheet is copied to the new worksheet

Fig 1. Context menu in the Filter section


Workbook Settings shows original
data provider duplicated

28

Drill Across Worksheets

Query output in each sheet shows the characteristic value

Fig 1. Sample worksheet contents after drill across worksheets

Prerequisites
Selected characteristic must not exist in rows or columns
No display hierarchy is active on that characteristic
A maximum of 200 characteristic values will be used to create
sheets

29

Local Formula To Add a New Key Figure Column

Step 9 Add a Local Calculation e.g., Add Plan vs. Actual %


Use the option Local Formula in the query result section
Use the secondary mouse button to select the Add Local
Formula option

Enter your formula

You can perform simple arithmetic and some scientific functions


A new column will be appended to the end of the table

30

Local Formula Features

How to retain the Local Formula?


In the query output, save the Local Formula as a view (query
view)

The Local formula will be saved along with the query


Use the saved view (query view) in your workbook

31

Interactive Sales Report Demo

See the steps to create an interactive Sales Analysis report

32

What Well Cover

Advanced features of Query Designer


Creating Interactive Reports using BEx Analyzer
Advanced formatting features of BEx Analyzer
2 Properties and 2 Settings in BEx Analyzer
Wrap-up

33

Formatting Features

Topics covered in this sub-section:


Features such as Convert to Formula and Use Formulas for
creating formatted reports
Demo of BExGetData function and how we can use it to
leverage MS Excels formatting capabilities

34

Convert to Formula Introduction

What is Convert to Formula?


This option converts a Key Figure cell of the Analysis Grid Item
into an Excel-formula

Why do you use Convert to Formula option?


To leverage MS Excels formatting capabilities
How to switch on Convert to Formula in BEx Analyzer
Inside the Analysis Grid item, get the context menu
Choose the option Convert to Formula

35

Convert to Formula Features

What happens when Convert to Formula is enabled?


Analysis Grid item will be automatically deleted
Context menu of Analysis Grid item disappears
Number format will be set to standard
You can keep the SAPs number format by switching on
Analysis Grid Items property (see Fig. 1) beforehand
Fig. 1 Property of Analysis Grid Item

BEx Analyzers responsibility is to bring in the data


Onus is on MS Excel to format the query output
Once converted, there is no turning back
You have to reinsert the Analysis Grid item and link to Data
provider
36

Data Flow of a Cell with BExGetData Function

Data cell in the workbook contains a business value


It also contain the BExGetData formula
Each BExGetData cell is connected to a Data Provider (example DP_1)
E.g., BExGetData("DP_1",$J11,$F12,$G12,$H12)
Each cells data fetch is independent of other cells
Data Provider is connected to a Query
E.g., Z0D_SD_C03_DEMO_Q005
Query is connected to a InfoProvider
E.g., 0D_SD_C03

Zoom cell
Excel Formula
InfoProvider

Cell
Query
Workbook

37

Syntax of BExGetData

Mainly three parameters are passed in the sequence


{Data Provider, Column Name, Row Name(s)}
An easy way to represent BExGetData syntax is
{Data Provider, Key Figure, Characteristic(s)}
Supply the characteristics in sequence separated by a comma
If the characteristic shows as Text not Key value, then pass
the characteristic value in Text form
Be cautious while typing in the values. It is case-sensitive.
Any typos will result in #NV (No Value) in the output
Three different types of BExGetData syntax

38

Convert to Formula Capabilities

What else can Convert to Formula do?


You can cut and paste rows of report into different sections
When refreshed, SAP will not reassemble your report
Overwrite and Fetch capability
It gives you dynamic data selection capability
You can overwrite values of a characteristic to another
value and get result of that characteristic

In

the above example, copy line 16 (Q1 2003) to line 17.


Change value in Line 17 from Q1 2003 to Q2 2003. You will
notice the change in Key figure values.
39

Understanding Overwriting Capability

Boundaries of data access


The overwriting value must exist within the data selection
Consider this scenario: A report is run for 4 quarters in
2003. It is then converted to formula
In the output, if you change the cell value from Q2
2003 to Q2 2004, the output will show #NV
However, in the output, if you change the cell value
from Q2 2003 to Q3 2003, the output will show the
correct value
To extend the boundaries of data access
Refresh the workbook with selection criteria that covers the
data range that you are looking for
For the above example, refresh the report for 2003 and 2004
40

Convert to Formula Miscellaneous

To see results offline


When you open a workbook that is saved after the converting
to formula, you may find the key figures show #NV (No value)
To avoid this error, check mark the data provider property
Provide the Result Offline

Can I use any query for Convert to Formula?


The answer is No
The query should have elements in both row and column
41

BExGetData Demo

See the Demo of BExGetData to reinforce the topics discussed in


the previous slides
Also see how you can create formatted reports using
BExGetData

42

What Is Use Formulas

Use Formulas is another method to generate BExGetData in the


data cells
It is set as a property of Analysis Grid Item

Unlike Convert to Formula, Use Formulas does not delete


the Analysis grid design item
Access to the context menu functions, drag and drop is still
active. Standard formatting is retained.
For generating formatted reports, Convert to Formula is a better
option than Use Formulas

43

Use Formulas Other Points

Before you mark Use Formulas box, remove the Suppress


Repeated Key values option
Otherwise, you will see #NV in most data cells

Use Formulas will convert data cells to BExGetData


mini-queries

44

What Well Cover

Advanced features of Query Designer


Creating Interactive Reports using BEx Analyzer
Advanced formatting features of BEx Analyzer
2 Properties and 2 Settings in BEx Analyzer
Wrap-up

45

Query Properties in BEx Analyzer

Query properties One stop shop to maintain all settings


pertaining to a query
Access Query properties from the context menu of query
output

Change Local view in SAP BW 3.x is now embedded in Query


properties under the tab Navigational State
Fig. 3 Change local query view in BW 3.x

46

Properties in the BEx Analyzer Context Menu

The property as show in Fig. 1 corresponds to the property of that


individual object
The result row suppression, result value selection, and display
format are set here

Fig. 1 Property of 0CALQUARTER

47

Workbook Settings

Settings relevant for the current workbook can be made here

General functions, themes, settings for variable processing,


etc., can be configured here

48

Global Settings

Configure global workbook template, the trace file, local history,


SAPGUI, etc.
See Resources section for Global workbook template details

Fig. 1 Behavior tab in Global Settings

Fig. 2 Configuring Global Workbook Template

You can also temporarily switch on BI statistics for the workbook

Fig. 3 Result after pressing Display Statistics button

49

What Well Cover

Advanced features of Query Designer


Creating Interactive Reports using BEx Analyzer
Advanced formatting features of BEx Analyzer
2 Properties and 2 Settings in BEx Analyzer
Wrap-up

50

Resources

www.bi-expertonline.com/ *
Ned Falk, Everything You Need to Know About Formatting Part
1, 2, 3: BEx Analyzer and BEx Query Designer (BI Expert 2008).
Muke Abdelnaby, A New Way to Change Queries in SAP
NetWeaver BI 7.0 BEx Analyzer (BI Expert, February 2008).
http://help.sap.com
Working in formula mode
http://help.sap.com/saphelp_nw70/helpdata/en/d3/015369f54f
4a0ca19b28c1b45acf00/frameset.htm
BEx Analyzer design items
http://help.sap.com/saphelp_nw70/helpdata/en/d9/bfdfb454b4
465585cc6334eb89b195/frameset.htm

* Requires appropriate credentials to access full text of article

51

Resources (cont.)

SAP Community Network


Prakash Darji, Setting the Global Workbook Template in SAP
NetWeaver 2004s BI or BW 3.x
https://weblogs.sdn.sap.com/pub/wlg/4453
Also search in SDN for Prakash Darji You will get very
useful articles, blogs and comments.
Reporting, Analysis and Planning section in SCN
www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/
90ebc563-724a-2a10-408f-87145877992c
A portal for accessing good reporting information

52

7 Key Points to Take Home

Make use of the new design elements such as check boxes, drop
down lists, etc., to create reports that enhance user experience
The exception aggregation feature offers a great way to produce
KPI reports
Use personalization and shortcuts in Query designer to ease
query design tasks
Use Local formula to enhance the reusability of existing queries
BExGetData marries Excel formatting and BEx data to produce
aesthetically pleasing reports. Make use of this feature.
Create a company-wide workbook template and save it in a central
repository
Use VB Macros and third-party tools as a last resort to solve
formatting challenges Explore BEx Analyzers capabilities first
53

Your Turn!

How to contact me:


Jeevan Kumar Ravindran
Jeevan.Ravindran@tli-usa.com
54

Disclaimer
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, and other SAP products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All
other product and service names mentioned are the trademarks of their respective companies. Wellesley Information Services is neither owned nor
controlled by SAP.

55

You might also like