BW305 BW Query Design and Analysis

611
BW305 BW Query Design and Analysis SAP NetWeaver - Business Intelligence Date Training Center Instructors Education Website Participant Handbook Course Version: 96 Course Duration: 5 Day(s) Material Number: 50104401 An SAP course - use it to learn, reference it for work

description

BW305 - Course material

Transcript of BW305 BW Query Design and Analysis

Page 1: BW305 BW Query Design and Analysis

BW305BW Query Design and Analysis

SAP NetWeaver - Business Intelligence

Date

Training Center

Instructors

Education Website

Participant HandbookCourse Version: 96Course Duration: 5 Day(s)Material Number: 50104401

An SAP course - use it to learn, reference it for work

Page 2: BW305 BW Query Design and Analysis

Copyright

Copyright © 2011 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without theexpress permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary softwarecomponents of other software vendors.

Trademarks

• Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® areregistered trademarks of Microsoft Corporation.

• IBM®, DB2®, OS/2®, DB2/6000®, Parallel Sysplex®, MVS/ESA®, RS/6000®, AIX®, S/390®,AS/400®, OS/390®, and OS/400® are registered trademarks of IBM Corporation.

• ORACLE® is a registered trademark of ORACLE Corporation.• INFORMIX®-OnLine for SAP and INFORMIX® Dynamic ServerTM are registered trademarks

of Informix Software Incorporated.• UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group.• Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®,

VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks ofCitrix Systems, Inc.

• HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World WideWeb Consortium, Massachusetts Institute of Technology.

• JAVA® is a registered trademark of Sun Microsystems, Inc.• JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for

technology invented and implemented by Netscape.• SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP

EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com aretrademarks or registered trademarks of SAP AG in Germany and in several other countries allover the world. All other products mentioned are trademarks or registered trademarks of theirrespective companies.

Disclaimer

THESE MATERIALS ARE PROVIDED BY SAP ON AN "AS IS" BASIS, AND SAP EXPRESSLYDISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR APPLIED, INCLUDING WITHOUTLIMITATION WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE, WITH RESPECT TO THESE MATERIALS AND THE SERVICE, INFORMATION, TEXT,GRAPHICS, LINKS, OR ANY OTHER MATERIALS AND PRODUCTS CONTAINED HEREIN. INNO EVENT SHALL SAP BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,CONSEQUENTIAL, OR PUNITIVE DAMAGES OF ANY KIND WHATSOEVER, INCLUDINGWITHOUT LIMITATION LOST REVENUES OR LOST PROFITS, WHICH MAY RESULT FROMTHE USE OF THESE MATERIALS OR INCLUDED SOFTWARE COMPONENTS.

g201162092726

Page 3: BW305 BW Query Design and Analysis

About This HandbookThis handbook is intended to complement the instructor-led presentation of thiscourse, and serve as a source of reference. It is not suitable for self-study.

Typographic ConventionsAmerican English is the standard used in this handbook. The following typographicconventions are also used.

Type Style Description

Example text Words or characters that appear on the screen. Theseinclude field names, screen titles, pushbuttons as well asmenu names, paths, and options.

Also used for cross-references to other documentationboth internal and external.

Example text Emphasized words or phrases in body text, titles ofgraphics, and tables

EXAMPLE TEXT Names of elements in the system. These include reportnames, program names, transaction codes, table names,and individual key words of a programming language,when surrounded by body text, for example SELECTand INCLUDE.

Example text Screen output. This includes file and directory namesand their paths, messages, names of variables andparameters, and passages of the source text of a program.

Example text Exact user entry. These are words and characters thatyou enter in the system exactly as they appear in thedocumentation.

<Example text> Variable user entry. Pointed brackets indicate that youreplace these words and characters with appropriateentries.

2011 © 2011 SAP AG. All rights reserved. iii

Page 4: BW305 BW Query Design and Analysis

About This Handbook BW305

Icons in Body TextThe following icons are used in this handbook.

Icon Meaning

For more information, tips, or background

Note or further explanation of previous point

Exception or caution

Procedures

Indicates that the item is displayed in the instructor'spresentation.

iv © 2011 SAP AG. All rights reserved. 2011

Page 5: BW305 BW Query Design and Analysis

ContentsCourse Overview ............................................................................. vii

Course Goals.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .viiCourse Objectives ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vii

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse ............1Getting an Overview of SAP NetWeaver Business Warehouse ... . . . . . . . . . . . . . . . . . . . . .2

Unit 2: Navigating in Reports .............................................................. 25Navigating in Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Unit 3: Creating Simple Queries .......................................................... 53Creating Simple Queries.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Unit 4: Working with Key Figures and Structures in Queries ...................... 91Creating Restricted Key Figures... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Creating Calculated Key Figures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Configuring Properties of Key Figures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129Defining Structures and Working with Cells .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145

Unit 5: Working with Characteristics and Hierarchies in Queries................173Configuring Properties of Characteristics and Working With Attributes ... . . . . . . . . .175Integrating Hierarchies into Reports.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189Creating External Hierarchies in SAP NetWeaver BW .... . . . . . . . . . . . . . . . . . . . . . . . . . . .210

Unit 6: Working with Variables in Queries .............................................225Maintaining Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227Creating Characteristic Value and Text Variables in Queries .. . . . . . . . . . . . . . . . . . . . . . .238Creating Hierarchy and Hierarchy Node Variables in Queries.. . . . . . . . . . . . . . . . . . . . . .251Creating Formula Variables in Queries .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262Business Content Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271Transferring Values between Queries using Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277Using Variable Offsets .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286

Unit 7: Working with Exceptions and Conditions in Queries .....................297Creating Exceptions in the BEx Query Designer .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298

2011 © 2011 SAP AG. All rights reserved. v

Page 6: BW305 BW Query Design and Analysis

Contents BW305

Creating Conditions in the BEx Query Designer.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting ....339InfoProviders in SAP NetWeaver Business Warehouse... . . . . . . . . . . . . . . . . . . . . . . . . . . .340InfoProviders in the BEx Query Designer .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346

Unit 9: Handling Workbooks in the BEx Analyzer ...................................359Handling Workbooks in the BEx Analyzer .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer ..............387Performing Ad-hoc Analyses with the BEx Web Analyzer .. . . . . . . . . . . . . . . . . . . . . . . . . .388

Unit 11: Information Broadcasting ......................................................421Information Broadcasting Overview ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422BEx Broadcaster Settings ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427Workbook Precalculation ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443

Unit 12: Integrating Documents into Reports.........................................451Integrating Documents into Reports.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .452

Unit 13: Using Report-Report-Interface ................................................483Using Report-Report-Interface ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484

Unit 14: Managing Queries and Overview of Authorizations......................505Managing Query Objects .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506Getting an Overview of Authorizations in SAP NetWeaver BW .... . . . . . . . . . . . . . . . . .517

Unit 15: Using Business Content ........................................................529Using Business Content .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools ...................................................................545

Getting an Overview of Further SAP NetWeaver BW and SAP BusinessObjectsReporting Tools.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546

Glossary .......................................................................................561

Index ............................................................................................567

vi © 2011 SAP AG. All rights reserved. 2011

Page 7: BW305 BW Query Design and Analysis

Course OverviewThe Business Explorer (BEx) is a component of SAP NetWeaver Business Warehousethat provides flexible reporting and analysis tools that you can use for strategicanalysis and supporting the decision-making process in your organization. You canuse the BEx tools to display past and present data in differing levels of detail and fromdifferent perspectives, on the Web and in Microsoft Excel.

In this course, you learn about the basic functions of SAP NetWeaver BW reporting,starting with navigation in existing reports, continuing on to creating your own querydefinitions in the Query Designer, and taking you through to using analyses inMicrosoft Excel and on the Web.

Target AudienceThis course is intended for the following audiences:

• Project team members with a basic knowledge of data warehousing

Course PrerequisitesRequired Knowledge

• Basic knowledge of data warehousing

Recommended Knowledge

• Experience and sound knowledge of the subject matter in at least one SAP ERPapplication course

Course GoalsThis course will prepare you to:

• Use SAP NetWeaver Business Warehouse as a flexible analytical tool andstructure reports for decision-making support in your organization.

• Create simple and complex query definitions using the BEx Query Designer andto make them available in standard layouts.

• Evaluate past and current data to different levels of detail and from differentperspectives on the Web and in Microsoft Excel

2011 © 2011 SAP AG. All rights reserved. vii

Page 8: BW305 BW Query Design and Analysis

Course Overview BW305

Course ObjectivesAfter completing this course, you will be able to:

• Outline the architecture and reporting structure in SAP NetWeaver BW• Analyze reports in the Business Explorer Analyzer (BEx Analyzer) and the BEx

Web Analyzer using navigation functions• Evaluate the data set in SAP NetWeaver BW by defining queries using the

BEx Query Designer or the BEx Web Analyzer and executing them in the BExAnalyzer and in the BEx Web Analyzer

• Perform Ad-hoc Analysis• Use Information Broadcaster to distribute reports• Integrate documents in reports• Configure the Report-Report-Interface for navigating within SAP NetWeaver BW

and for jumping into other attached systems• Evaluate reports in the Business Content by using the Metadata Repository and

the Business Content Browser

viii © 2011 SAP AG. All rights reserved. 2011

Page 9: BW305 BW Query Design and Analysis

Unit 1Getting an Overview of SAP NetWeaver

Business Warehouse

Unit OverviewThis unit provides an overview of the general features and architecture of the SAPNetWeaver Business Warehouse (SAP NetWeaver BW).

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe the basic functions and most important terms of SAP NetWeaver BW• Explain the reporting functions of SAP NetWeaver BW

Unit ContentsLesson: Getting an Overview of SAP NetWeaver Business Warehouse... . . . .2

2011 © 2011 SAP AG. All rights reserved. 1

Page 10: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

Lesson: Getting an Overview of SAP NetWeaver BusinessWarehouse

Lesson OverviewThis lesson provides an overview of the general features and architecture of the SAPNetWeaver Business Warehouse (SAP NetWeaver BW).

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe the basic functions and most important terms of SAP NetWeaver BW• Explain the reporting functions of SAP NetWeaver BW

Business ExampleYou need a good overview of the structures and important terms in SAP NetWeaverBusiness Warehouse (SAP NetWeaver BW). This overview will help you to reinforcethe BW functions and develop solutions for different tasks you have in your dailywork, such as launching and creating reports within your business area.

Data Warehouse SystemsA data warehouse system serves primarily to stage information from various datasources. This data and information, and the reports resulting from them, constitutethe basis of successful business processes within a company. This type of system canbe used by all employees in a company (that is, by managers, departmental heads,and all other employees).

2 © 2011 SAP AG. All rights reserved. 2011

Page 11: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

Figure 1: Data Warehouse System

The information is staged in various forms including personalized reports, freelydefinable queries, and predefined reports. Recipients of information can use thesereporting and analysis functions to analyze the data for deviations and significantfacts. In the Planning and Campaign Management areas, a data warehouse is used tocarry out data analysis. The following issues might arise when using a data warehousein the Retail Sector area:

• Checking ranges of goods to identify slow moving items and big sellers• Analyzing regional locations to investigate the profitability of different branches• Investigating the effectiveness of market analyses• Evaluating customer surveys and complaints• Analyzing warehouse stock levels• Analyzing shopping carts using cash register receipts

A concrete query might be:

• What were the sales volumes for the Cosmetics, Electrical Goods, and HouseholdGoods departments in the years 2005 and 2006 in New York and Washington,DC?

2011 © 2011 SAP AG. All rights reserved. 3

Page 12: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

In brief, a data warehouse can:

• Pool data from different, mostly heterogeneous sources• Overcome this heterogeneity on different levels (system, schema, and data)• Stage data in the form required by the user

What We Expect from a Data WarehouseDecision-makers urgently need reliable information from Production, Purchasing,Sales and Distribution, Finance, and Human Resources departments. They requirean up-to-date and comprehensive picture of each individual business area and of thebusiness as a whole. This places considerable demands on data staging from theunderlying data sources.

Figure 2: What We Expect from a Data Warehouse

The information must be stored in a homogeneous and consistent form at a centrallocation where it can be called up. Therefore, modern data warehouses require aseparate database that an independent application environment can use to providethe required services objectively.

Efficient analysis techniques with powerful multi-dimensional visualization areindispensable on the presentation side of the data warehouse. The system must be ableto cope with the information needs of the various user groups.

The demands made on the source systems are not so high. What is needed here is aneconomic and comprehensive preparation of the data that is required by the datawarehouse.

4 © 2011 SAP AG. All rights reserved. 2011

Page 13: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

The following demands are made on a data warehouse:

• Standardized structuring and presentation of all company information• An easy-to-use, single point of access to all company information• Sophisticated business reporting methods for self-service analysis at all levels• Fast and cost-effective installation• A high performance environment• Data staging from a heterogeneous environment• Release of source systems and IT organization• Data access independent of the source system• Analysis of data over a specific period of time, and the storage of historical

information (time-dependent master data)

SAP NetWeaver Business WarehouseSuccessful analysis of data relies on the Data Warehouse to load, cleanse, and managethe data for an enterprise's reporting needs. It enables you to analyze data fromoperative SAP applications and from external data sources, such as databases, onlineservices, and the Internet.

Figure 3: SAP NetWeaver Business Warehouse

The system (data storage, loading, and reporting), which is preconfigured by BusinessContent for core areas and processes, allows you to examine the relationships in everyarea of your company.

2011 © 2011 SAP AG. All rights reserved. 5

Page 14: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

The following needs were taken into account when designing the SAP NetWeaverBusiness Warehouse:

• A Data Warehousing system needs optimized data structures for reporting andanalysis.

• A Data Warehousing system is a separate independent system (although thisis not 100% true anymore).

• A Data Warehousing system needs to be based on a comprehensive DataWarehouse architecture.

• A Data Warehousing system needs automated Data Warehouse managementfunctionality.

• A Data Warehousing system needs OLAP functionality and reporting tools

Against this background, SAP created SAP NetWeaver BW. To circumvent thenumerous disadvantages associated with reporting directly in an ERP system, thedata storage, management, and reporting of SAP NetWeaver BW normally takesplace on a separate server installed with just the necessary components of the SAPNetWeaver BW. This becomes the BW server. As a component of SAP NetWeaver,the BW software is delivered with SAP NetWeaver release versions (currently SAPNetWeaver 7.3).

Hint: Although most installations of SAP NetWeaver BW use a standaloneserver, many other configurations are possible. It is even possible to installSAP's ERP product (SAP Enterprise Core Component) together with BW tosave expenses, especially with test and development instances or smallercompanies.

Having implemented SAP NetWeaver BW and its metadata repository (descriptionof data), the customer has the clear advantage of being able to use the entire SAPknow-how built up over the many years of experience in developing business softwaresolutions. Thus, SAP NetWeaver BW can be preconfigured using SAP BusinessContent. All SAP systems can be configured as source systems, and provide datafor all SAP Business Content.

Remember the goal of Data Warehousing is easy: Online Analytical Processing(OLAP) against large amounts of operative and historical data.

The BW server allows you to examine the relationships of data across all areas ofyour organization. OLAP technology permits multidimensional analyses accordingto various business perspectives. To support these goals, the architecture of SAPNetWeaver BW in general – and the warehouse component specifically – is well

6 © 2011 SAP AG. All rights reserved. 2011

Page 15: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

structured and robust. In the following sections you will get to know the basicarchitecture of SAP NetWeaver BW and learn more details about the different layersof this architecture.

SAP NetWeaver BW ArchitectureThe SAP NetWeaver Business Warehouse architecture is structured in three layers:sourcing the data, storing it in the warehouse, and reporting on it with reporting tools.When working with the SAP NetWeaver Business Warehouse you have to concentrateon the three layers. You have to analyze:

• where the data you need is currently stored, how you can access this data, andhow you can upload it to SAP NetWeaver BW.

• how you will store the data in SAP NetWeaver BW, which InfoProviders youwill need, and which levels of storage.

• how the data will be accessed by your power- and end-users, for example, whichreporting tools will be used.

The graphic below shows a rough draft of the three layers the SAP NetWeaver BWarchitecture.

Figure 4: SAP NetWeaver BW three layers Architecture

2011 © 2011 SAP AG. All rights reserved. 7

Page 16: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

Knowing and Extracting Data from your Source SystemsA source system provides the SAP NetWeaver BW with data. You have to distinguishbetween different types of source systems:

SAP Source Systems, for example:

• SAP ERP• SAP NetWeaver BW• SAP SCM• and so on

Non-SAP Sources, for example:

• Databases from different vendors• Web Services that transfer data• Files that hold relevant data• and so on

An important advantage of SAP NetWeaver BW is the fact that is has an openarchitecture vis-à-vis external OLTP providers and other legacy systems. It istherefore possible to connect SAP NetWeaver BW to all possible source systems andto use SAP NetWeaver BW as a consolidated data basis for reporting that covers theentire organization, particularly in a heterogeneous system landscape. SAP deliverstools that allow these interfaces to be implemented quickly and efficiently.

The graphic below gives you an overview of the different source system types that canbe connected to SAP NetWeaver BW and outlines the technological interface that isused for the connection and data staging.

8 © 2011 SAP AG. All rights reserved. 2011

Page 17: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

Figure 5: SAP NetWeaver BW Source Systems and Staging Technology

2011 © 2011 SAP AG. All rights reserved. 9

Page 18: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

Depending on the type of data involved, it is loaded with different technologies toSAP NetWeaver BW.

• BW Service API (S-API): The Service API is a technology package in SAPsource systems of BW that facilitates a high level of integration for datatransfer from the source systems to SAP NetWeaver BW. Therefore, it allowsfor communication between SAP source systems and SAP NetWeaver BW.The Service API is installed on the SAP source system as part of the softwarecomponent Plug-In PI Basis.

• DB Connect: Allows relational databases to be accessed directly. Here, DBmulti-connect is used to create a connection to the database management system(DBMS) in the external database. By importing metadata and original data,the necessary structures can be generated in SAP NetWeaver BW, and the datacan be loaded easily and efficiently.

• UD Connect: Using UD Connect, you can access almost all relational datasources. This technology runs on the J2EE Engine and supports the J2EEConnector Architecture.

• File Interface: SAP NetWeaver BW supports automatic import of files in CSV,ASCII, and XLS format for flat files.

• Web Services: A Web service permits you to send data to the SAP NetWeaverBW system under external control.

• Staging BAPIs: Staging BAPIs are open interfaces, which SAP BusinessObjectsData Services and certified third party tools can use to extract data from oldersystems. The data transfer can be triggered by a request from the SAP NetWeaverBW system or by SAP BusinessObjects Data Services or a third party tool.

10 © 2011 SAP AG. All rights reserved. 2011

Page 19: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

SAP NetWeaver BW InfoObjects

Figure 6: SAP NetWeaver BW InfoObjects

Business analysis-objects (customers, sales volumes, and so on) are calledInfoObjects in SAP NetWeaver BW. These InfoObjects can be divided intocharacteristics and key figures. Characteristics can be further divided into units, timecharacteristics, and technical characteristics (for example, request ID). Key figures areall data fields that are used to store values or quantities (sales volumes, kilowatt-hours,costs, and so on). Characteristics describe the affiliation of key figures. For example,costs belong to a cost center, whereby the cost center is a characteristic. CharacteristicInfoObjects can store master data like texts, attributes, and hierarchies.

Basically, InfoObjects are the smallest components of SAP NetWeaver BW and areused to build InfoProviders.

SAP NetWeaver BW InfoProvidersAfter the data is extracted from a source system into the BW system and initiallystored in the PSA (Persistent Staging Area) tables you need to (in most cases)physically and permanently store it in SAP NetWeaver BW.

For permanent storage and/or to be able to access the BW data with reporting toolsyou need to create InfoProviders.

2011 © 2011 SAP AG. All rights reserved. 11

Page 20: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

InfoProviders are comprised of multiple InfoObjects, concretely key figures (salesvolumes, incoming orders, actual costs, and so on) and a link to the characteristicssuch as cost centers, customers, materials, and so on).

SAP NetWeaver BW offers a range of different InfoProviders for various purposes.Some store data physically, such as InfoCubes, DataStore Objects, and InfoObjects(Characteristics with Attributes or Texts), others are “only” providing an additionalview on the data, such as InfoSets, VirtualProviders and MultiProviders.

Thus, the term “InfoProvider” is the generic term used to describe any objects forwhich you can create and execute queries in SAP NetWeaver BW.

Figure 7: InfoProvider Overview

The table below shows the most important InfoProviders that are available in SAPNetWeaver BW and some of their key characteristics:

12 © 2011 SAP AG. All rights reserved. 2011

Page 21: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

InfoProvider Characteristics

CharacteristicInfoObject

stores master dataexamples: customer, material, cost centeris used, together with the Key Figure InfoObject, to buildthe tables of the other InfoProviders

DataStore Object stores transaction data on detailed levelexample: sales order data on item levelis normally used to resolve and consolidate datasets

InfoCube stores transaction data on aggregated levelexample: sales amounts and quantities per month

MultiProvider provides view on data of several InfoProvidersexample: sales amounts in Germany (InfoCube A) and theUSA (InfoCube B)

The graphic below gives you a rough idea how the different InfoProviders can be usedin SAP NetWeaver BW. Each InfoProvider fulfills a separate role and can be loadedwith data from the source systems. And the data can be accessed and reported viathe SAP NetWeaver BW reporting tools.

Figure 8: SAP NetWeaver BW InfoProviders

2011 © 2011 SAP AG. All rights reserved. 13

Page 22: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

Data Warehousing Workbench and SAP NetWeaver BW InfoAreasWithin the DataWarehousingWorkbench, which is a workplace for SAP NetWeaverBW administrators and which is used to configure, control, and administrate SAPNetWeaver BW both the InfoObjects and the InfoProviders are organized in folderscalled InfoAreas. These InfoAreas are also visible in the reporting tools to easily finddesired objects. The central transaction to call the Data Warehousing Workbenchis RSA1.

Dealing with the SAP NetWeaver BW reporting tools(Business Explorer Suite)The Business Explorer Suite (BEx Suite) of SAP NetWeaver BW provides flexiblereporting and analysis tools targeted at both power users and end users. You can usethe tools of the BEx Suite for strategic analysis and to support the decision-makingprocess in your organization. The tools include query, reporting, and analysisfunctions. BEx enables a broad range of users to access BW information usingfor example the SAP Portal, Intranet/Internet, or mobile devices. Many analysisfeatures are available; slice and dice (pivot like functions) is only the beginning. Inaddition, many output options are supported, including formatted Microsoft Excel,Web cockpits, formatted Web output (BEx Reports) and Adobe PDF documents.

The SAP NetWeaver BW provides InfoProviders through which the data stored in theBW database can be accessed. You can analyze the data of BW by defining Queriesagainst these InfoProviders using the BEx Query Designer. You can determine theway in which the data from your chosen InfoProvider is displayed and analyzed byselecting and combining characteristics and key figures in a Query.

Data analysis based on multidimensional data sources, like SAP NetWeaver BW(OLAP reporting), allows you to analyze more than one dimension of an InfoProvider(for example, time, place, and product) at the same time. This means that you canmake any number of variance analyses (plan/actual comparison and business yearcomparison). The data, which is displayed in a manner similar to a pivot table, servesas the starting point for a detailed analysis, and can be used to answer a myriadof questions. Numerous interaction options – such as sorting, filtering, swappingcharacteristics, recalculating values, and so on – allow you to flexibly navigate in thedata at runtime. You can also visualize the data in graphics (bar or pie charts, forexample). Moreover, you can use exception reporting to determine special situationsand critical measurement thresholds. When these thresholds are met, InformationBroadcasting can automatically send messages about these issues via e-mail or SMSor to the Knowledge Management repositories with access to it from the portal.

You can analyze data with the tools of the Business Explorer Suite as shown on thegraphic below.

14 © 2011 SAP AG. All rights reserved. 2011

Page 23: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

Figure 9: The Business Explorer Suite within the SAP NetWeaver BWArchitecture

BEx Query Designer

As a basis for data analysis you define Queries for the various InfoProviders. Byselecting and combining InfoObjects (characteristics and key figures) or reusableQuery elements, you determine the way in which you evaluate the data in the selectedInfoProvider. The BEx Query Designer is the tool you use to define and edit queries.

BEx Analyzer

To analyze and present data in a Microsoft Excel environment, you can use BExAnalyzer. Queries, Query views, and InfoProviders that are created with the BExQuery Designer are embedded in workbooks. You can modify the layout andinteraction of workbooks and use the Microsoft Excel formatting and formulafunctions. The workbooks that are created can be saved as favorites or made availableto other users using the role concept. The workbooks can also be sent to other usergroups by e-mail (Broadcasting).

BEx Web Analyzer

To analyze and present data in a Web environment, you can use the BEx WebAnalyzer. Queries, Query views, and InfoProviders that are created with the BExQuery Designer can be opened in the BEx Web Analyzer. You can then navigate,analyze, and drill down the selected data.

2011 © 2011 SAP AG. All rights reserved. 15

Page 24: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

BEx Web Application Designer

The BEx Web Application Designer allows you to implement complex OLAPnavigation in Web applications and Web cockpits for both simple and highly individualscenarios. These scenarios can be created using customer-defined interface elementsusing standard markup languages and Web design APIs. The Web ApplicationDesigner encompasses a wide spectrum of interactive Web-based scenarios that youcan modify to suit your requirements using standard Web technology.

You can use the BEx Web Application Designer, the desktop application for creatingWeb applications, to generate HTML pages that contain BW-specific content suchas various tables, charts, or maps. You can save the Web applications as URLs andaccess them from the Internet, intranet, or mobile devices. You can also save Webapplications as iViews and integrate them into an enterprise portal.

BEx Report Designer

Enterprise reporting (formatted reporting) with positioning control and displayformatting can be accomplished in several ways in BW. Features of the BEx Analyzerallow for customized, highly formatted Excel workbooks, while the BEx ReportDesigner does the same for Web output or conversion of the document to PDF. In theunlikely event that these options do not meet your needs, third-party tools can easilyaccess physical BW data or data residing physically on other systems.

Information Broadcasting

Information broadcasting provides a tool set to execute analyses (BEx Web, BExAnalyzer, workbooks, and Queries) at a desired time and frequency, then distribute theresults to intended recipients. The distribution can be exception-threshold-triggeredand can be scheduled via a Web-based UI.

Both the Microsoft Excel and Web areas are seamlessly integrated. In other words,you can display Queries in the BEx Analyzer as well as in a standard view in theWeb browser or you can display the Excel rendering of the data from a Web pagewith a single click.

The SAP NetWeaver Portal serves as the main interface for users wanting to accessbusiness information. With powerful Knowledge Management features for a widerange of collaboration and feedback activities, the SAP NetWeaver Portal integratesthe reporting and analysis tasks of users of all types. BEx Web Applications andBEx reports are deployed in SAP NetWeaver Portal. They are easily converted intoPDF format and printed.

16 © 2011 SAP AG. All rights reserved. 2011

Page 25: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

Benefits

• Empower business users• Design queries in an easy and intuitive way and use as the basis for a

user-oriented presentation of information and effective analysis• Design presentation-quality, print-optimized formatted reports• Wizard-based creation of Web applications for all user types – no coding

necessary• Provides BW data in a user-oriented and flexible way• Information is provided for all types of BW users• Personalized access to BW information in SAP NetWeaver Portal supports quick

and efficient decision making• Simple conversion of reports and Web applications to PDF files allowing BW

information to be printed as required

Different User Types in SAP NetWeaver BWNew studies have shown that up to 70 percent of all OLAP system users are basicusers. Compared to the advanced users and query developers, basic users only usethe system's analytical functions on a very small scale. This is because the basicusers usually carry out predefined queries with fixed datasets. Therefore, most SAPusers need a simple user interface.

Figure 10: Different User Types

2011 © 2011 SAP AG. All rights reserved. 17

Page 26: BW305 BW Query Design and Analysis

Unit 1: Getting an Overview of SAP NetWeaver Business Warehouse BW305

However, the experienced users and query developers who design and carry outinformation analyses on several levels must be able to use a comprehensive andeffective range of tools for their analyzing options.

SAP catered to these various user needs when developing SAP NetWeaver BW.

18 © 2011 SAP AG. All rights reserved. 2011

Page 27: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of SAP NetWeaver Business Warehouse

Lesson Summary

You should now be able to:• Describe the basic functions and most important terms of SAP NetWeaver BW• Explain the reporting functions of SAP NetWeaver BW

2011 © 2011 SAP AG. All rights reserved. 19

Page 28: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Describe the basic functions and most important terms of SAP NetWeaver BW• Explain the reporting functions of SAP NetWeaver BW

20 © 2011 SAP AG. All rights reserved. 2011

Page 29: BW305 BW Query Design and Analysis

BW305 Test Your Knowledge

Test Your Knowledge

1. What type of source systems can be connected to SAP NetWeaver BW?Choose the correct answer(s).□ A Data sources based on XML□ B SAP systems□ C Databases□ D Fax machines

2. Which of the following statements are true regarding InfoObjects?Choose the correct answer(s).□ A Characteristics and key figures are InfoObjects.□ B An InfoObject can also be an InfoProvider.□ C All attributes are characteristic or key figure InfoObjects.□ D All characteristic InfoObjects carry attribute, text, and hierarchy data.

3. Which of the following statements are true regarding InfoProviders?Choose the correct answer(s).□ A InfoProviders are built out of InfoObjects.□ B InfoProviders are organized within InfoAreas.□ C InfoProviders always store data physically.□ D InfoProviders serve as basis for SAP NetWeaver BW queries.

4. What options does SAP NetWeaver BW reporting offer for creating reports?Choose the correct answer(s).□ A You can display analyses inMicrosoft Excel using the BEx Analyzer.□ B You can display analyses on the web using the Enterprise Portal and

the Web Analyzer.□ C A query can either only be executed in Microsoft Excel or only in

the web.□ D You can convert a Microsoft Excel table query into a BW report.

2011 © 2011 SAP AG. All rights reserved. 21

Page 30: BW305 BW Query Design and Analysis

Test Your Knowledge BW305

Answers

1. What type of source systems can be connected to SAP NetWeaver BW?

Answer: A, B, C

Fax machines cannot be directly connected to SAP NetWeaver BW as a sourcesystem. A facsimile image could be stored in SAP NetWeaver BW as adocument through document integration.

2. Which of the following statements are true regarding InfoObjects?

Answer: A, B, C

Characteristic InfoObjects may carry attribute, text, and hierarchy master data,but each type of master data can be specified in the InfoObject definition asneeded.

3. Which of the following statements are true regarding InfoProviders?

Answer: A, B, D

Some InfoProviders store data physically, such as InfoCubes, DataStore Objects,and InfoObjects (Characteristics with Attributes, Texts, or Hierarchies), othersare “only” providing an additional view on the data, such as MultiProviders,InfoSets, or VirtualProviders.

4. What options does SAP NetWeaver BW reporting offer for creating reports?

Answer: A, B

Both the Microsoft Excel and Web areas are seamlessly integrated. In otherwords, you can display Queries in the BEx Analyzer as well as in a standardview in the Web browser.AMicrosoft Excel table query cannot communicate directly with SAP NetWeaverBW directly.

22 © 2011 SAP AG. All rights reserved. 2011

Page 31: BW305 BW Query Design and Analysis
Page 32: BW305 BW Query Design and Analysis
Page 33: BW305 BW Query Design and Analysis

Unit Summary BW305

23 © 2011 SAP AG. All rights reserved. 2011

Page 34: BW305 BW Query Design and Analysis

Unit Summary BW305

24 © 2011 SAP AG. All rights reserved. 2011

Page 35: BW305 BW Query Design and Analysis

Unit 2Navigating in Reports

Unit OverviewThis unit deals with the different options for navigating in the BEx Analyzer and inthe BEx Web Analyzer.

Unit ObjectivesAfter completing this unit, you will be able to:

• Use the navigation options in the BEx Analyzer and the BEx Web Analyzer .• Use the functions of the context menu• Use the functions of drag and drop navigation• Save a navigational state as a query view

Unit ContentsLesson: Navigating in Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Exercise 1: Navigate in Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2011 © 2011 SAP AG. All rights reserved. 25

Page 36: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

Lesson: Navigating in Reports

Lesson OverviewThis lesson deals with the different options for navigating in the BEx Analyzer and inthe BEx Web Analyzer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Use the navigation options in the BEx Analyzer and the BEx Web Analyzer .• Use the functions of the context menu• Use the functions of drag and drop navigation• Save a navigational state as a query view

Business ExampleYou want to analyze business key figures (for example, sales volumes or costs) withinexisting BW reports. You use BW reporting and navigation options to analyze keyfigures.

To show the reports and to navigate use either the BEx Analyzer or the BEx WebAnalyzer .

Sometimes it might be wise to save a navigational state for easy reuse.

BEx AnalyzerTo analyze and present data in a Microsoft Excel environment, you can use BExAnalyzer. Queries, query views and InfoProviders that are created with BEx QueryDesigner are embedded in workbooks. You can modify the layout and interactionof workbooks and use the Microsoft Excel formatting and formula functions. Theworkbooks that are created can be saved as favorites or made available to other usersusing the role concept. The workbooks can also be sent to other user groups by e-mail.

In the BEx Analyzer, you work in three modes: In analysis mode you navigatein the report results, in design mode you develop flexible individual workbooks,and in formula mode you format the results area of the analysis pane to suit yourrequirements.

Analysis Mode: Once you have inserted a query into a workbook, the first view on theanalysis grid displays the distribution of the characteristics and key figures in the rowsand columns of the query. You can use the various navigation functions to changethe query and generate additional views of the data. When you navigate, you execute

26 © 2011 SAP AG. All rights reserved. 2011

Page 37: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

OLAP functions such as filtering, drilling down, and sorting characteristics and keyfigures in rows and columns of the analysis grid. You can also expand hierarchies aswell as activate or deactivate conditions and exceptions. In the Variables dialog, youcan specify variable values so that you only fill individual components of the query orthe entire query with values when it is displayed in the BEx Analyzer.

BEx Web AnalyzerThe BEx Web Analyzer is a tool for data analysis that is called with a URL or as aniView in the portal. In the Web Analyzer, you can open a data provider (query, queryview, InfoProvider, external data source) and generate views on BW data (queryviews) using ad hoc analysis. The query views can be used as data providers for furtherBEx applications. You can also save and broadcast the results of your ad hoc analysis.

The “Open” DialogCalling the BEx Analyzer:

Call the BEx Analyzer, either from the transaction RRMX, or the menu path Start→ Programs → Business Explorer → Analyzer. Choose Add-Ins to launch the BExAnalysis Toolbox.

Then choose Open → Open Query.

Figure 11: The “Open” Dialog in the BEx Analyzer

2011 © 2011 SAP AG. All rights reserved. 27

Page 38: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

To launch the “Open” Dialog in the BEx Web Analyzer, call the BEx Web Analyzerfrom the SAP NetWeaver Enterprise Portal and choose New Analysis.

Figure 12: The “Open” Dialog in the BEx Web Analyzer

When you begin an analysis in the BEx Analyzer or in the BEx Web Analyzer, youbegin with the Open dialog. In this dialog, you are able to choose:

1. The system from which you will retrieve data2. The object type (query, query view, or InfoProvider) you will access3. The grouping of objects of the chosen type (History, Favorites, Roles, InfoAreas)

to be displayed or you can use the Find function.4. Any filtering value to limit which objects are displayed.

These settings serve to quickly lead you to the desired query, view, or InfoProviderfor execution.

28 © 2011 SAP AG. All rights reserved. 2011

Page 39: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Navigating in Reports

Figure 13: Navigation Options

Shown above is a list of the first level navigation options you can access from theBEx Analyzer and/or the BEx Web Analyzer. Bear in mind that not all options areavailable in all contexts, and that many of the first level choices have additionaloptions available. The list above is just to give you an idea of the scope of possiblenavigation options.

2011 © 2011 SAP AG. All rights reserved. 29

Page 40: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

Navigational techniques

• In both the BEx Analyzer and the BEx Web Analyzer, you can navigate by callingthe Context Menu using the right mouse button.

The choices available in the context menu will depend on where you call thecontext menu. The context menu allows you to navigate in different ways withinthe report output and offers various functions depending on the cell context.

• In both the BEx Analyzer and the BEx Web Analyzer, you can navigate by usingDrag and Drop navigation for many of the basic navigation options. This isoften quicker and more intuitive to the user than using the context menu. Notall navigation options can be done with drag and drop, but many of the mostcommon navigation options can be done either way.

• In both the BEx Analyzer and the BEx Web Analyzer you can find Symbols. Theanalysis grid and the navigation pane can contain various types of symbols fornavigation, for example a symbol for sorting in increasing or decreasing order.

• Only in the BEx Analyzer you can use the double-click on the left mouse buttonto drill down or to remove drilldown.

In the graphics that follow, we will explore some of the most frequently usednavigation options.

Figure 14: Drag and Drop Navigation / Filtering Options in the BEx Web Analyzer

30 © 2011 SAP AG. All rights reserved. 2011

Page 41: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Shown above are some of the ways in which drag and drop navigation can be used inthe BEx Web Analyzer. Additionally, you also see the display of the Filter area thatallows for several styles of filtering activity.

Users are free to drag characteristic and key figure values to various areas of theanalysis area to dynamically change the layout of the analysis.

Figure 15: BEx Analyzer Navigation Buttons

In the BEx Analyzer, three buttons are provided to the user for frequently usednavigation. The Filter button, when selected, opens a Navigation Area within theanalysis. This navigation area allows the user to change the drilldown, select filtervalues and swap the location of characteristics and key figures in the analysis.

The Chart button, if selected, changes the analysis table into a chart. Once the chartis displayed, the title on the button changes to Table to toggle the display back to atabular view.

The Info button, when selected, displays a variety of text elements, which serve togive the user a better context for the analysis results.

The following pages will explore some of the most common navigation techniquesusing drag and drop functionality.

2011 © 2011 SAP AG. All rights reserved. 31

Page 42: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

Figure 16: Exchange ... with ...

Any time you want to swap the location of one object in the analysis with anotherobject, you may simply drag one item on top of the other and the change will be madeautomatically. Above, the user swaps Distribution channel for Material. The usercould have also brought up the context menu for either characteristics and selectedExchange ... with ... to effect the swap.

32 © 2011 SAP AG. All rights reserved. 2011

Page 43: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Figure 17: Drill Down

One of the most common navigation functions is the Drill Down. In the graphicabove, the user drags Division from the navigation area and drops it on top of thevalues for Distribution channel. This has the effect of adding an additional level ofdetail for Division to the analysis.

Figure 18: Keep Filter Value

2011 © 2011 SAP AG. All rights reserved. 33

Page 44: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

You can select as filter value directly from the results area of an executed report. Todo this, you could position the cursor on the filter value required, and choose KeepFilter Value on Axis from the context menu. The filter value is then displayed in thereport and the report results are restricted to the filter value in question. Or you could,as the graphic shows, simply drag the characteristic value you want to use as a filterto the right side of the navigation area and drop it. The value will automatically beused as a filter for the analysis.

Figure 19: Remove Filter Value

With the Remove Filter Value option, you can exclude certain values from appearingin the analysis. Often, this is easier than trying to include many values as filter values.

Simply drag the characteristic value outside of the analysis area and it will excludeany data for that characteristic value.

There are many more navigation options you can use in the analysis, but most are veryintuitive and can be mastered quickly by even casual users.

Saving Query ViewsYou save a current navigational state as a query view to open a report exactly usingthis navigational state as the initial one.

34 © 2011 SAP AG. All rights reserved. 2011

Page 45: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Figure 20: Saving Query Views

Basically, a query view which is saved using the BEx Analyzer can be opened also inthe BEx Web Analyzer and vice versa.

But: within the definitions of Exceptions and Conditions there are a few settings,which can be configured and displayed via the BEx Web Analyzer only.

Figure 21: BEx Analyzer – Open Query View

2011 © 2011 SAP AG. All rights reserved. 35

Page 46: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

Figure 22: BEx Web Analyzer – Open Query View

36 © 2011 SAP AG. All rights reserved. 2011

Page 47: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Exercise 1: Navigate in Reports

Exercise ObjectivesAfter completing this exercise, you will be able to:• Use the navigation options in the BEx Analyzer via the context menu, via drag

& drop, and via double-click.• Use the navigation options in the BEx Web Analyzer via the context menu and

via drag & drop.

Business ExampleYou want to analyze business key figures (for example, sales volumes or incomingorders) within existing BW queries by using the different navigation options.

Task 1:In the BEx Analyzer, execute the query Sales Analysis 001 (P_SALES_ANALY-SIS_001) and use the different navigation options to analyze the business key figureswithin the report.

1. Start the BEx Analyzer and execute the query Sales Analysis 001(P_SALES_ANALYSIS_001). Use the Find function to search by either thedescription or technical name.

2. Insert the characteristic Distribution Channel in the drill-down.

Try out both inserting it in the rows and in the columns. Use different navigationtechniques.

3. Remove the characteristic Distribution Channel from the drill-down, again usingdifferent navigation techniques.

4. Exchange Country with Material using Drag&Drop.

5. Display the Material using the hierarchy Product Hierarchy for material MARA.Expand and collapse hierarchy nodes, and finally, go back to the initial stateof the report.

6. Drop the key figure Sales Volume EUR directly onto the key figure IncomingOrders EUR. What happens?

7. Remove the key figure Invoiced quantity via Drag & Drop.

How can you insert the removed key figure in the report again?

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 37

Page 48: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

8. Exclude the Country value United States (US) from the results using drag anddrop.

How can you insert the removed value in the report again?

9. Now, show results only for Country United States (US) and then add anadditional drill-down by Material in the rows to find out which materials makeup the total in the United States (US).

10. Compare the result of the previous navigation option with the result of thefollowing one: go 2 steps back and from Country United States (US) choose thecontext menu function Filter and Drill Down → Material.

11. Go back to the initial view of the query.

12. In order to change the drill-down you also can use the Query Properties functionfrom the context menu. Place the Distribution Channel characteristic in the rowsunder the Country characteristic by using this possibility. Additionally, repeatedkey values should not be suppressed any more.

Note: Be aware that via Context Menu → Query Properties there aremany functions to configure the Local Query Properties in sense ofconfiguring the properties of the executed report.

13. Finally, save a view for your own user-defined navigational state of the report.Save the view under Favorites using the description U## View 001 and thetechnical name U##_VIEW_001.

14. Now execute your new view U## View 001 (U##_VIEW_001) in the BExAnalyzer again.

Task 2:Now use the BEx Web Analyzer within the SAP NetWeaver Enterprise Portal toexecute the query Sales Analysis 001 (P_SALES_ANALYSIS_001) and again, usedifferent navigation options to analyze the business key figures within the report.

1. To access the BEx Web Analyzer, logon to the attached Portalby executing transaction code ZPORTAL from your assignedBW system or opening your web browser and entering the URLhttp://portal-(SID).wdf.sap.corp:50100/irj where (SID) is tobe replaced by your assigned BW system ID. Enter the user ID and passwordprovided by your instructor.

Go to Reporting, Analysis and Planning → Business Explorer → BEx WebAnalyzer.

Continued on next page

38 © 2011 SAP AG. All rights reserved. 2011

Page 49: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

2. Execute the query Sales Analysis 001 (P_SALES_ANALYSIS_001). Use theSearch function to search by either the description or technical name.

3. Insert the characteristic Distribution Channel in the drill-down.

Try out both inserting it in the rows and in the columns. Use different navigationtechniques.

4. Remove the characteristic Distribution Channel from the drill-down, again usingdifferent navigation techniques.

5. Exchange Country with Material using Drag&Drop.

6. Display the Material using the hierarchy Product Hierarchy for material MARA.Expand and collapse hierarchy nodes, and finally, go back to the initial stateof the report.

7. You have to execute the report again via New Analysis. In the executed reportdrag and drop the key figure Sales Volume EUR directly onto the key figureIncoming Orders EUR. What happens?

8. Remove the key figure Invoiced quantity via Drag & Drop.

How can you insert the removed key figure in the report again.

9. Exclude the Country value United States (US) from the results using drag anddrop.

How can you insert the removed value in the report again.

10. Now, show results only for Country United States (US) and then add anadditional drill-down by Material in the rows to find out which materials makeup the total in the United States (US).

11. Compare the result of the previous navigation option with the result of thefollowing one: go 2 steps back and from Country United States (US) choose thecontext menu function Filter → Filter and Drill Down by → Material.

Where can you display the filter situation of the report?

12. Remove the filter value for Country and insert Country as the first characteristicin the drilldown, the second characteristic in the drilldown should still beMaterial. Additionally, repeated key values should not be suppressed any more.

13. Finally, save a view for your own user-defined navigational state of the report.For the view, use the description U## View 002 and the technical nameU##_VIEW_002.

14. Now execute your new view U## View 002 (U##_VIEW_002) in the BEx WebAnalyzer again.

2011 © 2011 SAP AG. All rights reserved. 39

Page 50: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

Solution 1: Navigate in ReportsTask 1:In the BEx Analyzer, execute the query Sales Analysis 001 (P_SALES_ANALY-SIS_001) and use the different navigation options to analyze the business key figureswithin the report.

1. Start the BEx Analyzer and execute the query Sales Analysis 001(P_SALES_ANALYSIS_001). Use the Find function to search by either thedescription or technical name.

a) Choose Start → Programs → Business Explorer → Analyzer

b) Choose Add-Ins.

c) In the BEx Analysis Toolbox, click the Open button.

d) Select Open Query.

e) Logon with your user ID and password when prompted.

f) Click the Find button on the left and then enter either the technical name ordescription. Select the Find button. When the query is found, select theOpen button at the bottom to execute the query.

2. Insert the characteristic Distribution Channel in the drill-down.

Try out both inserting it in the rows and in the columns. Use different navigationtechniques.

a) Click the Filter button to open the navigation pane.

b) You can use Drag&Drop to insert Distribution Channel in the rows orin the columns.

c) Or: from the context menu of Distribution Channel: Add DrilldownAccording to Distribution Channel in Rows and Add Drilldown Accordingto Distribution Channel in Columns

d) Or: use double-click on Distribution Channel to insert it into the rows.

3. Remove the characteristic Distribution Channel from the drill-down, again usingdifferent navigation techniques.

a) You can use Drag&Drop.

b) Or: from the context menu of Distribution Channel: Remove Drilldown.

c) Or: use double-click on Distribution Channel.

Continued on next page

40 © 2011 SAP AG. All rights reserved. 2011

Page 51: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

4. Exchange Country with Material using Drag&Drop.

a) Highlight the Material characteristic from the filter area, then drag anddrop it directly over the Country characteristic in the filter area or over theCountry heading in the results area. When the mouse pointer changes toshow two arrows in a circular motion you are ready to release the mousebutton.

5. Display the Material using the hierarchy Product Hierarchy for material MARA.Expand and collapse hierarchy nodes, and finally, go back to the initial stateof the report.

a) Highlight the heading Material and select from the context menuProperties. From the Hierarchy tab choose the hierarchy ProductHierarchy for material MARA from the drop-down box. Click OK to seethe result displayed using the hierarchy.

b) Expand and collapse hierarchy nodes using the symbols at the beginningof the rows.

c) Or: use the functions in the context menu: Expand Hierarchy Node,Collapse Hierarchy Node, and Expand to Level.

d) In order to go back to the initial state of the report: from any cell of thereport: Right click → Context menu → Back to Start.

6. Drop the key figure Sales Volume EUR directly onto the key figure IncomingOrders EUR. What happens?

a) Highlight the heading Sales Volume EUR and drag and drop this directlyover the heading Incoming Orders EUR . The sequence of the key figureswill be swapped.

7. Remove the key figure Invoiced quantity via Drag & Drop.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 41

Page 52: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

How can you insert the removed key figure in the report again?

a) Highlight the heading Invoiced quantity and drag and drop this outside theresults area. When the mouse pointer changes to show a black filter iconyou can then release the mouse button. The Invoiced quantity key figureis now gone.

b) To insert the removed key figure into the report again, you can chooseContext menu → Back One Navigation Step.

c) Or: in the navigation pane: use the context menu for Key Figures, thenchoose Select Filter Value ...., and in the Select Values for Displayed KeyFigures window, drag the key figure Invoiced quantity to the right-handside, and choose OK.

d) Or: in the navigation pane: use the context menu for Key Figures, thenchoose Remove Filter

8. Exclude the Country value United States (US) from the results using drag anddrop.

How can you insert the removed value in the report again?

a) Highlight the cell, which contains the Country value United States (US),then drag and drop this anywhere outside the results area. Wait until yousee the mouse pointer change to show a black filter before releasing themouse button.

b) To insert the removed value into the report again, you can choose Contextmenu → Back One Navigation Step.

c) Or: use the context menu for Country, then choose Remove Filter

9. Now, show results only for Country United States (US) and then add anadditional drill-down by Material in the rows to find out which materials makeup the total in the United States (US).

a) Highlight the cell containing the Country value United States (US) thenright click to show the context menu. Select Keep Filter Valuemenu option.

b) Then, in the navigation pane, double click on Material.

c) Or: context menu for Material, then choose Add Drilldown Accordingto Material in Rows.

Continued on next page

42 © 2011 SAP AG. All rights reserved. 2011

Page 53: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

10. Compare the result of the previous navigation option with the result of thefollowing one: go 2 steps back and from Country United States (US) choose thecontext menu function Filter and Drill Down → Material.

a) From any cell of the report: Right click → Context menu → Back OneNavigation Step (2 times).

b) Highlight the cell containing the Country value United States (US), thenright click to show the context menu. Select Filter and Drill Down →Material.

11. Go back to the initial view of the query.

a) From any cell of the report: Right click → Context menu → Back to Start.

12. In order to change the drill-down you also can use the Query Properties functionfrom the context menu. Place the Distribution Channel characteristic in the rowsunder the Country characteristic by using this possibility. Additionally, repeatedkey values should not be suppressed any more.

Note: Be aware that via Context Menu → Query Properties there aremany functions to configure the Local Query Properties in sense ofconfiguring the properties of the executed report.

a) From any cell of the report: Right click → Context menu → QueryProperties.

b) On the Navigational State tab page: Transfer the characteristic DistributionChannel from the Free Characteristics area into the Rows area underCountry by using drag & drop or the Arrow buttons.

c) On the Display Options tab page: uncheck the box Suppress RepeatedKey Values.

d) Finally, press OK.

13. Finally, save a view for your own user-defined navigational state of the report.Save the view under Favorites using the description U## View 001 and thetechnical name U##_VIEW_001.

a) Make any navigational steps you want and save the navigational state in aview using BEx Analysis Toolbox: Save → Save View under the Favoritesfolder.

Description U## View 001

Technical name U##_VIEW_001

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 43

Page 54: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

14. Now execute your new view U## View 001 (U##_VIEW_001) in the BExAnalyzer again.

a) In the BEx Analysis Toolbox, click the Open button.

b) Select Open Query.

c) Change the Type at the bottom of the window into Query View. You willfind very easily your view under the Favorites folder or under the Historyfolder.

d) Open the desired view.

Task 2:Now use the BEx Web Analyzer within the SAP NetWeaver Enterprise Portal toexecute the query Sales Analysis 001 (P_SALES_ANALYSIS_001) and again, usedifferent navigation options to analyze the business key figures within the report.

1. To access the BEx Web Analyzer, logon to the attached Portalby executing transaction code ZPORTAL from your assignedBW system or opening your web browser and entering the URLhttp://portal-(SID).wdf.sap.corp:50100/irj where (SID) is tobe replaced by your assigned BW system ID. Enter the user ID and passwordprovided by your instructor.

Go to Reporting, Analysis and Planning → Business Explorer → BEx WebAnalyzer.

a) From your Citrix desktop, choose Start → Programs → Internet Explorer

b) From the browser window, enter the URL of http://portal-(SID).wdf.sap.corp:50100/irj where (SID) is the system ID ofyour assigned BI system (or simply execute transaction code ZPORTALfrom your assigned BW system).

c) On the Portal logon screen, enter your assigned user ID and password,and then click the Log on button.

d) In the Portal, go to Reporting, Analysis and Planning → Business Explorer→ BEx Web Analyzer.

Continued on next page

44 © 2011 SAP AG. All rights reserved. 2011

Page 55: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

2. Execute the query Sales Analysis 001 (P_SALES_ANALYSIS_001). Use theSearch function to search by either the description or technical name.

a) Choose the New Analysis button.

b) In the Open window, check if the Type is Query. If not, change it to Query.

c) Open the Search tab.

d) Enter either the technical name or description. Press the Search button.Select the desired query and OK.

3. Insert the characteristic Distribution Channel in the drill-down.

Try out both inserting it in the rows and in the columns. Use different navigationtechniques.

a) You can use Drag&Drop to insert Distribution Channel in the rows orin the columns.

When using Drag&Drop you can move the characteristics either within thenavigation area, or within the result area, or between the navigation areaand the result area.

b) Or: from the context menu of Distribution Channel: Change Drilldown →Drilldown by → Horizontal / Vertical.

4. Remove the characteristic Distribution Channel from the drill-down, again usingdifferent navigation techniques.

a) Use Drag&Drop to move Distribution Channel out of the result area.

b) Or: from the context menu of Distribution Channel: Change Drilldown →Remove Drilldown .

5. Exchange Country with Material using Drag&Drop.

a) Drag Material characteristic and drop it directly over the Countrycharacteristic in the navigation area or over the Country heading in theresults area.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 45

Page 56: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

6. Display the Material using the hierarchy Product Hierarchy for material MARA.Expand and collapse hierarchy nodes, and finally, go back to the initial stateof the report.

a) From the context menu of Material characteristic select Properties →Characteristic. From the Hierarchy tab choose the hierarchy ProductHierarchy for material MARA from the drop-down box. Click OK to seethe result displayed using the hierarchy.

b) Expand and collapse hierarchy nodes using the symbols at the beginningof the rows.

c) Or: use the functions in the context menu: Hierarchy Node Expandedand Expand Hierarchy.

d) In order to go back to the initial state of the report: from any cell of thereport: Right click → Context menu → Back to Start.

7. You have to execute the report again via New Analysis. In the executed reportdrag and drop the key figure Sales Volume EUR directly onto the key figureIncoming Orders EUR. What happens?

a) Drag and drop Sales Volume EUR directly over the heading IncomingOrders EUR . The sequence of the key figures will be swapped.

8. Remove the key figure Invoiced quantity via Drag & Drop.

How can you insert the removed key figure in the report again.

a) Drag and drop Invoiced quantity outside the results area. When the mousepointer changes to show a black cross icon you can then release the mousebutton. The Invoiced quantity key figure is now gone.

b) To insert the removed key figure into the report again, you can chooseContext menu → Back One Navigation Step.

c) Or: in the navigation pane: use the context menu for Key Figures, thenchoose Filter → Remove Filter Value.

9. Exclude the Country value United States (US) from the results using drag anddrop.

Continued on next page

46 © 2011 SAP AG. All rights reserved. 2011

Page 57: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

How can you insert the removed value in the report again.

a) Highlight the cell which contains the Country value United States (US),then drag and drop this anywhere outside the results area. Wait until yousee the mouse pointer change to show a black cross before releasing themouse button.

b) To insert the removed value into the report again, you can choose Contextmenu → Back One Navigation Step.

c) Or: use the context menu for Country, then choose Filter → RemoveFilter Value.

10. Now, show results only for Country United States (US) and then add anadditional drill-down by Material in the rows to find out which materials makeup the total in the United States (US).

a) In the context menu of the cell containing the Country value United States(US) select Filter → Keep Filter Value menu option.

b) Then, from the navigation pane, drag and drop Material at the beginningof the result area, or drag and drop it, within the navigation area, into theRows as the first characteristic.

c) Or: context menu for Material, then Change Drilldown → Drilldown by→ Vertical.

11. Compare the result of the previous navigation option with the result of thefollowing one: go 2 steps back and from Country United States (US) choose thecontext menu function Filter → Filter and Drill Down by → Material.

Where can you display the filter situation of the report?

a) From any cell of the report: Right click → Context menu → Back OneNavigation Step (2 times).

b) Choose the cell containing the Country value United States (US), thenright click to show the context menu. Select Filter → Filter and DrillDown by → Material.

c) In order to display the filter situation of the report, press the Info button andlook under Dynamic Filters.

d) Or: Use the Filter link on the right-hand upper side of the screen and lookin the dropdown box for Country.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 47

Page 58: BW305 BW Query Design and Analysis

Unit 2: Navigating in Reports BW305

12. Remove the filter value for Country and insert Country as the first characteristicin the drilldown, the second characteristic in the drilldown should still beMaterial. Additionally, repeated key values should not be suppressed any more.

a) Either in the context menu of Country choose Filter → Remove FilterValue.

b) Or: Use the Filter link on the right-hand upper side of the screen, and in thedropdown box for Country choose Clear.

c) Then, from the navigation pane, drag and drop Country at the beginningof the result area, or drag and drop it, within the navigation area, into theRows as the first characteristic.

d) Choose the Setting link on the right-hand upper side of the screen, then theTable tab, there activate the box Display Repeated Texts.

13. Finally, save a view for your own user-defined navigational state of the report.For the view, use the description U## View 002 and the technical nameU##_VIEW_002.

a) Make any navigational steps you want and save the navigational state in aview using the context menu Save View.

Description U## View 002

Technical name U##_VIEW_002

14. Now execute your new view U## View 002 (U##_VIEW_002) in the BEx WebAnalyzer again.

a) Choose the New Analysis button.

b) In the Open window, check if the Type is View. If not, change it to View.

c) Open the Search tab.

d) Enter either the technical name or description. Press the Search button.Select your desired view and OK.

48 © 2011 SAP AG. All rights reserved. 2011

Page 59: BW305 BW Query Design and Analysis

BW305 Lesson: Navigating in Reports

Lesson Summary

You should now be able to:• Use the navigation options in the BEx Analyzer and the BEx Web Analyzer .• Use the functions of the context menu• Use the functions of drag and drop navigation• Save a navigational state as a query view

2011 © 2011 SAP AG. All rights reserved. 49

Page 60: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Use the navigation options in the BEx Analyzer and the BEx Web Analyzer .• Use the functions of the context menu• Use the functions of drag and drop navigation• Save a navigational state as a query view

50 © 2011 SAP AG. All rights reserved. 2011

Page 61: BW305 BW Query Design and Analysis
Page 62: BW305 BW Query Design and Analysis
Page 63: BW305 BW Query Design and Analysis

Unit Summary BW305

51 © 2011 SAP AG. All rights reserved. 2011

Page 64: BW305 BW Query Design and Analysis

Unit Summary BW305

52 © 2011 SAP AG. All rights reserved. 2011

Page 65: BW305 BW Query Design and Analysis

Unit 3Creating Simple Queries

Unit OverviewThis unit shows you how to define simple queries in SAP NetWeaver BusinessWarehouse using the BEx Query Designer.

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe and use the basic functions of the BEx Query Designer• Define your own simple queries and modify these when necessary• Define static and dynamic filters in the query definition• Use the enhanced selection function for selecting restriction values• Define and use reusable filters• Configure query properties• Execute reports for analysis

Unit ContentsLesson: Creating Simple Queries .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Procedure: Formulating Selection Conditions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Exercise 2: Create Simple Queries .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

2011 © 2011 SAP AG. All rights reserved. 53

Page 66: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Lesson: Creating Simple Queries

Lesson OverviewThis lesson shows you how to define simple queries in SAP NetWeaver BusinessWarehouse using the BEx Query Designer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe and use the basic functions of the BEx Query Designer• Define your own simple queries and modify these when necessary• Define static and dynamic filters in the query definition• Use the enhanced selection function for selecting restriction values• Define and use reusable filters• Configure query properties• Execute reports for analysis

Business ExampleYou use SAP NetWeaver BW to define queries that enable standardized navigationfunctions in analyses, independent of the source operational system.

You want to define simple queries, execute these, and make changes to the reportdefinition.

Calling the BEx Query DesignerUsing the SAP NetWeaver BW reporting functions, you can evaluate a dataset froman InfoProvider according to various characteristics and key figures. To do this, youdefine a query for your chosen InfoProvider in the BEx Query Designer.

By selecting and combining the InfoObjects in a query, you determine the way inwhich data from the chosen InfoProvider is evaluated.

54 © 2011 SAP AG. All rights reserved. 2011

Page 67: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

You have various options for calling up the Query Designer:

• Directly using Start → Programs → Business Explorer → Query Designer• From the BEx Analyzer

Call the BEx Analyzer, either from the transaction RRMX, or the menu pathStart → Programs → Business Explorer → Analyzer. Choose Add-Ins, and fromthe BEx Analysis Toolbox, choose Tools → New Query.

• From the BEx Web Application Designer

Call the Web Application Designer using Start → Programs → BusinessExplorer → Web Application Designer. From the menu bar, choose Tools →BEx Query Designer.

• From the BEx Report Designer

Using Start → Programs → Business Explorer → Report Designer: Follow thepath then choose the Tools → BEx Query Designer .

Functions of the BEx Query Designer – different panes:InfoProvider, Filter, Row/Columns, Properties, Tasks,MessagesThe following figure gives an overview of the BEx Query Designer functions that youcan call from the Query Designer toolbar. The functions are described within thecontext of query definition. Please note, toolbar functions are context sensitive, whichmeans that certain buttons may be inactive if they are not valid for your context. (thatis, the Save button is inactive until there is something to save!)

Figure 23: BEx Query Designer Toolbar

2011 © 2011 SAP AG. All rights reserved. 55

Page 68: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Exit and Use the query : With this function, you exit the Query Designer and usethe query on the BEx Analyzer.

End and Discard changes : With this function, you close the Query Designerwith the option to save.

New Query : With this function, you are able to define a new query.

Open Query : Choose this function if you want to open an existing query.

Save Query : Using this function, you can save your query.

Save All : You can use this function to save the query and its components, aswell as the reusable objects for this InfoProvider that are not used in the query (forexample, newly created variables in the InfoProvider screen area), in one step.

Execute : Choose this function if you want to display your query results via theportal.

Check Query : This function will perform a validity check on your query andinform you of any errors.

Query Properties : Choose this function if you want to change the properties ofthe query for example, the description of the query, the settings for the result position,display options, numeric display, zero display, and key date of the query.

Cut : You use this function to remove a query object ready for inserting intoanother section of the query definition.

Copy : You use this function to identify a query object in preparation for an insertof the object into another section of the query definition.

Paste : This function is used to insert either the copied or cut object in querydefinition. Be sure to mark the place where you want the query object to inserted.

InfoProvider : This function will open the InfoProvider pane.

Filter : This function will open the Filter pane.

Rows/Coulmns : This function will open the Rows/Columns pane.

Cells : This function is only available for queries with two structures. You candefine formulas and selection conditions for cells explicitly. In this way, you controlthe values of cells that appear at the intersections of structural components. Thisfunction enables you to access individual cells in queries or to assign special valuesto these.

56 © 2011 SAP AG. All rights reserved. 2011

Page 69: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Conditions : You use this function to define conditions for a query. For eachcharacteristic, you can give limit conditions to the key figure values to determine, forexample, all sales revenues above or below a specified threshold value.

Exceptions : You use this function to define exceptions for a query. Exceptions aredeviations from normal key figure values, as defined by you, and are highlighted incolor in the query view.

Properties : This function opens the Properties pane. Choose this function if youwant to define properties of the query and of the query elements.

Tasks : This function opens the Tasks pane. Here you can display the actions,which are valid for the query object you have highlighted.

Messages : This function opens the Messages pane. In the messages pane there isa list of the outstanding messages relating to the status of the query. These messagesmay be informational for example, “Query is successfully saved” or warning that is,“No filter specified”. Use the Check Query function to display a list of messages in themessages pane relating to the correctness of the query.

Where-Used : Using this function, you can find out in which objects (Workbooks,Web templates) the query is used.

Documents : Using this function you can open the Documents pane where youcan edit and view documents for the query definition with help of the DocumentBrowser.

Technical Names : Using this function, you can show/hide the technical names ofthe query components.

2011 © 2011 SAP AG. All rights reserved. 57

Page 70: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Figure 24: Query Designer Menus

Don't forget that you can also access the Query Designer functions via the menus, youwill notice the icon appearing alongside the menu option.

Hint: You can also access the Query Designer functions via the keyboardshortcuts that is, Ctrl+S, the keyboard shortcuts are provided alongside themenu options.

Creating a QueryThis section describes the most important functions required for creating, saving,and modifying a query.

To define a new query, start the BEx Query Designer and choose the function NewQuery .

In the New Query: Select InfoProvider dialog box, select the required InfoProvider.

58 © 2011 SAP AG. All rights reserved. 2011

Page 71: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Figure 25: New Query Dialog

Choose one of the three button on the left side of the dialog box:

• Find (use search options to locate an InfoProvider)• History (your most recently used InfoProviders are listed)• InfoAreas (a list of all InfoProviders organized by InfoAreas is shown)

The following example uses the InfoProvider MultiProvider – Customer Sales(P_SALES01) under InfoAreas → Reporting Layer → Sales and Distribution.

Once you have selected the InfoProvider, the Query Designer displays as shown inthe following graphic.

2011 © 2011 SAP AG. All rights reserved. 59

Page 72: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Figure 26: Query Designer Layout (Filter View)

The Query Designer contains many different panes, some panes are only displayedwhen a function button is pressed. However, we will now describe the key panes:

1. Directory tree of the selected InfoProvider.

Once you have selected the required InfoProvider, all available objects (dimensions,key figures, structures, filters) display in the directory tree in the left screen areaof the Query Designer.

In this example, you can see the directory tree for the InfoProvider MultiProvider– Customer Sales.

2. Characteristic Restrictions

Here you define the characteristic filter values, which apply to the entire result set.

3. Default Values

In this pane you define the characteristic filter values, which should be used for theinitial view of the result set. The user may choose to modify these filters in the result.

4. Properties

60 © 2011 SAP AG. All rights reserved. 2011

Page 73: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Here is where the settings relevant to the currently highlighted query object aredisplayed. You can also make changes to the setting here. Often there will be multipletabs used to organize the settings in this pane.

5. Messages

This pane is where informational or error messages are displayed.

Figure 27: Query Designer Layout (Rows/Columns View)

6. Free Characteristics.

Put the characteristics, which you want to offer to the user for navigation purposes, inthis pane. These characteristics do not appear in the initial view of the query result set,the user must use a navigation control to make use of them. You do not define thefilter values here.

7. Columns

Here is where the query objects (key figures or characteristics) must be placed if youwant them to appear in the columns of the results set.

8. Rows

Here is where the query objects (key figures or characteristics) must be placed if youwant them to appear in the rows of the results set.

2011 © 2011 SAP AG. All rights reserved. 61

Page 74: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

9. Preview

This pane gives you an idea of what the layout of the results set will look like whenyou execute the query.

10. Tasks

A list of suitable tasks relating to highlighted query object are displayed here, you canclick any of the tasks in the list to go directly to the settings.

11. Where Used

This pane provides information relating to the use of the query object.

Note: You will only see the tab for Where Used once you insert your firstquery object in the definition. We are simply showing you in the graphicwhere this pane will appear.

To create a query, you can expand or collapse the InfoProvider directories by choosingthe plus or minus symbol. By expanding the key figure node in the InfoProvider tree,for example, you can display a list of all the key figures for the InfoProvider.

• Use Drag&Drop to transfer the characteristics, key figures, and structures of theInfoProvider into the various panes within the Query Designer.

Note: You can also transfer these characteristics using the keyboard andthe clipboard. Choose CTRL+C to copy and CTRL+V to paste.

Note: You can also highlight several Characteristics, KeyFigures, and soon, and drag&drop them together into the various panes of the QueryDesigner.

You can also include characteristic attributes and variables in the query definitionin this way.

• You can use the right mouse button to call all of the valid functions that are inthe current context menu. To do this, first select the required query component,then select a menu option from the context menu.

• By double-clicking an element in the query designer, you call a dialog box thatoffers the default function for that element. For example, in the filter pane, ifyou double-click a characteristic, the dialog box for restricting characteristicsappears.

• If you click an element you will notice that the suitable tasks are also displayedin the Task Pane. Simply click one of the tasks to open up the dialog box tomake the settings.

The following graphic shows the Query Designer with a query definition.

62 © 2011 SAP AG. All rights reserved. 2011

Page 75: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Figure 28: Example Defined Query (Filter View)

The following definitions were made:

• The characteristic Cal. Year/Month (0CALMONTH) was chosen as a staticfilter and restricted to the range of months January 2005 to April 2005 in theCharacteristic Restrictions pane.

• The characteristic Material was restricted to a small number of the single valuesthat will appear as the default filters when the query is executed.

2011 © 2011 SAP AG. All rights reserved. 63

Page 76: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Figure 29: Example Defined Query (Rows/Column View)

The following definitions were made in the columns/rows view:

• The characteristic Country was selected as a Free Characteristic.• The key figures Incoming Orders and Net value of Incoming Orders were placed

in the columns.• The Sold to Party characteristic, with attributes for address and account group,

was included in the rows. The Material was also included in the rows. This wasrestricted to a range of materials in the default filter pane.

• The preview area shows how the report is structured.

Once you have defined a query, choose Save Query or Save As... .

If you have not yet saved the query, you must enter a query description and a uniquetechnical name. You can also choose where you want to save the query (in your rolesor in your favorites folder). You can use Save Query As... to save existing queriesunder a different name. You will notice a default description and technical name areproposed, these are made up of REP_ followed by the date and time. Simply overwritethese if you prefer to use your own names.

You are able to save a query even though it may contains errors. This means you canreturn to the query at a later time and correct the errors.

64 © 2011 SAP AG. All rights reserved. 2011

Page 77: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Once you have saved the query, you have the following options:

• You can execute the query in the BEx Analyzer and include it in a workbook. Todo this, choose Exit and Use Query. However you must first have launched theQuery Designer from the BEx Analyzer to see the required function. .

• You can display the query on the Web via the NetWeaver Portal. To do this,choose Execute . .

The individual steps for creating a query and the various options for defining a queryare described in more detail in the following section.

Finding a QueryTo find a query for which you already know a part of the description or otherinformation, choose Find.

In the Search for Queries dialog box, enter the technical name or description of thequery. If necessary, you can restrict the search to additional criteria. Choose Find.

• If you are in the BEx Analyzer and have called the search function from theOpen Query dialog box, the query result displays as an Analyzer report.

• If you are using the search function from the Query Designer, the querydefinition displays.

Figure 30: Finding a Query

2011 © 2011 SAP AG. All rights reserved. 65

Page 78: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Filtering Data in the Query DefinitionIt is often necessary to restrict the characteristics to specific values in your reports.For example, you are interested only in the results of a specific sales team. But theInfoProvider on which the query is assigned contains sales results for all sales teams,you can restrict the query by defining a filter on the required characteristic. The resultwill be that your report will only show the results for the required sales team.

The filters are defined under the tab Filter. Be sure to select this tab before attemptingto define any filters. Once you are displaying the Filters tab you can define the filtersin either the Characteristic Restrictions pane or the Default Values pane.

• Filters set in the Characteristic Restrictions pane are always applied to thequery result and cannot be modified by the user in the result. These are oftenregarded as static filters.

• Filters set in the Default Values pane are applied immediately once the query isexecuted. These are often regarded as dynamic filters. However, the user is ableto navigate and filter freely, but only within the range of the static filters.

There are two basic ways to restrict a characteristic in the query definition:

1. By selecting a characteristic value from the InfoProvider tree (on the left side ofthe query designer). Simply open the tree to display the required characteristicwithin the appropriate dimension and then open the characteristic node to revealthe sub folders, one will be called Characteristic Values. Open this folder todisplay the values and then drag and drop these to the required pane. You don'tneed to have previously dragged the characteristic into the pane beforehand, theact of dragging the first characteristic value will also drag the characteristicinto the pane.

2. You can also restrict a characteristic you have already included in the querydefinition (in the Characteristic Restrictions pane or in the Default Values pane)by calling the context menu for the characteristic and choosing Restrict.

Or simply double-click on the characteristic to launch the default task, which fora characteristic in the filter view is Restrict. .

The following figure shows the selection dialog box for the material characteristic.

66 © 2011 SAP AG. All rights reserved. 2011

Page 79: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Figure 31: Selecting filter values

Define selection conditions for Filter ValuesIn the Select value for .... window, you first have to decide how you would like thefilter values to be presented to you. You make your choice by selecting the Showdrop-down box.

History

• Here you will find the most recently used selections.

Favorites

• You can save frequently used selections, you provide a name for the collection,then retrieve the collection from the Favorites.

2011 © 2011 SAP AG. All rights reserved. 67

Page 80: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Single Values

• This list displays each individual characteristic value. Here you can also use thesearch features and also select the single values from a hierarchy (there is also asearch feature within the hierarchy).

The search option allows you to enter either the characteristic key (that is,material number) or characteristic text (that is, Flatscreen) or you can enter anyof the attribute values of the characteristic (that is, color, speed). You can mix upyour choices but you are limited to a maximum of three search criteria.

Value Range

• Instead of selecting single values you can quickly gather multiple characteristicvalues using this next option. This choice provides the following additionaloptions:

1. Between2. Greater than or equal to3. Less than or equal to4. Greater than5. Less than

Variables

• Instead of selecting absolute filter values you can choose to use a variable, whichwill be filled at runtime, perhaps from a user input.

For the selected values, which you adopted form the left-hand side of the window tothe Chosen Selections on the right-hand side, you will find the following options:

• Include values in the selection by selecting the green button once you havehighlighted the required filter value

• Exclude values from the selection by selecting the red button once you havehighlighted the required filter value

• By pressing the Save Selection icon you can save frequently used filter values asyour personal Favorite Selection, so they can easily be recalled for later reuse.You supply a suitable name for the filter collection when you open your favoritesthe collections are displayed with their names.

• The Set Offset for Variable feature is used with variables only.

Hint: If your selection criteria returns a large result set then you shouldmaximize the selection window so you can see more of the results beforeyou need to scroll.

68 © 2011 SAP AG. All rights reserved. 2011

Page 81: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Formulating Selection ConditionsUseYou can select individual values and value ranges from a list or from a selectedhierarchy in the selection dialog box. The values available in the left-hand windoware restricted to a maximum number, which you define in the settings dialog. Youwant only characteristic values that match your specific criteria to be offered in theselection dialog.

PrerequisitesYou have selected the characteristic for which you want to use characteristic valuesfor restriction and chosen Restrict in the context menu using the right mouse button.

Procedure1. From the Show drop-down choose the option Single Values.

2. In the first search criteria (Text) enter the text or only a part of the text. Thesymbol “*” as wildcard is not necessary.

3. Enter any further criteria in the remaining search fields.

4. Press the Start Search button to see the results appear.

5. Drag and drop (or highlight then use the arrow button) to the right side of thedialog box to select the filters. The list of available values is now restrictedaccording to your formulated selection condition.

Defining and using reusable FiltersIf you have defined a filter for the query consisting of several characteristics which arerestricted more or less complex or if the filter represents a very common filter situationit can be wise to save the filter as reusable object.

On the Filter tab page, either in the Characteristic Restriction area or in the DefaultValues area, Right click and Save as a reusable filter.

2011 © 2011 SAP AG. All rights reserved. 69

Page 82: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Figure 32: Save as a Reusable Filter

In the InfoProvider area on the left-hand side you now see, under the folder namedFilter the Filter objects. These Filter objects can now be used for other queries onthe same InfoProvider.

70 © 2011 SAP AG. All rights reserved. 2011

Page 83: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Figure 33: Using Reusable Filters

Note: Later changes for a reusable filter, made in any query where the reusablefilter is used, affect all queries in which the reusable filter is used. If you onlywant to make local changes in a particular query, choose Remove Referencein the context menu for the filter, and as a result, change the reusable filterinto a local filter. Changes on this local filter do not affect the definition of thereusable filter, nor the queries that you made with this reusable filter.

Configuring the properties of the queryThere are a number of settings, which you can make which will affect the presentationand/or the behavior of the query, these are called query properties.

Query properties are accessed via the right most pane of the query designer. Be sureto select the properties tab at the bottom of the pane and also be sure that you haveselected the top-most item in the drop-down list of the properties pane (this pane isalso used to access the characteristic and key figure properties). The top most itemis where you will see the query name.

Or: choose the Query Properties icon from the Query Designer toolbar: .

The query properties are organized via tabs as follows:

2011 © 2011 SAP AG. All rights reserved. 71

Page 84: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

General Tab

• Description

Enter some text, which describes the query. This text will appear as the title ofthe query in the output. This can be changed at any time in the query. It is alsopossible to insert text variables so that the description is dynamic and determinedat runtime (that is, report date, product division chosen by user).

• Technical Name

A technical name must be unique in the BW system and is used to identify yourquery. Once a technical name is entered and the query is saved you cannotchange this, if you wanted to use a different technical name you would have touse the Save as option.

Hint: Think about a consistent naming convention for any BEx technicalnames. For example the first two characters might relate to the businessarea, the second two characters may relate to the author and so on. Thiswill certainly help with authorizations planning.

• InfoProvider

Here you will find a reminder of the InfoProvider the query is assigned to.

• Key Date

If time dependent master data is used in the query (attributes, hierarchies, text)this date (which can be fixed or supplied by a variable) is used to select thecorrect master data. The Use standard date checkbox is used to tell the query touse the current date at query runtime.

In the general tab you will find also information relating to the owner of the query andthe person who last changed the query and date and times.

Variable Sequence Tab

• Variables Sequence

You can change the sequence of the variables to ensure they are presented to theuser in a logical order.

72 © 2011 SAP AG. All rights reserved. 2011

Page 85: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Display Tab

• Adjust Formatting after Refreshing

The default action is that whenever a query is refreshed the result cells will beformatted so that the meaning of the cells is emphasized. To prevent this fromhappening (perhaps to improve query performance or you want to use your ownformat templates) you need to make sure this box is unchecked.

• Hide Repeated Key Values

This function also activates by default, which means that when the query isexecuted only the first key or description displays for each characteristic and anyadditional identical keys or descriptions are suppressed.

• Display Scaling Factors for Key Figures

This function allows you to include any scaling factors in the row or columnheader (for example *1000 EUR).

• Document Links

Here you choose the document class, which you would like to make availableto the query, this means a user can display or maintain documents for thesechecked classes.

Rows / Columns Tab

• Result Position (Rows and Columns)

You can choose where to position the results along the rows and columns. Thedefault settings will present the row results at the bottom and the column resultsto the right. When you make changes, you will see the preview diagram at thefoot of the pane also changes.

• Suppress Zeros

If any rows or columns produce a result of zero, with these settings you canhide the complete row or column. You can decide if the entire row or columnshould be zero or simply the net result is zeros before suppressing. Use thepreview to help you decide.

2011 © 2011 SAP AG. All rights reserved. 73

Page 86: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Value Display Tab

• Display of the +/- sign

Decide how you would like to present the negative values.

• Zero Value Display

These settings help you choose a suitable method of presenting zero valuesin the result.

Planning Tab

• Startup View

This setting determines whether the query is started in display or change(planning) mode. Planning mode allows the result cells to be changed.

Extended Tab

• Release for OLE DB for OLAP

If you want to expose the data from this query to a third-party BI tool then thischeck box must be marked so the Microsoft ODBO interface is filled.

• Request status

Here, you can select how recent the data for an InfoProvider is to be whendisplayed. E.g. for an InfoCube, the system can read data with different requeststatuses.

• Nearline storage

If the query is based on an InfoProvider for which data have already been storedin a near-line storage, you can use this option to stipulate that the stored data isread and displayed when the query is run.

74 © 2011 SAP AG. All rights reserved. 2011

Page 87: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Exercise 2: Create Simple Queries

Exercise ObjectivesAfter completing this exercise, you will be able to:• Use the BEx Query Designer to create your own simple queries• Finding and changing existing queries• Use the enhanced selection function for selecting restriction values• Define and use reusable filters• Execute queries in the BEx Analyzer and in a Web browser

Business ExampleIn order to evaluate the data from an InfoProvider, you require queries that aretailored to your individual requirements. You have been given the task of creatingthese query definitions.

Task 1:You are interested in finding out the incoming order values and the incoming orderquantities of your customers for specific materials between January and April 2005.You want to enable the users of your report to select by specific countries.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

Position the characteristic Sold to party (T_SOLD_TO) into the rows.

Use the basic key figures Incoming Orders EUR (T_INCORDV) and Order EntryQuantity (0INCORDQTY) in the columns.

2. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U00 Query First Steps 001

Technical name: U##_QD_FS001

Execute the query in the BEx Analyzer, view the results, then close the queryresults (do not close the BEx Analyzer).

3. In the next step, you want to change the query definition. Find the query youcreated (U## Query First Steps 001) using the search function.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 75

Page 88: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

In the query definition, include the material in the report in order to display theincoming orders for each material for the customers. You also want to filterthe data with a characteristic restriction to only report data for the months01.2005 to 04.2005.

4. Enable the users of your report to select data related to specific countries(Country (T_SOLD_TO__0COUNTRY)). Then save and execute the query. Inthe local view of the executed query, remove the material from the drilldown andinclude the country in the drilldown before sold-to party to list the sold-to partiesby country. Also in the local view, restrict the country to Germany and Norway.

5. In a further step, in the global definition of the query, establish the restriction forthe country to Germany and Norway as default values. Execute the report andmake a note of which sold-to parties are listed in your report. Are you able toselect other countries in the report?

6. Now execute your query on the Web.

Task 2:Create a further query for the time period from April 2005 to June 2005 about theSales Volume EUR and the Invoiced quantity of the customers and their materialsand from the sales organization Germany Frankfurt. Initially, the flat screens are inthe focus, but there has to be the option of selecting further materials. There shouldalso be the option of a drilldown for month and with the possibility to select valuesfor other months, but only within the year 2005. In the executed report try out thedifferent options for filtering and arranging the drilldown. Additionally, store the“Selection Situation” as a reusable Filter.

1. Define a new query, again basing on the MultiProvider - Customer Sales(P_SALES01). Include the Sold to party (T_SOLD_TO) and Material(0MATERIAL) in the rows and the key figures Sales Volume EUR (T_INVCD_V)and Invoiced quantity (0INVCD_QTY) in the columns of your query definition.

Using Sales Organization (0SALESORG), restrict the report to GermanyFrankfurt (1000).

Include Cal. Year/Month (0CALMONTH) into the query definition in order to beable to navigate with.

For the initial view, you are only interested in the flat screens Flatscreen MS 1460P (M-06) to Flatscreen MS 1775P (M-10) and in the months April 2005 to June2005, but in the executed report, you should also have the possibility to selectvalues for other materials and for other months, but only within the year 2005.

2. Save the query in your role Role## (U##_ROLE) → Queries:

Continued on next page

76 © 2011 SAP AG. All rights reserved. 2011

Page 89: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Description: U## Query First Steps 002

Technical name: U##_QD_FS002

Execute the query in the BEx Analyzer.

Try out the different options for arranging the drilldown and for filtering. E.g.in order to list the sales volumes for the individual months in your report, drillacross on Cal. year/month in the columns. Finally, verify which months can beselected when filtering.

3. Now execute your query on the Web.

4. Back in the query definition, drag the key figure structure into the rows underthe characteristic material. Additionally, the repeated key values of thecharacteristics should not be hidden any more. Verify now the drilldown in theexecuted report.

At last, go back to the Query Designer and drag the key figure structure backinto the columns area again.

5. Finally, store the “Selection Situation” as a reusable Filter. For the filter, use theDescription U## Filter 001 and the Technical Name U##_FILTER_001.What can be done with such a reusable Filter?

_________________________________________________________________________

2011 © 2011 SAP AG. All rights reserved. 77

Page 90: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Solution 2: Create Simple QueriesTask 1:You are interested in finding out the incoming order values and the incoming orderquantities of your customers for specific materials between January and April 2005.You want to enable the users of your report to select by specific countries.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

Position the characteristic Sold to party (T_SOLD_TO) into the rows.

Use the basic key figures Incoming Orders EUR (T_INCORDV) and Order EntryQuantity (0INCORDQTY) in the columns.

a) To open the BEx Analyzer, choose Start → Programs → Business Explorer→ Analyzer .

b) Microsoft Excel will be launched in a separate window. In that window,choose Add-Ins, and then from the BEx Analysis Toolbox, choose Tools →Create New Query.

c) The BEx Query Designer opens, to create a new query, choose the iconNew Query from the toolbar.

d) Choose InfoArea Reporting Layer → Sales and Distribution to find theMultiProvider - Customer Sales (P_SALES01) InfoProvider.

e) Select that InfoProvider and choose Open.

f) Change to the Rows/Columns tabstrip.

g) From the Customer dimension, transfer the Sold to party (T_SOLD_TO)into the Rows using Drag&Drop.

h) From the Key Figures folder, transfer Incoming Orders EUR (T_INCORDV)and Order Entry Quantity (0INCORDQTY) into the Columns usingDrag&Drop.

2. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U00 Query First Steps 001

Technical name: U##_QD_FS001

Continued on next page

78 © 2011 SAP AG. All rights reserved. 2011

Page 91: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

Execute the query in the BEx Analyzer, view the results, then close the queryresults (do not close the BEx Analyzer).

a) To save the query, choose Save Query

b) Choose Roles → Role## (U##_ROLE) → Queries and enter the followingdescription and technical name:

Description: U00 Query First Steps 001

Technical name: U##_QD_FS001

c) Choose Save.

d) Execute the query as a report in the BEx Analyzer by choosing the buttonExit and use the Query.

e) View the results, then close the report results without saving them. Leavethe BEx Analyzer open for the next exercise step.

3. In the next step, you want to change the query definition. Find the query youcreated (U## Query First Steps 001) using the search function.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 79

Page 92: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

In the query definition, include the material in the report in order to display theincoming orders for each material for the customers. You also want to filterthe data with a characteristic restriction to only report data for the months01.2005 to 04.2005.

a) Choose Tools → Create New Query to enter the BEx Query Designer.

In the BEx Query Designer, choose Open Query and then Find.

b) Use Search Method → Search in Names, enter FS001 in the search fieldand activate the Search in Technical Name flag. Press Find to start thesearch.

c) Select the query U##_QD_FS001 from the selection list and choose Open.

d) In the Query Designer, move the characteristic Material (0MATERIAL)from the Material dimension into the Rows, and position it under thecharacteristic Sold to party.

e) Choose Cal. year / month (0CALMONTH) characteristic from the Timedimension, and place it into the Characteristic Restriction area on theFilter tab page using Drag&Drop.

f) From the context menu for Cal. year / month, choose Restrict .

In the Select Values for ..... screen, choose Value Ranges and then Between.

Select 01.2005 and 04.2005, and transfer the selection using the Arrowbutton.

Choose OK.

Continued on next page

80 © 2011 SAP AG. All rights reserved. 2011

Page 93: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

4. Enable the users of your report to select data related to specific countries(Country (T_SOLD_TO__0COUNTRY)). Then save and execute the query. Inthe local view of the executed query, remove the material from the drilldown andinclude the country in the drilldown before sold-to party to list the sold-to partiesby country. Also in the local view, restrict the country to Germany and Norway.

a) From the Customer dimension, transfer the Country(T_SOLD_TO__0COUNTRY) into the Free Characteristics areausing Drag&Drop.

b) Save the query and then execute it in the BEx Analyzer.

c) Launch the context menu by right mouse click in the result area and chooseQuery Properties to open the Local Query Properties window.

d) Use the different Arrow buttons to transferMaterial from the Rows into theFree Characteristics and Country from the Free characteristics into theRows and to position Sold to Party below Country.

e) Right-click Country and choose Select Filter Value. Select More to openthe Selection window, if necessary. Choose Single Values, select Germanyand Norway, then transfer the selection using the Arrow button. Choose OK

f) View the results.

5. In a further step, in the global definition of the query, establish the restriction forthe country to Germany and Norway as default values. Execute the report andmake a note of which sold-to parties are listed in your report. Are you able toselect other countries in the report?

a) In order to change the global definition of the query, choose Tools and EditQuery. The BEx Query Designer opens.

b) Go to the Default Value area on the Filter tab page.

c) From the context menu for Country, choose Restrict. In the selectionscreen, choose Single Values. Select Germany and Norway, and transfer theselection using the Arrow button. Choose OK.

d) Choose Exit and Use the Query to save and execute the query. Only thosesold-to parties for the countries in the Default Value area of the filter arelisted in the initial view, but it is possible to change the filter and to analyzethe other countries as well.

6. Now execute your query on the Web.

a) From the BEx Analysis Toolbar, choose Tools → BEx Web Analyzer.

b) When prompted, log on with your assigned user ID and password.Continued on next page

2011 © 2011 SAP AG. All rights reserved. 81

Page 94: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Task 2:Create a further query for the time period from April 2005 to June 2005 about theSales Volume EUR and the Invoiced quantity of the customers and their materialsand from the sales organization Germany Frankfurt. Initially, the flat screens are inthe focus, but there has to be the option of selecting further materials. There shouldalso be the option of a drilldown for month and with the possibility to select valuesfor other months, but only within the year 2005. In the executed report try out thedifferent options for filtering and arranging the drilldown. Additionally, store the“Selection Situation” as a reusable Filter.

1. Define a new query, again basing on the MultiProvider - Customer Sales(P_SALES01). Include the Sold to party (T_SOLD_TO) and Material(0MATERIAL) in the rows and the key figures Sales Volume EUR (T_INVCD_V)and Invoiced quantity (0INVCD_QTY) in the columns of your query definition.

Using Sales Organization (0SALESORG), restrict the report to GermanyFrankfurt (1000).

Include Cal. Year/Month (0CALMONTH) into the query definition in order to beable to navigate with.

For the initial view, you are only interested in the flat screens Flatscreen MS 1460P (M-06) to Flatscreen MS 1775P (M-10) and in the months April 2005 to June2005, but in the executed report, you should also have the possibility to selectvalues for other materials and for other months, but only within the year 2005.

a) In the BEx Analyzer, from the BEx Analysis Toolbar, choose Tools →Create New Query.

b) The BEx Query Designer opens, to create a new query, choose the iconNew Query.

c) Choose the MultiProvider - Customer Sales (P_SALES01).

d) From the Customer dimension, drag Sold to party (T_SOLD_TO) to therows area.

e) From the Material dimension, drag Material (0MATERIAL) to the rowsarea.

f) From the Time dimension, transfer the Cal. year / month (0CALMONTH)characteristic into the Free Characteristics section.

g) From the Key Figures folder, drag Sales Volume EUR (T_INVCD_V) andInvoiced quantity (0INVCD_QTY) into the columns area.

Continued on next page

82 © 2011 SAP AG. All rights reserved. 2011

Page 95: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

h) From the Sales area data dimension, place the Sales Organization(0SALESORG) characteristic into the Characteristic Restrictions area ofthe Filter tab page.

i) In the context menu for Sales Organization, choose Restrict.

In the selection screen, choose Single Values. Select Germany Frankfurt(1000). Adopt the selection using the Arrow button.

Choose OK.

j) In the Default Values area of the Filter tab page, enter the context menufor Material and choose Restrict .

In the selection screen, choose Single Value → Search, and in the fieldbehind Material (Text) enter Flatscreen, and Start Search. Via theDisplay Key/Text button you can display the key for the materials. Selectthe flat screens from Flatscreen MS 1460 P (M-06) to Flatscreen MS 1775P(M-10) and adopt the selection using the Arrow button.

Choose OK.

k) In the Default Values area of the Filter tab page, enter the context menu forCal year / month and choose Restrict .

In the selection screen, choose Value Ranges and Between. Select 04.2005and 06.2005. Adopt the selection using the Arrow button.

Choose OK.

l) From the Time dimension, transfer the Cal. year / month (0CALMONTH)characteristic into the Characteristic Restrictions section of the Filter tabpage.

In the selection screen, choose Value Ranges and Between. Select 01.2005and 12.2005. Adopt the selection using the Arrow button.

2. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U## Query First Steps 002

Technical name: U##_QD_FS002

Execute the query in the BEx Analyzer.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 83

Page 96: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Try out the different options for arranging the drilldown and for filtering. E.g.in order to list the sales volumes for the individual months in your report, drillacross on Cal. year/month in the columns. Finally, verify which months can beselected when filtering.

a) To save the query, choose Save Query

b) Choose Roles → Role## (U##_ROLE) → Queries and enter the followingdescription and technical name:

Description: U## Query First Steps 002

Technical name: U##_QD_FS002

c) Choose Save.

d) Execute the query as a report in the BEx Analyzer by choosing the buttonExit and use the Query.

e) Try out the different options for filtering and arranging the drilldown. Forexample, in order to list the sales volumes for the individual months inyour report, drill across on Cal. year/month in the columns. Finally, verifywhich months can be selected when filtering. Months can be selectedwithin the year 2005 only!

3. Now execute your query on the Web.

a) From the BEx Analysis Toolbar, choose Tools → BEx Web Analyzer.

b) When prompted, log on with your assigned user ID and password.

4. Back in the query definition, drag the key figure structure into the rows underthe characteristic material. Additionally, the repeated key values of thecharacteristics should not be hidden any more. Verify now the drilldown in theexecuted report.

Continued on next page

84 © 2011 SAP AG. All rights reserved. 2011

Page 97: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Simple Queries

At last, go back to the Query Designer and drag the key figure structure backinto the columns area again.

a) Go back into the BEx Analyzer, from there go back into the querydefinition via BEx Analysis Toolbox → Edit Query.

b) Drag the key figure structure in the columns area and drop it in the rowsarea under the characteristic material.

c) In the Property pane of the Query Designer, select the top-most item inthe drop-down list, choose the Display tab page and clear the checkboxbefore Hide Repeated Key Values .

Alternatively, you reach the properties of the query by using the buttonin the Query Designer toolbar.

d) Choose Exit and Use the Query to save and execute the query. You seethe two key figures are now arranged in rows one below the other foreach sold to party and each material, and the repeated key values are notsuppressed any more.

e) Go back to the Query Designer. Drag the key figure structure back into thecolumns area again and save the query.

5. Finally, store the “Selection Situation” as a reusable Filter. For the filter, use theDescription U## Filter 001 and the Technical Name U##_FILTER_001.What can be done with such a reusable Filter?

_________________________________________________________________________

a) On the Filter tab page, either in the Characteristic Restriction area or in theDefault Values area, Right click and Save as and use the descriptionand technical name indicated above.

b) In the InfoProvider area on the left-hand side you now see a new foldernamed Filter and the assigned Filter objects. They can now be used forother queries on the same InfoProvider.

2011 © 2011 SAP AG. All rights reserved. 85

Page 98: BW305 BW Query Design and Analysis

Unit 3: Creating Simple Queries BW305

Lesson Summary

You should now be able to:• Describe and use the basic functions of the BEx Query Designer• Define your own simple queries and modify these when necessary• Define static and dynamic filters in the query definition• Use the enhanced selection function for selecting restriction values• Define and use reusable filters• Configure query properties• Execute reports for analysis

86 © 2011 SAP AG. All rights reserved. 2011

Page 99: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Describe and use the basic functions of the BEx Query Designer• Define your own simple queries and modify these when necessary• Define static and dynamic filters in the query definition• Use the enhanced selection function for selecting restriction values• Define and use reusable filters• Configure query properties• Execute reports for analysis

2011 © 2011 SAP AG. All rights reserved. 87

Page 100: BW305 BW Query Design and Analysis

Unit Summary BW305

88 © 2011 SAP AG. All rights reserved. 2011

Page 101: BW305 BW Query Design and Analysis
Page 102: BW305 BW Query Design and Analysis
Page 103: BW305 BW Query Design and Analysis

Unit Summary BW305

89 © 2011 SAP AG. All rights reserved. 2011

Page 104: BW305 BW Query Design and Analysis

Unit Summary BW305

90 © 2011 SAP AG. All rights reserved. 2011

Page 105: BW305 BW Query Design and Analysis

Unit 4Working with Key Figures and

Structures in Queries

Unit OverviewThis unit deals with how enhance query definitions by configuring restricted keyfigures and by defining calculations using calculated key figures and formulas.

By configuring the properties of key figures the report can be optimized additionally.Out of the limited number of key figures provided in the InfoProvider additionalinformation can be achieved.

This unit shows you how structures can be defined and how they can be saved andreused in various queries.

The unit also shows an example of formula collision and explains the functions of thecell editor that can be used when implementing two structures in a query definition.

Unit ObjectivesAfter completing this unit, you will be able to:

• Explain the objectives and use of restricted key figures in information analyses• Define restricted key figures at the InfoProvider level and at the query level• Explain the use of constant selection• Explain the objectives and use of calculated key figures in information analyses• Define calculated key figures at the InfoProvider level and at the query level• Define a calculated key figure and defining missing objects directly• Using Boolean Operators within calculated key figures• Identify the General, Display, Extended, and Calculations options within the

properties of key figures• Carry out Currency Translation in the Business Explorer• Use the Exception Aggregation to deliver many additional options for analysis• Define structures

2011 © 2011 SAP AG. All rights reserved. 91

Page 106: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

• Work with queries containing two structures• Save structures as reusable objects and reuse them• Handle formula collision• Use the cell editor

Unit ContentsLesson: Creating Restricted Key Figures... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Procedure: Defining Restricted Key Figures... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Exercise 3: Create Restricted Key Figures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Lesson: Creating Calculated Key Figures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Procedure: Defining Calculated Key Figures at the InfoProvider level . . 112Exercise 4: Create Calculated Key Figures... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Lesson: Configuring Properties of Key Figures... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129Procedure: Defining Exception Aggregation ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137Procedure: Defining Nested Exception Aggregation ... . . . . . . . . . . . . . . . . . . .138Exercise 5: Configure Properties of Key Figures... . . . . . . . . . . . . . . . . . . . . . . . .139

Lesson: Defining Structures and Working with Cells.. . . . . . . . . . . . . . . . . . . . . . . . . .145Procedure: Creating Structures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148Procedure: Creating Reusable Structures ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149Procedure: Defining Exception Cells .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153Exercise 6: Define Structures and work with Cells.. . . . . . . . . . . . . . . . . . . . . . . .155

92 © 2011 SAP AG. All rights reserved. 2011

Page 107: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Lesson: Creating Restricted Key Figures

Lesson OverviewThis lesson deals with how to define Restricted Key Figures at the InfoProvider andquery level.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Explain the objectives and use of restricted key figures in information analyses• Define restricted key figures at the InfoProvider level and at the query level• Explain the use of constant selection

Business ExampleYou need restricted key figures to be able to define detailed reports. For example,you want to list sales volumes for individual time segments next to each other in thereport. If you create them at the InfoProvider level, you are then able to reuse theindividual key figures in other reports.

Defining Restricted Key FiguresRestricted key figures are (basic) key figures of the InfoProvider that are restricted(filtered) by one or more characteristic selections. The key figure that is restricted byone or more characteristic selections can be a basic key figure, a calculated key figure,or a key figure that is already restricted.

By using restricted key figures, you can focus the query result on certain values.Unlike a filter, whose restrictions are valid for the entire query, for a restricted keyfigure, only the key figure in question is restricted to its allocated characteristic valueor characteristic value interval. Scenarios such as comparing a particular key figurefor various time segments, or plan/actual comparison for a key figure if the plan datais stored using a particular characteristic can be realized using restricted key figures.

2011 © 2011 SAP AG. All rights reserved. 93

Page 108: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Figure 34: Defining Restricted Key Figures

94 © 2011 SAP AG. All rights reserved. 2011

Page 109: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Defining Restricted Key FiguresUseYou can create restricted key figures at the InfoProvider level, or locally in thequery definition. Restricted key figures that are defined at the InfoProvider level areavailable in every query definition of the InfoProvider in question.

Procedure1. To define a restricted key figure at the InfoProvider level, in the InfoProvider

pane on the left-hand side of the Query Designer, right-click Key Figures or ifavailable, Restricted Key Figures, choose New Restricted Key Figure.

Then, in the context menu of the new restricted key figure, choose Edit. TheChange Restricted Key Figure dialog appears. Use Drag&Drop to place the keyfigure to be restricted to the right side into the Details of the Selection area.

2. To define a restricted key figure at the query level, use Drag&Drop to dragthe key figure to be restricted into the existing key figure structure in the Rowsor Columns area. If there is not yet a key figure structure, one will be createdautomatically. In the context menu of the key figure to be restricted, choose Edit.The Change Selection dialog box appears, you'll see that the key figure to berestricted is already positioned on the right side (Details of the Selection).

Or: Use the New Selection function:

If there is not yet a key figure structure, select the heading of the Rows orColumns area and use the right mouse button to choose New Structure. Select thestructure header and use the right mouse button to choose New Selection fromthe context menu. The New Selection dialog box appears.

If there is already a key figure structure, select the header or any member ofthe structure and use the right mouse button to choose New Selection from thecontext menu. The New Selection dialog box appears.

In the New Selection dialog box, use Drag&Drop to place the key figure to berestricted to the right side into the Details of the Selection area.

3. Edit the description of the restricted key figure into the text field.

4. Use Drag&Drop to move the characteristic(s) whose characteristic values youwant to use to restrict the key figure to the right-hand side of the Selectionwindow.

5. In the context menu of the characteristic(s), choose Restrict.

Select the characteristic values you require for the restriction.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 95

Page 110: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

6. Confirm your entries by choosing OK.

7. For the definition at the InfoProvider level, you enter a technical name in thedialog box, and confirm your entry by choosing OK. The newly defined keyfigure can be found in the Restricted Key Figures folder.

In the case of definition at the query level, the new restricted key figure is alreadypart of the key figure structure.

Determining Constant SelectionIn the Query Designer, you use selections when defining a restricted key figure todetermine the data that you want to display at runtime. You can use navigationsteps to further restrict your selections at runtime. The Constant Selection functionallows you to mark a defined selection as being constant. As a result of this setting,navigation and filters no longer have an effect on the selection in question. Thisfeature is often used when you would like to ensure that a particular restricted keyfigure remains the same in the result so it can be used for comparisons to other keyfigures, which may have a different filter value due to navigation. (that is, comparethe Team A Sales against the other Team Sales, I will decide at runtime which otherteams to choose with a navigation filter, but the key figure for Team A should alwaysremain constant (as defined in the query).

• Additional function for restricted key figures• When activated, navigation and filtering have no effect on the restricted key

figure• To activate, select Constant Selection from the context menu of the restricting

characteristic while editing the restricted key figure

96 © 2011 SAP AG. All rights reserved. 2011

Page 111: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Figure 35: Constant Selection

2011 © 2011 SAP AG. All rights reserved. 97

Page 112: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

98 © 2011 SAP AG. All rights reserved. 2011

Page 113: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Exercise 3: Create Restricted Key Figures

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create restricted key figures at InfoProvider and query level• Mark a defined selection as being constant

Business ExampleTo analyze the sales volumes of your customers, you need additional key figuresthat are not contained in the InfoCube.

In your report you want to generate an overview of the sales volumes in various timeperiods for each sold-to party. You also need detailed information on sales volumes,restricted to the division High Tech, for your individual sold-to parties. You need threedifferent restricted key figures to do this. In each case, you use the basic key figureSales Volume EUR, and then proceed according to the view you want.

Task 1:Define two restricted key figures that depict the Sales Volume EUR for the periodleading up to 2006 and for the year 2006 itself, and additionally a third restricted keyfigure representing the Sales Volume EUR, again for the year 2006, but restricted tothe division High Tech.

1. Create a new query using the InfoProvider MultiProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea withthe characteristic Sold to party (T_SOLD_TO) in the rows.

As a global filter, in the Characteristic Restrictions area, use Sales Organization(0SALESORG) restricted to Germany Frankfurt (1000).

Define a new Restricted Key Figure at the InfoProvider level:

Description: U## Sales Volume EUR before 2006

Technical name: U##_RKF_SV_B_2006

Limit the basic key figure Sales Volume EUR (T_INVCD_V) to the period before2006 using the characteristic Calendar year (0CALYEAR).

2. In the same query, define the second restricted key figure Sales VolumeEUR 2006, this time at query level. This key figure displays the Sales VolumeEUR (T_INVCD_V) for the year 2006.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 99

Page 114: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Please be aware that you have two different techniques to create a restricted keyfigure on query level: either dragging the basis key figure Sales Volume EUR(T_INVCD_V) into the Key Figure structure and then define the restriction for it,or to choose, within the Key Figure structure, New Selection.

3. Define the third restricted key figure, again at query level.

Description: Sales Volume 2006 EUR Hightech

Use the Sales Volume EUR 2006 key figure as a template, and further restrict itto the division Hightech.

4. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U## Query Restr. Keyf. 001

Technical name: U##_QD_RKF001

Now execute the query in the BEx Analyzer or in the web.

Task 2:Optional

In the precedent report, as further analysis requirement, there should also be thepossibility to show the sales volumes before 2006 and in 2006 restricted to a rangeof specific divisions, and to compare with the sales volume for the division HighTech in the year 2006.

1. Copy the query definition from task 1 into a further query definition and save itin your role Role## (U##_ROLE) → Queries:

Description: U## Query Restr. Keyf. 002

Technical name: U##_QD_RKF002

2. Enable the users of the report to select data related to specific divisions.

3. Execute the report on the BEx Analyzer or in the web.

Restrict the data in the executed report by filtering on the characteristic Divisionusing the filter values Pumps, Motorcycles, Lightning. What happens with thevalues of the restricted key figure Sales Volume EUR 2006 Hightech?

___________________________________________________________________________________

4. How can you achieve that the values for the restricted key figure Sales VolumeEUR 2006 Hightech are not influenced by navigation, in our case by filteringon the characteristic Division?

Continued on next page

100 © 2011 SAP AG. All rights reserved. 2011

Page 115: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Test your solution using a copy of the restricted key figure Sales Volume EUR2006 Hightech

2011 © 2011 SAP AG. All rights reserved. 101

Page 116: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Solution 3: Create Restricted Key FiguresTask 1:Define two restricted key figures that depict the Sales Volume EUR for the periodleading up to 2006 and for the year 2006 itself, and additionally a third restricted keyfigure representing the Sales Volume EUR, again for the year 2006, but restricted tothe division High Tech.

1. Create a new query using the InfoProvider MultiProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea withthe characteristic Sold to party (T_SOLD_TO) in the rows.

As a global filter, in the Characteristic Restrictions area, use Sales Organization(0SALESORG) restricted to Germany Frankfurt (1000).

Define a new Restricted Key Figure at the InfoProvider level:

Description: U## Sales Volume EUR before 2006

Technical name: U##_RKF_SV_B_2006

Continued on next page

102 © 2011 SAP AG. All rights reserved. 2011

Page 117: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Limit the basic key figure Sales Volume EUR (T_INVCD_V) to the period before2006 using the characteristic Calendar year (0CALYEAR).

a) Open the Query Designer.

b) To create a new query, choose the icon New Query from the toolbar.

c) Choose InfoAreas → Reporting Layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01)→ Open.

d) Change to the Rows/Columns tabstrip.

e) From the Customer dimension, place the Sold to party (T_SOLD_TO)characteristic into the Rows section.

f) From the Sales area data dimension, drag Sales Organization(0SALESORG) into the Characteristics Restrictions section on the Filtertab page.

g) In the context menu for the characteristic Sales Organization, chooseRestrict. In the selection screen, choose Single Values. Select GermanyFrankfurt (1000) and adopt the selection using the Arrow button. ChooseOK.

h) To define the first Restricted Key Figure at InfoProvider level, chooseNew Restricted Key Figure in the context menu of the Key Figures folder.Then choose Edit from the context menu of the new restricted key figure.

Description: U## Sales Volume EUR before 2006

Technical Name: U##_RKF_SV_B_2006

i) Use Drag&Drop to place Sales Volume EUR (T_INVCD_V) into the Detailsof the Selection area.

j) Choose the Calendar year (0CALYEAR) characteristic under the Timedimension, and place it into the Details of the Selection area.

k) In the context menu for Calendar year, choose Restrict. In the selectionscreen, choose Value Ranges. Choose Less than. Select 2006 and adopt theselection using the Arrow button. Choose OK.

l) Confirm with OK.

m) To add the newly defined restricted key figure to the query definition,use Drag&Drop to place U## Sales Volume EUR before 2006(U##_RKF_SV_B_2006) into the Columns section on the Rows/Columnstabstrip.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 103

Page 118: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

2. In the same query, define the second restricted key figure Sales VolumeEUR 2006, this time at query level. This key figure displays the Sales VolumeEUR (T_INVCD_V) for the year 2006.

Please be aware that you have two different techniques to create a restricted keyfigure on query level: either dragging the basis key figure Sales Volume EUR(T_INVCD_V) into the Key Figure structure and then define the restriction for it,or to choose, within the Key Figure structure, New Selection.

a) To define the second restricted key figure, this time at the query level,choose Sales Volume EUR (T_INVCD_V) from the Key Figures folder, andplace it into the Columns section.

In the context menu for Sales Volume EUR (T_INVCD_V) , choose Edit.The Change Selection dialog box appears, you see that the Sales VolumeEUR (T_INVCD_V) key figure is already positioned on the right side(Details of the Selection).

Or: Select the last member of the Key Figure Structure (that should be theU## Sales Volume EUR before 2006 (U##_RKF_SV_B_2006) key figure),and use the right mouse button to choose New Selection. Right-clickSelection 1 and choose Edit. The Change Selection dialog box appears.Drag the Sales Volume EUR (T_INVCD_V) key figure from the left side tothe right side (Details of the Selection).

b) Still in the Change Selection dialog box, choose the Calendar yearcharacteristic under the Time dimension, and place it into the Details ofthe Selection area.

c) In the context menu for Calendar year, choose Restrict. In the selectionscreen, choose Single Value and select 2006.

d) Adopt the selection using the Arrow button. Choose OK.

e) Description: Sales Volume EUR 2006.

f) Confirm with OK.

3. Define the third restricted key figure, again at query level.

Description: Sales Volume 2006 EUR Hightech

Continued on next page

104 © 2011 SAP AG. All rights reserved. 2011

Page 119: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Use the Sales Volume EUR 2006 key figure as a template, and further restrict itto the division Hightech.

a) To define this third key figure, again at the query level, select Sales VolumeEUR 2006. Copy it using Copy and Paste from the context menu of thekey figure.

b) Select the copy, and choose Edit in its context menu.

c) Change the description into: Sales Volume 2006 EUR Hightech

Note: Note that several lines are available for key figure names.This is to control the column width in the report.

d) Choose the characteristic Division (0DIVISION) from the Sales area datadimension and place it into the Details of the Selection area.

e) In the context menu for Division, choose Restrict.

In the Show field, choose Single Values.

Select High Tech (07) and adopt the selection using the Arrow button.Choose OK.

4. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U## Query Restr. Keyf. 001

Technical name: U##_QD_RKF001

Now execute the query in the BEx Analyzer or in the web.

a) To save the query, choose Save Query.

b) Choose Roles → Role## (U##_ROLE) → Queries and enter the followingdescription and technical name:

Description: U## Query Restr. Keyf. 001

Technical name: U##_QD_RKF001

c) Choose Save.

d) Execute the query as a report in the BEx Analyzer by choosing the buttonExit and use the Query or in the web by choosing the button Execute.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 105

Page 120: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Task 2:Optional

In the precedent report, as further analysis requirement, there should also be thepossibility to show the sales volumes before 2006 and in 2006 restricted to a rangeof specific divisions, and to compare with the sales volume for the division HighTech in the year 2006.

1. Copy the query definition from task 1 into a further query definition and save itin your role Role## (U##_ROLE) → Queries:

Description: U## Query Restr. Keyf. 002

Technical name: U##_QD_RKF002

a) In the Query Designer, open, if it is not already opened, the querydefinition U00 Query Restr Keyf 001 (U##_QD_RKF001), go to the menubar Query → Save as , using the

Description: U##0 Query Restr. Keyf. 002 and

Technical name: U##_QD_RKF002.

2. Enable the users of the report to select data related to specific divisions.

a) From the Sales area data dimension, drag Division (0DIVISION)into the Default Values section on the Filter tab page or into the FreeCharacteristics section on the Row/Columns tab page.

b) Save the query.

3. Execute the report on the BEx Analyzer or in the web.

Restrict the data in the executed report by filtering on the characteristic Divisionusing the filter values Pumps, Motorcycles, Lightning. What happens with thevalues of the restricted key figure Sales Volume EUR 2006 Hightech?

Continued on next page

106 © 2011 SAP AG. All rights reserved. 2011

Page 121: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

___________________________________________________________________________________

a) Execute the query as a report in the BEx Analyzer by choosing the buttonExit and use the Query or in the web by choosing the button Execute.

b) BEx Analyzer

• In the executed report, open the Navigation pane by pressing theFilter button.

• In the navigation pane, Right-click on the characteristic Division andchoose Select Filter Values.

• In the selection screen, Show Single Values, highlight the valuesPumps (01), Motorcycles (02), Lightning (04), and choose OK.

Web Analyzer

• Right-click on the characteristic Division and choose Filter → SelectFilter Value

• Highlight the values Pumps (01), Motorcycles (02), Lightning (04),and choose Add.

• Choose OK.

c) The whole report is now restricted to the selected values for division.Thus there are no more values for the restricted key figure Sales VolumeEUR 2006 Hightech!

4. How can you achieve that the values for the restricted key figure Sales VolumeEUR 2006 Hightech are not influenced by navigation, in our case by filteringon the characteristic Division?

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 107

Page 122: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Test your solution using a copy of the restricted key figure Sales Volume EUR2006 Hightech

a) Back in the query definition, in the Columns area, select Sales VolumeEUR 2006 Hightech. Copy it using Copy and Paste from the context menuof the key figure.

b) Select the copy, Right click, in the upcoming Change Selection→Details ofthe Selection window, Right-click Division, and check Constant Selection.

Adapt the description: Sales Volume EUR 2006 Hightech Const. Sel.Division

c) At last, choose OK, save the query, and execute it again.

d) In the executed report, repeat the filtering for the division using again thevalues Pumps (01), Motorcycles (02), Lightning (04). You will find thevalues very easily in the History.

Check your solution.

108 © 2011 SAP AG. All rights reserved. 2011

Page 123: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Restricted Key Figures

Lesson Summary

You should now be able to:• Explain the objectives and use of restricted key figures in information analyses• Define restricted key figures at the InfoProvider level and at the query level• Explain the use of constant selection

2011 © 2011 SAP AG. All rights reserved. 109

Page 124: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Lesson: Creating Calculated Key Figures

Lesson OverviewThis lesson deals with how to define calculated key figures at InfoProvider and querylevel.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Explain the objectives and use of calculated key figures in information analyses• Define calculated key figures at the InfoProvider level and at the query level• Define a calculated key figure and defining missing objects directly• Using Boolean Operators within calculated key figures

Business ExampleThe use of complicated calculations for information analysis is the order of the day.This requires various mathematical functions such as percentage functions and totalsfunctions. You can take basic key figures, restricted key figures, or calculated keyfigures to define new calculated key figures. For example, you use the restricted keyfigures for two specific years to calculate the difference between the sales volumesof the years in question.

Defining Calculated Key FiguresYou can define calculated key figures at both the query level and the InfoProviderlevel. At the query level, the calculated key figure is valid only for the query inquestion. If you create a calculated key figure at the InfoProvider level, you can use itin all queries that are based on the same InfoProvider.

110 © 2011 SAP AG. All rights reserved. 2011

Page 125: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Figure 36: Calculated Key Figures

Defining Calculated Key Figures at the InfoProvider LevelTo define calculated key figures at the InfoProvider level, you can include all typesof key figures, which are defined at the InfoProvider level, these include basic keyfigures, restricted key figures and, of course, calculated key figures. However youmust remember that you do not have access to all operators as some operators onlymake sense at the query level. Don't forget that once you have defined the calculatedkey figure at the InfoProvider level it is not automatically included in your query, youmust drag and drop it to where it should be used!

Caution: Any calculated key figure defined at the InfoProvider level canbe used in others queries. Query developers may want to try to change thedefinition (or just the name) of your calculated key figure so it fits theirpurpose. They will receive a warning message if they try to do this, butassuming they do have the correct authorizations they can make the changes.These changes will affect all queries where the calculated key figure is used.

2011 © 2011 SAP AG. All rights reserved. 111

Page 126: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Defining Calculated Key Figures at the InfoProvider level

1. Select the Key Figure folder, and choose New Calculated Key Figure from thecontext menu. A dummy New Calculated Key Figure appears in the InfoProvidertree under Calculated Key Figures folder. Double-click this dummy key figureto open the Change Calculated Key Figure dialog box.

2. Enter a description of the calculated key figure into the Description field.

3. Define the required formula using basic key figures, restricted key figures definedon InfoProvider level, calculated key figures already defined on InfoProviderlevel, formula operators, and functions. You can use Drag&Drop to transfer theformula components into the formula field.

Note: Key figures always have the same units when a query is executed.This means that the formula is semantically incorrect if you add acurrency unit (for example, EUR) to a unit of weight (for example, kg).If you want to calculate values without using units, you should use theValue Without Dimension function. See Data Functions.

4. Choose OK. In the Properties pane, you can overwrite the technical name whichwas automatically generated.

5. The new calculated key figure is available under the Calculated Key Figuresfolder, and can be included in the definition using Drag&Drop.

Defining Calculated Key Figures at the Query levelTo define calculated key figures at the query level, you have to include key figuresneeded for the calculation in the query definition, and choose New Formula fromthe context menu of the header or any member of the Key Figure structure. Theseformulas are available only locally in the query definition.

112 © 2011 SAP AG. All rights reserved. 2011

Page 127: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Defining Missing Objects DirectlyIn a calculated key figure, at the query level only, it is possible to define missingobjects directly in the formula editor dialog box. This means you do not have to leavethe formula dialog box to create the missing key figure.

1. Right click in the place where you want the new restricted key figure to appear inthe formula.

2. Use the New Selection menu option if you want to insert an existing basic keyfigure, or an existing restricted key figure on InfoProvider level, or an existingcalculated key figure on InfoProvider level into your formula.

Use the New Selection menu option if you want to insert a so far not existingrestricted key figure (at the query level) into your formula.

This will create a dummy key figure Selection# in the correct place.

Right-click the dummy key figure and use the menu option Edit to select or todefine the desired key figure.

3. Use the New Formula menu option if you want to insert a so far not existingformula (at the query level) into your formula.

This will create a dummy key figure Formula# in the correct place.

Right-click the dummy key figure and use the menu option Edit to define thedesired formula.

Hint: The key figures inserted directly into to the new formula will appear inthe key figure structure and therefore will be part of the result (as well as thenew formula). If you don't want to see the key figures in your result, simplyuse the Hide feature under the properties.

2011 © 2011 SAP AG. All rights reserved. 113

Page 128: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Figure 37: Defining Missing Objects Directly

Functions for Defining Calculated Key FiguresBelow are examples and explanations of the functions available as operators whenyou define a calculated key figure.

Percentage FunctionsPercentage Variance (%)

<Operand 1> % <Operand 2>gives the percentage variance of operand 1 from operand 2.Example: Planned Sales Volume % Actual Sales Volume gives the percentage bywhich the actual sales volume exceeds the planned sales volume.

Percentage Share (%A)<Operand 1> %A <Operand 2>Gives the percentage share of operand 1 of operand 2.Example: Sales Volume %A Incoming Orders specifies the percentage share ofsales volume made up of incoming orders.

114 © 2011 SAP AG. All rights reserved. 2011

Page 129: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Percentage Share of Result (%CT)%CT<Operand>Specifies how high the percentage share is in relation to the result. The resultmeans the result of aggregation at the next level (interim result).%CT Incoming Orders specifies the share of incoming order values of eachindividual characteristic value (for example of each customer) in relation to thecharacteristic's result (for example, customer of a division).

Percentage Share of Overall Result (%GT)%GT <Operand>Specifies how high the percentage share is in relation to the overall result. Theoverall result means the result of aggregation at the highest level in the list. Inthe calculation of the overall result, the dynamic filters are included.

Percentage Share of the Query Result (%RT)%RT <Operand>This is the same as %GT. Unlike the process for calculating the overall result,dynamic filters are not included in the calculation of the query result. Thismeans that the calculation always normalizes to the same value, irrespective ofthe dynamic filter status and the navigational state.

Example of the Usage of Percentage Functions CT and GT

Division Sold-to Party SalesVolume

Sales Volume%CT

Sales Volume%GT

Pumps Becker Berlin 200 33% 11%

A.I.T. GmbH 400 66% 22%

Result 600 33% 33%

Motorbikes J & P 300 25% 17%

Motor Sports 900 75% 50%

Result 1200 66% 66%

OverallResult

1800 100% 100%

Data FunctionsCounts

COUNT(<Expression>)Delivers the value 1 if the expression named in <Expression> is not equal to 0.Otherwise, delivers the value 0.

2011 © 2011 SAP AG. All rights reserved. 115

Page 130: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

NDIV0 (x): Is equal to 0 with division by 0, otherwise x.NDIV(<Expression>)Delivers 0 if the expression named in <Expression> gives a division by 0 in thecalculation. Otherwise, the result is the value of the expression.Is used to

• Avoid the output of an error message• Continue calculating with a defined result

ResultSUMCT <Operand>Delivers the result of the operand in all rows or columns (see PercentageFunctions %CT).

Overall ResultSUMGT<Operand>Delivers the overall result of the operand (see Percentage Functions %GT).

Report ResultSUMRT<Operand>Delivers the report result of the operand (to distinguish between the overall andthe report result, see also Percentage Functions %GT and %RT).

Mathematical FunctionsThese include:

MaximumMinimumAbsolute ValueSmallest integer value larger than operandDivision (integers)

Using Boolean OperatorsBoolean operators constitute a particular example of functions that are available asoperators when you define a calculated key figure. With the help of the Booleanoperators, you can make comparisons within formulas.

116 © 2011 SAP AG. All rights reserved. 2011

Page 131: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

You can use the following operators:

• is less than <• is not equal to <>• is greater than >• is less than or equal to <=• is equal to =• is greater than or equal to >=• logical NOT, AND, OR, and logical exclusive OR XOR

Example: Sales Volume > 100,000. This expression delivers 1 if the Sales Volume islarger than 100,000. Otherwise, the expression delivers 0.

If you want to formulate IF - THEN - ELSE expressions, do it in this way:

Example for a Bonus calculation: IF Sales volume > 100,000 THEN Bonus should beSales Volume * 5% ELSE Bonus should be Sales Volume * 2%

can be described using the following formula:

(Sales volume >100000) * Sales Volume * 0.05 + (Sales Volume <= 100000) * SalesVolume * 0.02

This works because at least one side of the calculation will always be multipliedby zero.

In the following slide there is additionally a restriction that the bonus should only becalculated for Sales Volume > 0.

2011 © 2011 SAP AG. All rights reserved. 117

Page 132: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Figure 38: Boolean Operators

118 © 2011 SAP AG. All rights reserved. 2011

Page 133: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Exercise 4: Create Calculated Key Figures

Exercise ObjectivesAfter completing this exercise, you will be able to:• Define new calculated key figures at the InfoProvider and query level, and

include them in a query definition• Define new calculated key figures using Boolean operators

Business ExampleYou need additional calculations for the analysis of sales volumes in order to carryout a comparison between the sales volumes of two different time periods. You wantto show the difference, the percentage variance of the sales volumes, and the shareof sales volumes for each sold-to party in relation to the total sales volume of thetime period in question.

Task 1:You should create a report that allows you to compare the sales volumes of yourindividual sold-to parties of sales organization 1000 within two time periods.Define three new calculated key figures or new formulas that list the difference andpercentage variation of the sales volumes of November and December 2006.

You also need information on the percentage share of the sales volume of a sold-toparty in relation to the total sales volume for December 2006. You should use anadditional column to display the subtotals of the sales volumes for December, so thatyou can hide the subtotal rows in your report.

1. Create a new query using the InfoProvider MultiProvider -Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea withthe characteristic Sold to party (T_SOLD_TO) in the rows.

Use the Division (0DIVISION) as a free characteristic. Add Sales organization(0SALESORG) to the Filter area as a Characteristic Restriction and filteraccording to Germany Frankfurt (1000).

In your query, use the two restricted key figures that have already been definedas Sales Volume EUR 11/2006 (P_RKF_SV_11_2006) and Sales Volume EUR12/2006 (P_RKF_SV_12_2006) in the columns.

Define a new Calculated Key Figure at the InfoProvider level:

Description: U## Sales Volume Diff. 12-11/2006

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 119

Page 134: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Technical name: U##_DIFF001

This is calculated as the difference of the two restricted key figures that havealready been defined: Sales Volume EUR 11/2006 (P_RKF_SV_11_2006) andSales Volume EUR 12/2006 (P_RKF_SV_12_2006). When finished, place thenew key figure into the columns.

2. In the same query, define a secondCalculated Key Figure at InfoProvider level.

Description: U## Sales Volume EUR % Var. 11/12/2006

Technical name: U##_CKF_PERC001

This key figure is for calculating the percentage variance of the sales volumesfor the months November and December 2006. Once you have defined this keyfigure, place it in the Columns area of the query definition.

3. Now define a new Formula, this time at Query level.

Description: % Share of overall result Sales Volume EUR12/2006

This calculates, for the month of December, the percentage share of sales volumefor a sold to party in relation to the overall result. Place the new key formula asthe last element in the key figure structure.

4. To display the subtotal of the sales volumes for December 2006 in a separatecolumn, define a new formula in the same query. Position it as the last keyfigure in the structure.

Description: Result of Sales Volume EUR 12/2006

5. Save the query role Roles → Role## → Queries under:

Description: U## Query Calc. Keyf. 001

Technical name: U##_QD_CKF001

Now execute the query.

Add the Division to your report as the first column in the drilldown, and evaluatethe behavior of the last two formulas in the report.

Continued on next page

120 © 2011 SAP AG. All rights reserved. 2011

Page 135: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Task 2:You have calculated the percentage variance of the sales volumes achieved in themonths November and December 2006. You give a staggered bonus for an increasein sales volume for each sold-to party.

1. In the query definition U## Query Calc. Keyf. 001(U##_QD_CKF001) define anew formula called Bonus that calculates a bonus of 5% for percentage salesvolume increases of more than 10%, and a bonus of 1% for percentage increasesbetween 0 and 10%, based on Sales Volume EUR 12/2006.

2. For sold-to parties who achieved no sales volume in November 2006, the errormessage DIV/0 appears when the bonus and percentage variance are calculated.However, you want this sold-to party to be included in bonus calculation with abonus of 1%. Therefore, you use the data function NDIV0(x) on the calculatedkey figure U## Sales Volume EUR % Var. 11/12/2006 (U##_CKF_PERC001) toreceive the value zero instead of an error message. This value allows the bonuscalculation to be carried out appropriately.

2011 © 2011 SAP AG. All rights reserved. 121

Page 136: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Solution 4: Create Calculated Key FiguresTask 1:You should create a report that allows you to compare the sales volumes of yourindividual sold-to parties of sales organization 1000 within two time periods.Define three new calculated key figures or new formulas that list the difference andpercentage variation of the sales volumes of November and December 2006.

You also need information on the percentage share of the sales volume of a sold-toparty in relation to the total sales volume for December 2006. You should use anadditional column to display the subtotals of the sales volumes for December, so thatyou can hide the subtotal rows in your report.

1. Create a new query using the InfoProvider MultiProvider -Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea withthe characteristic Sold to party (T_SOLD_TO) in the rows.

Use the Division (0DIVISION) as a free characteristic. Add Sales organization(0SALESORG) to the Filter area as a Characteristic Restriction and filteraccording to Germany Frankfurt (1000).

In your query, use the two restricted key figures that have already been definedas Sales Volume EUR 11/2006 (P_RKF_SV_11_2006) and Sales Volume EUR12/2006 (P_RKF_SV_12_2006) in the columns.

Define a new Calculated Key Figure at the InfoProvider level:

Description: U## Sales Volume Diff. 12-11/2006

Technical name: U##_DIFF001

This is calculated as the difference of the two restricted key figures that havealready been defined: Sales Volume EUR 11/2006 (P_RKF_SV_11_2006) andSales Volume EUR 12/2006 (P_RKF_SV_12_2006). When finished, place thenew key figure into the columns.

a) To define a new query, open the Query Designer.

Choose New Query.

Select InfoProvider: InfoAreas → Reporting Layer → Sales andDistribution → MultiProvider - Customer Sales (P_SALES01).

Choose Open.

b) Place the Sold to party (T_SOLD_TO) characteristic found in the Customerdimension into the Rows section.

Continued on next page

122 © 2011 SAP AG. All rights reserved. 2011

Page 137: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

Place the Division (0DIVISION) characteristic found in the Sales area datadimension into the Free Characteristics section.

c) Place the Sales Organization (0SALESORG) characteristic found in theSales area data dimension into the Characteristic Restriction section.

In the context menu for Sales Organization, choose Restrict → SingleValues. Select Germany Frankfurt (1000) and adopt the selection using theArrow button. Choose OK.

d) In the InfoProvider area, expand the Key Figures folder to show theRestricted Key Figures folder. From the Restricted Key Figures folder,place Sales Volume EUR 11/2006 (P_RKF_SV_11_2006) and Sales VolumeEUR 12/2006 (P_RKF_SV_12_2006) into the Columns using Drag&Drop.

e) To define the first calculated key figure at InfoProvider level, choose NewCalculated Key Figure in the context menu of the Key Figures folder. Thenchoose Edit in the context menu of the New Calculated Key Figure.

Description: U## Sales Volume EUR Diff. 12-11/2006

Technical name: U##_CKF_DIFF001

f) From the Available Operands window, drag Sales Volume EUR 12/2006(P_RKF_SV_12_2006) from the Restricted Key Figures folder into theDetail View section using Drag&Drop. Choose Minus (-) and then placeSales Volume EUR 11/2006 (P_RKF_SV_11_2006) into the Detail Viewsection using Drag&Drop. Choose OK.

g) To add the newly defined key figure to the query definition, use Drag&Dropto place U## Sales Volume Diff. 11/12 2006 into the Columns section ofyour query.

2. In the same query, define a secondCalculated Key Figure at InfoProvider level.

Description: U## Sales Volume EUR % Var. 11/12/2006

Technical name: U##_CKF_PERC001

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 123

Page 138: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

This key figure is for calculating the percentage variance of the sales volumesfor the months November and December 2006. Once you have defined this keyfigure, place it in the Columns area of the query definition.

a) To define the second calculated key figure, again at InfoProvider level,choose New Calculated Key Figure in the context menu of the Key Figuresfolder. Then choose Edit in the context menu of the New Calculated KeyFigure.

Description: U## Sales Volume EUR % Var. 11/12/2006 .

Technical name: U##_CKF_PERC001

b) Use Drag&Drop to place Sales Volume EUR 12/2006(P_RKF_SV_12_2006), Operators → Percentage Functions→ Percentage Variance (%) and Sales Volume EUR 11/2006(P_RKF_SV_11_2006) into the Detail View section.

Choose OK.

c) Drag the new calculated key figure into the Columns section of your query.

3. Now define a new Formula, this time at Query level.

Description: % Share of overall result Sales Volume EUR12/2006

This calculates, for the month of December, the percentage share of sales volumefor a sold to party in relation to the overall result. Place the new key formula asthe last element in the key figure structure.

a) For the definition of the new Formula, choose New Formula in the contextmenu for the Key Figures Structure. Then choose Edit in the context menuof the new Formula.

Description: % Share of overall result Sales VolumeEUR 12/2006

Note: Use the Enter key for line breaks.

b) Use Drag&Drop to place the Percentage share of overall result (%GT)function found in Operators → Percentage Functions into the DetailView section. Then do the same with Sales Volume EUR 12/2006(P_RKF_SV_12_2006) found in Available Operands.

Choose OK.

c) Drag the new formula to be the last element in the key figure structure.

Continued on next page

124 © 2011 SAP AG. All rights reserved. 2011

Page 139: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

4. To display the subtotal of the sales volumes for December 2006 in a separatecolumn, define a new formula in the same query. Position it as the last keyfigure in the structure.

Description: Result of Sales Volume EUR 12/2006

a) For the definition of the new formula, choose New Formula in the contextmenu for the Key Figures structure. Then choose Edit in the context menuof the new Formula.

Description: Result of Sales Volume EUR 12/2006

b) Use Drag&Drop to place the Result (SUMCT) function found in Operators→ Data Functions into the Detail View section. Then do the same withthe structure element Sales Volume EUR 12/2006 (P_RKF_SV_12_2006)found in Available Operands.

Choose OK.

c) Drag the new formula to be the last key figure in the structure.

5. Save the query role Roles → Role## → Queries under:

Description: U## Query Calc. Keyf. 001

Technical name: U##_QD_CKF001

Now execute the query.

Add the Division to your report as the first column in the drilldown, and evaluatethe behavior of the last two formulas in the report.

a) To save the query, choose Save Query.

Select Roles → Role## → Queries.

b) Enter:

Description: U## Query Calc. Keyf. 001

Technical name: U##_QD_CKF001

c) Execute the query.

d) Include the Division in the drill-down in front of the Sold to Party by usingdrag and drop navigation.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 125

Page 140: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Task 2:You have calculated the percentage variance of the sales volumes achieved in themonths November and December 2006. You give a staggered bonus for an increasein sales volume for each sold-to party.

1. In the query definition U## Query Calc. Keyf. 001(U##_QD_CKF001) define anew formula called Bonus that calculates a bonus of 5% for percentage salesvolume increases of more than 10%, and a bonus of 1% for percentage increasesbetween 0 and 10%, based on Sales Volume EUR 12/2006.

a) Open the query definition.

In the context menu for the Key Figures Structure, choose New Formula.Then choose Edit in the context menu of the new Formula.

b) Description: Bonus

c) Create the following formula in the Detail View section by using BooleanOperators :

(U## Sales Volume EUR % Var. 11/12/2006 > 10) * (Sales VolumeEUR 12/2006 * 0.05) + (U## Sales Volume EUR % Var. 11/12/2006>= 0 AND U## Sales Volume EUR % Var. 11/12/2006< = 10) * (SalesVolume EUR 12/2006 * 0.01)

d) Position the new formula as the last key figure in the structure.

e) Save the query and then execute it again to view the results.

2. For sold-to parties who achieved no sales volume in November 2006, the errormessage DIV/0 appears when the bonus and percentage variance are calculated.However, you want this sold-to party to be included in bonus calculation with abonus of 1%. Therefore, you use the data function NDIV0(x) on the calculated

Continued on next page

126 © 2011 SAP AG. All rights reserved. 2011

Page 141: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Calculated Key Figures

key figure U## Sales Volume EUR % Var. 11/12/2006 (U##_CKF_PERC001) toreceive the value zero instead of an error message. This value allows the bonuscalculation to be carried out appropriately.

a) Open the query definition.

b) Locate (at the InfoProvider level) your calculated key figure U## SalesVolume EUR % Var. 11/12/2006 (U##_CKF_PERC001). Double-click thekey figure to open the Formula Editor and change to the edit mode.

c) Position the cursor at the beginning of the formula. In the Data Functionsfolder, double-click the NDIV0(x) function to insert this function at thestart of the formula.

d) Delete the close bracket. Then add the close bracket to the end of theformula.

e) Choose OK to close the formula editor.

f) Save the query, and execute it.

2011 © 2011 SAP AG. All rights reserved. 127

Page 142: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Lesson Summary

You should now be able to:• Explain the objectives and use of calculated key figures in information analyses• Define calculated key figures at the InfoProvider level and at the query level• Define a calculated key figure and defining missing objects directly• Using Boolean Operators within calculated key figures

128 © 2011 SAP AG. All rights reserved. 2011

Page 143: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Lesson: Configuring Properties of Key Figures

Lesson OverviewThis lesson shows you how to configure the properties of key figures to optimizeyour report and to achieve additional information out of the limited number of keyfigures provided in the InfoProvider.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Identify the General, Display, Extended, and Calculations options within theproperties of key figures

• Carry out Currency Translation in the Business Explorer• Use the Exception Aggregation to deliver many additional options for analysis

Business ExampleYour company has asked you to optimize reports. You are going to make varioussettings in the properties of the key figures.

You need additional information out of the restricted number of key figures providedin the InfoProvider you want to analyze.

Configuring Key Figure PropertiesThe various components of a query have specific properties that reproduce importantfunctions. These properties can have either an effect on the presentation of the keyfigure or the function or both. Call the Properties pane by clicking on the tab at thebottom right of the screen (the other tab is Tasks). Now select the required key figureby either clicking once on the object in the query, or use the drop-down list at the topof the properties pane. The properties are organized into various tabs. Simply clickthe tab to display the current settings for that group.

You can also double-click the desired key figure, or highlight it and choose Edit fromits context menu. Then you will open the Change Selection window or the ChangeFormula window,which also contain the different tab pages to maintain the propertiesof the key figure.

2011 © 2011 SAP AG. All rights reserved. 129

Page 144: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Figure 39: Properties Entry Pane

A general feature found in many of the properties is the Use Default Setting. If thisbox is checked the setting from the InfoObject metadata will be used. Once youoverride the default setting this check box will automatically be unchecked to showthat the setting has been changed and is now non standard. If you then check the boxthe setting returns to the default.

It is possible tomaintain properties of multiple key figures simultaneously. Simplyhighlight all the key figures you want to include, the properties pane will then displaythe properties. If there are any conflicts between the different key figures that is,one key figure uses long description whereas another key figure uses the mediumdescription then you will see the text “Multiple Values Selected” where the settingwould normally appear. In this case you will need to select the individual key figuresto see their respective settings.

130 © 2011 SAP AG. All rights reserved. 2011

Page 145: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

General Tab• Description

Here you can edit key figure description. You can also use text variables, whichwill be used to provide all or part of the text at query runtime.

For key figure descriptions, you can force a new line by pressing the enter key.

Caution: The total length of all characters in all lines including the linebreak character is limited to 60 characters.

Note: It is also possible to edit the description “in-line” using thestandard Microsoft Windows feature. This means you are able to changethe description directly on the key figure by simply clicking once on thekey figure, the cursor becomes positioned at the start of the descriptionready for you to start editing.

• Technical name

You can assign a unique technical name to structure parts such as key figures.This is optional.

Note: When accessing external interfaces (such as SAP Crystal Reports,in URLs, or through OLE DB for OLAP), the structure parts must have atechnical name so that it can be accessed without error.

2011 © 2011 SAP AG. All rights reserved. 131

Page 146: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Display Tab• Hide

You can hide key figures that you only need for calculating formulas and do notwant to display in the analysis. If you use Hide (can be shown) then the keyfigure will not be shown by default in the result however the user can select thiskey figure in the navigation controls to display this in the result.

• Highlight

You can choose whether the key figure is to be highlighted in the report here. Thiswill allow the presentation tool (that is, Excel or web) to identify the key figures,which need additional formatting so that the values are very clearly shown in theresult. The actual formatting is taken care of in the front end tool, and not here.

• Number of Decimal Places

You can set the number of decimal places here.

• Scaling Factor

You can set the scaling factor, this is helpful when you have large numbers inyour result and you want to improve the presentation.

Caution: The scaling factor does not automatically display in the report.You have to set the Display Scaling Factors for Key Figures checkboxseparately in the query properties.

• Sign Change

You can choose to remove the sign or reverse it.

Caution: The reverse +/- signs is only a display function. It has noinfluence on calculation in formulas.

• Status of Node

For a hierarchical arrangement of structure elements, you can define whethera node is expanded or collapsed in the structure. This property is applied tothe executed query and is independent of the status of the node in the QueryDesigner. The node can therefore be collapsed during design, for example, butthen be expanded when the query is executed if this is specified in this property.

132 © 2011 SAP AG. All rights reserved. 2011

Page 147: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Calculations Tab• Local Calculations

Calculate Result As.. allows you to choose a method by which the results arecalculated, such as average, count, min, max and so on.

Example: You want to calculate the result on the basis of the average of alldisplayed sales volumes instead of on the basis of total sales volume.

Caution: Use the setting Summation to ensure that the results arerecalculated locally once a condition has been applied. Otherwise theresult will not be the sum of the result rows displayed, the result willinclude rows, which have been excluded from the condition.

Calculate Single Values As.. As well as the results you can also set thecalculation behavior of the single values.

Also Apply to Results. Allows you to cause the results to follow the calculationbehavior of the single values.

Cumulative causes the results to calculate over a series of values.

Calculation Direction allows you to choose whether the calculation is performedin the rows or column, depending on your layout and the calculation methodsyou have chosen, not setting this correctly may cause unexpected results.

Extended Tab• Constant Selection

This function is only available for selections, selection cells, and restricted keyfigures. Check this box to determine that for this key figure the result remainsconstant during navigation, regardless of the filtering set by the user at runtime.Therefore, the selection can be used as a reference size.

• Formula Collision

The Formula Collision function only displays in the Properties dialog box if twostructures are used in the query definition and both contain formulas. In placeswhere the two formulas collide, it is not clear how the system should calculate.You can therefore choose the formula you want to use to calculate the value.

2011 © 2011 SAP AG. All rights reserved. 133

Page 148: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

There is a difference between the Constant Selection as a property of a key figure onthe Extended tab page and the Constant Selection as a property of the restrictingcharacteristic of a restricted key figure:

• When using Constant Selection as a property of a key figure (on the Extendedtab page), the key figure values will remain constant during navigation usingany characteristic.

• When using Constant Selection as a property of the restricting characteristicof a restricted key figure (in the Change Selection → Details of the Selectionarea), the key figure values only remain constant during navigation using therestricting characteristic. The values of key figure will change as usual whenusing any other characteristic.

You can use query P_PROP_CONST_SEL_001 to show this difference.

Planning Tab• Change Data

You can decide if the cells are input ready for this key figure so users can entervalues directly into the cells. This setting is used for planning applications. Hereyou can also decide if the key figure can be changed by a planning function (abackground planning task, which modifies or generates planning data, suchas copy data, revalue data).

Conversions Tab• Currency Translation

In the Query Designer, you can set a currency conversion type and a targetcurrency. You can also use a variable to allow the translation setting to bedetermined at runtime. See the next section for more general information relatingto currency conversion.

• Unit Conversion

In the Query Designer, you can set a Unit of Measurement conversion key anda target unit. You can also use a variable to allow the translation setting to bedetermined at runtime.

Currency TranslationAs prerequisite for the currency translation there have to be created currencytranslation types via the transaction RSCUR before.

A currency translation in the SAP NetWeaver BW can take place at two points.

134 © 2011 SAP AG. All rights reserved. 2011

Page 149: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Figure 40: Currency Translation

1. When the data is updated in the InfoProvider, a currency can be determinedfor use with each key figure.

2. In the query definition, you can determine the Currency Conversion Type (=currency translation type) and Target Currency for each structure part separately.If necessary, enter the required target currency into the Target Currencydrop-down box.

If you want the target currency to be flexibly determined at the runtime of thereport, you can include a currency variable.

Additionally, in the executed report, all value key figures of the query can be translatedinto one common target currency with a currency translation key. In the context menuof the report in the BEx Analyzer, choose Query Properties → Currency Conversion.

Aggregation Tab• Exception Aggregation

For a formula, you can choose how the result is calculated. Use the drop-downlist to select the required behavior such as Min, Max, Count. You must alsoselect the reference object, which is used in the aggregation. See the next sectionfor more information on how to define an exception aggregation.

2011 © 2011 SAP AG. All rights reserved. 135

Page 150: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Exception AggregationUse exception aggregation to derive additional information out of a limited number ofkey figures provided in the InfoCube you want to analyze.

You can also create calculated key figures using a formula that uses exceptionaggregation itself (this is a nested exception aggregation).

Figure 41: Exception Aggregations

136 © 2011 SAP AG. All rights reserved. 2011

Page 151: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Defining Exception AggregationUseExample: As a sales manager, you want to analyze the number of different materialssold to the customers for each sales month. In your InfoCube only a key figure ofthe Sales Volume EUR for the different sold materials is provided. Using exceptionaggregation, you can derive the additionally required key figure just from the SalesVolume EUR for sold materials. Here’s how you do it:

Procedure1. Create a query that contains the characteristic Cal. year / month in the rows, and

the key figure Sales Volume EUR in the columns.

2. Additionally, drag the characteristics Sold to party and Material into the freecharacteristics. This is fine to verify the result later, but not necessary fordefining the exception aggregation!

3. Next define a new formula Number of Different Materials, whichsimply includes the query key figure Sales Volume EUR (no operators requiredin this example). Then access the properties of this formula and choose theexception aggregation setting Counter for All Detailed Values that are notZero, Null, or Error for the reference characteristic Material. In this way youhave defined a counter for your sold materials derived from the key figureSales Volume EUR. You have simply counted the number of occurrences ofSales Volume EUR to give you the new key figure Number of DifferentMaterials.

4. Save and execute the query, and to verify the result, you can insert the freecharacteristic Material into the rows and check the number of the differentmaterials. It might be wise to filter on a month with only a few values.

2011 © 2011 SAP AG. All rights reserved. 137

Page 152: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Defining Nested Exception AggregationUseExample: The sales manager also wants to analyze the average number of differentmaterials per customer for each sales month. For that, the already exceptionaggregated formula Number of Different Materials has to be used inanother exception aggregation. Thus, we create a nested exception aggregation.

Procedure1. Extend the query from above: Define a new formula Average Number

of Different Materials per Customer, which simply includesthe already exception aggregated formula Number of DifferentMaterials (again no operators required). Then access the properties of thisformula and choose the exception aggregation setting Average for the referencecharacteristic Sold to party.

The key thing here is that the results of the first aggregation are further processedby the second aggregation.

2. Save and execute the query, and to verify the result, you can insert the freecharacteristics Sold to party and Material into the rows and check the number ofthe different sold to parties and materials. It might be wise to filter on a monthwith only a few values.

138 © 2011 SAP AG. All rights reserved. 2011

Page 153: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Exercise 5: Configure Properties of KeyFigures

Exercise ObjectivesAfter completing this exercise, you will be able to:• Use the various settings that can be made for properties of key figures in reports

Business ExampleAn ABC analysis of your customers based on their sales volume delivers veryappropriate information to reorganize the relationship to them.

Task:You are asked to generate an ABC analysis of your customers based on their salesvolume. Answer the following question:

“With what percentage of my sold to parties do I reach 80% of overall sales volume? ”

Create a new query in order to achieve a report with this layout:

Sold to Party Sales VolumeEUR

% Share Sold toParties

% Share Sales VolumeEUR

You need a calculated key figure %Share Sold to Parties based on the keyfigure Sales Volume EUR that determines the percentage share of the single sold toparty to all sold to parties additionally using Exception Aggregation, Normalizationand Accumulation within its properties.

The last column %Share Sales Volume EUR represents again the key figureSales Volume EUR, normalized and accumulated.

1. Create a new query based on the InfoProvider MultiProvider Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Sold to party (T_SOLD_TO) into the rows and the SalesVolume EUR (T_INVCD_V) key figure into the columns.

2. In the Key Figure structure, define a new formula.

Description: % Share Sold to Parties

Use the Sales Volume EUR (T_INVCD_V) key figure to do this.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 139

Page 154: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Enter the appropriate settings in order to count the sold to parties and to displaythe count in a normalized and accumulated way, displayed with 3 decimal places.

3. Then, once again, drag the Sales Volume EUR (T_INVCD_V) key figure into theKey Figures structure and display it normalized and accumulated, displayedwith 3 decimal places.

Change the description into % Share Sales Volume EUR.

4. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query ABC-Analysis 001

Technical Name: U##_QD_ABC001

Execute the query and sort the report descending by the Sales Volume EUR(T_INVCD_V) key figure, and verify the result.

Now you can easily detect: “With what percentage of my sold to parties do Ireach 80% of overall sales volume? ”

140 © 2011 SAP AG. All rights reserved. 2011

Page 155: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Solution 5: Configure Properties of KeyFiguresTask:You are asked to generate an ABC analysis of your customers based on their salesvolume. Answer the following question:

“With what percentage of my sold to parties do I reach 80% of overall sales volume? ”

Create a new query in order to achieve a report with this layout:

Sold to Party Sales VolumeEUR

% Share Sold toParties

% Share Sales VolumeEUR

You need a calculated key figure %Share Sold to Parties based on the keyfigure Sales Volume EUR that determines the percentage share of the single sold toparty to all sold to parties additionally using Exception Aggregation, Normalizationand Accumulation within its properties.

The last column %Share Sales Volume EUR represents again the key figureSales Volume EUR, normalized and accumulated.

1. Create a new query based on the InfoProvider MultiProvider Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Sold to party (T_SOLD_TO) into the rows and the SalesVolume EUR (T_INVCD_V) key figure into the columns.

a) To define a new query, open the Query Designer and choose New Query .

b) Choose InfoAreas → Reporting Layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01) → OK.

c) Place the Sold to party (T_SOLD_TO) characteristic under the Customerdimension into the Rows section.

d) Place the Sales Volume EUR (T_INVCD_V) key figure into the Columnssection.

2. In the Key Figure structure, define a new formula.

Description: % Share Sold to Parties

Use the Sales Volume EUR (T_INVCD_V) key figure to do this.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 141

Page 156: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Enter the appropriate settings in order to count the sold to parties and to displaythe count in a normalized and accumulated way, displayed with 3 decimal places.

a) In the context menu of the Key Figures structure define a New Formula.Then choose Edit from the context menu of the new formula.

Description: % Share Sold to Parties

Use Drag&Drop to place Sales Volume EUR (T_INVCD_V) into the DetailView area.

On the Aggregation tab page, select the Exception Aggregation Counter forAll Detailed Values. Choose Sold to Party (T_SOLD_TO) as the Referencecharacteristic for the exception aggregation.

On the Calculations tab page, go to Calculate Single Values As, selectNormalize According to Overall Result and check the box Cumulated.The box Also Apply to Results has to be unchecked.

On the Display tab page, choose 0.000 for the Number of Decimal Places.

Choose OK.

b) Position the new formula as the last element in the structure.

3. Then, once again, drag the Sales Volume EUR (T_INVCD_V) key figure into theKey Figures structure and display it normalized and accumulated, displayedwith 3 decimal places.

Change the description into % Share Sales Volume EUR.

a) Once again, drag the Sales Volume EUR (T_INVCD_V) key figure intothe Key Figures structure.

Description: % Share Sales Volume EUR

On the Calculations tab page, go to Calculate Single Values As, selectNormalize According to Overall Result and check the box Cumulated.The box Also Apply to Results has to be unchecked.

On the Display tab page, choose 0.000 for the Number of Decimal Places.

4. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query ABC-Analysis 001

Technical Name: U##_QD_ABC001

Execute the query and sort the report descending by the Sales Volume EUR(T_INVCD_V) key figure, and verify the result.

Continued on next page

142 © 2011 SAP AG. All rights reserved. 2011

Page 157: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Key Figures

Now you can easily detect: “With what percentage of my sold to parties do Ireach 80% of overall sales volume? ”

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query ABC-Analysis 001

Technical Name: U##_QD_ABC001

b) Execute the query via Exit and use the query or via Execute.

Go to the key figure Sales Volume EUR (T_INVCD_V) and sort the valuesin descending order using the icons in the column heading.

2011 © 2011 SAP AG. All rights reserved. 143

Page 158: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Lesson Summary

You should now be able to:• Identify the General, Display, Extended, and Calculations options within the

properties of key figures• Carry out Currency Translation in the Business Explorer• Use the Exception Aggregation to deliver many additional options for analysis

144 © 2011 SAP AG. All rights reserved. 2011

Page 159: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Lesson: Defining Structures and Working with Cells

Lesson OverviewThis lesson shows you how structures can be defined and how they can be savedand reused in various queries. We will also describe formula collision and how wecan resolve them. Finally we finish off with a look at how we can take control ofthe query right down to the cell level.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Define structures• Work with queries containing two structures• Save structures as reusable objects and reuse them• Handle formula collision• Use the cell editor

Business ExampleYou use query definitions with two structures for more complex analysis, and some ofthe structures shall be saved as global elements to be used by other query definitions.Eventually you need to watch out for formula collisions and resolve them. Via the celleditor every single cell that is affected by both structures can be addressed.

Structures in QueriesStructures are combinations of characteristics and key figures (of basic key figures,calculated key figures, or restricted key figures) of the InfoProvider. A structure can beused for example, in a planned/actual comparison or in a contribution margin scheme.

A structure forms the basic framework of the axes in a table (rows or columns). Itconsists of structural components.

We differentiate between key figure structures and characteristic structures.

Structural components of key figure structures are always based on the key figureselections (basic key figures, restricted key figures, and calculated key figures orformulas).

Characteristic structural components cannot contain key figure selections.

2011 © 2011 SAP AG. All rights reserved. 145

Page 160: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

The setup of the structure determines the sequence and number of key figures orcharacteristic values in the columns and rows of the query. You can navigate throughthe structure in the executed query and set filters for it.

If you are using two structures (for example, a key figure structure in the columns anda characteristic structure in the rows), a table with fixed cell definitions is created.

Structures and their structural components are complex objects. Structural componentscan be formulas or selections.

Within a query definition, you can use either no structures or a maximum of twostructures. Of these, only one can be a key figure structure. There is no restrictionas to where these structures appear in the layout, that is, you could put both structuresin the columns. You can create some very flexible layouts using two structures.

You can combine structures freely with other characteristics on the axes.

Figure 42: Key Figure Structure and Characteristic Structure

146 © 2011 SAP AG. All rights reserved. 2011

Page 161: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Key Figure StructureA key figure structure appears in the Query Designer automatically if you move akey figure from the InfoProvider screen area into the rows or columns of the querydefinition. The structure that the system creates automatically is identified by thesymbol and contains the default name Key Figures as a proposal. You can changethis default name.

Note:

• Key figures in the Rows or Columns are always a component of astructure. If you place a single key figure in the Filter directory of thequery definition, the key figure is not a structural component. In thiscase, you can still use up to two characteristic structures in the rowsor columns.

• You can use key figures in a query in only one structure.• Each structural component of a key figure structure must contain a

key figure.

Characteristic StructureIf you want to use a structure in the query with several characteristic values, you firsthave to create a structure and then insert the required characteristics and values.

The use of a characteristic structure is optional. The difference between acharacteristic structure and the use of characteristics on an axis is that with thecharacteristic structure, you have already specified the number and sequence of thecharacteristic values in the query definition. If you use a characteristic on an axis, allposted characteristic values for the characteristic are displayed in the query. You canrestrict the selection of specific characteristic values by setting a filter.

2011 © 2011 SAP AG. All rights reserved. 147

Page 162: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Creating Structures

1. Use the right mouse button to choose New Structure from the context menu inthe columns or rows directory. The default name for the structure is Structure.You can change this default name.

2. In the context menu of the new structure, choose New Selection. In the NewSelection dialog box, use drag and drop to choose characteristic and key figuresof the InfoProvider that you want to use in the new structure. Restrict onecharacteristic or key figure.

3. Choose New Formula to define calculations.

Queries with two structuresA query with structures provides a very large number of opportunities for creativereport design. A few points to remember:

• You can have a maximum of two structures in a query.• You can place both structures in the rows or columns or you can put one structure

in the row and one in the column.• You can mix structures and characteristics in the rows or columns.• You can provide your own descriptions for the rows/columns that are represented

by structures members. (that is, define the first row of a structure based onrequired values of 0PERSON and name the row “My Team”).

• You can define formulas in either structure (just watch the collisions)• You can use all the usual filtering options to define the members of the structure,

that is, single values, ranges, hierarchy nodes. You can even use variables tokeep the selections flexible.

Hint: When defining the descriptions for the structure members try indentingthe text (add some leading blanks) to emphasize the section of the report.

Reuse of StructuresStructures can also be used in several queries for the same InfoProvider. In orderfor this to be possible, you need to save them as reusable structures. This is veryreasonable especially for complex structures.

To make a distinction, we call structures that are not stored as reusable structure localstructures. Local structures are only used in one query.

148 © 2011 SAP AG. All rights reserved. 2011

Page 163: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Creating Reusable Structures

1. Select the structure that you want to reuse. Choose Save as… from the contextmenu (right mouse-click) and enter a technical name and a description.

2. The saved structure is now available in the structure directory of the InfoProvidertree. You will find Key Figure Structures under Structures → With Key Figuresand Characteristic Structures under Structures → Without Key Figures.

3. You can use these structures for the definition of new queries for thisInfoProvider.

Figure 43: Creating a Reusable Structure

Note: Changes made later to global structures affect all queries in which theywere used. If you only want to make local changes in a particular query, youcan choose Remove Reference in the context menu for the structure, and as aresult, change the reusable structure into a local structure.

Changes made later to this local structure do not affect the definition of thereusable structure, nor the queries that you made with the reusable structure.

2011 © 2011 SAP AG. All rights reserved. 149

Page 164: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Formula CollisionA formula collision occurs when the query uses two structures and there are formulasin both structures. The point at which the formulas intersects is called a formulacollision. You need to tell the system how to resolve the collision (only one formulacan be carried out for the cell!) by making the appropriate setting in the Propertiesdialog.

Note: The Formula Collision function only displays in the Properties dialogbox if two structures are used in the query definition and both containformulas.

In places where the two formulas collide, it is not clear how the system shouldcalculate. You can therefore choose the formula you want to use to calculate the value.

Figure 44: Formula Collision

150 © 2011 SAP AG. All rights reserved. 2011

Page 165: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

If a formula collision occurs, as described in the example above, you can specify whichformula to use in the calculation. You can make the following settings via Right mouseclick the formula → Edit → Extended tab page → Eliminate Formula Collision field:

• Nothing defined: If you do not specify a value, the default behavior takes place:

For the calculation, the formula, which is member of the first created structure,is the dominant one, and will be used. Thus, the time stamp of the structure isrelevant, not the time stamp of the formula itself.

Via choosing one of the following two options to eliminate the collision thedefault behavior is overridden.

• Use Result of This Formula: The result of this formula has priority in a collision.• Use Result of Competing Formula: The result of a competing formula has

priority in a collision• After you made the appropriate settings it can occur that two colliding formulas

have the same setting Use Result of This Formula. Then, the formula whosesetting was edited last is the dominant one and will be used.

Note:

Collisions always occur when multiplication/division and addition/subtraction aremixed in competing formulas. If both formulas involve multiplication/division oraddition/subtraction only, both calculation directions return the same result. In thiscase, no settings are required for formula collision.

Working with cellsWhen you define selection criteria and formulas for structural components and thereare two structural components of a query, generic cell definitions are created at theintersection of the structural components that determine the values to be presented inthe cell.

Cell-specific definitions allow you to define explicit formulas and selection conditionsfor cells as well as implicit cell definitions. This means that you can override implicitlycreated cell values. This function allows you to design more detailed queries.

2011 © 2011 SAP AG. All rights reserved. 151

Page 166: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

You can also define cells that have no direct relationship to the structural components.These cells are not displayed and serve as containers for help selections or helpformulas.

• Cells are the intersection of two structures in a query definition. Therefore theCell Editor can only be used in query definitions where there are two structures.

• Cell Editor allows direct definition of specific cells in a query.• Cells can be formulas, selections, references, or help cells.• The Cell Editor allows you to mark a specific cell as a “reference cell” so that it

can be referenced in further calculations.• You can also define as many help cells as required that have no direct relationship

to the structural components. These cells are not displayed, but serve ascontainers for help selections or help formulas.

Caution: A cell is the intersection of two structure elements. The term Cellin the function of Defining Exception Cells should not be confused with cellsin MS-Excel.

The formulas or selection conditions that you define for a cell are alwayseffective at the intersection of two structure elements. If a drilldowncharacteristic has various characteristic values, the cell definition is alwayseffective at the intersection of the characteristic value with the key figure.

Figure 45: Cell Editor

152 © 2011 SAP AG. All rights reserved. 2011

Page 167: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Defining Exception CellsUseCell-specific definitions allow you, in addition to the implicit cell definitions resultingfrom the formulas created, to explicitly define formulas and selection conditionsfor cells, and as a result overwriting the implicitly generated values. This functionallows you to create more detailed queries.

Procedure1. In the Query Designer, choose Cells (open) from the toolbar or use the menu

option under View to reach the Cell Editor functions.

2. You can now use four different functions.

New Selection

• Select a cell in the Cells dialog box, and use the right mouse buttonto choose New Selection.

• Define the required selection by dragging a key figure and if desiredthe characteristic values by which you want to restrict the key figureto the right-hand area of the Details of the Selection dialog box.

• Enter a description for the selection and choose OK.

New Formula

• Select a cell in the Cell dialog box, and use the right mouse buttonto choose New Formula.

• Define the required formula. Enter a description for the formula andchoose OK.

New Cell Reference

• Each cell that you define can be reused in formulas. If you want toreuse the value of the implicit generic cell definition that automaticallyoccurs at the intersection of two structure parts of a query, select thiscell in the Cell Definition dialog box, and choose New Cell Referenceusing the right mouse button.

• The description arising from the two structure parts automaticallyappears in the cell.

• You can now refer to this cell.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 153

Page 168: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Help Cells

• Click the cell adjacent to the Help Cells.• Choose the required option either New Selection or New Formula

if you need additional cells for auxiliary selections or auxiliaryformulas, which are not already included in the query structure youhave defined from the construction of rows and columns.

• You can now refer to this help cell.

154 © 2011 SAP AG. All rights reserved. 2011

Page 169: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Exercise 6: Define Structures and work withCells

Exercise ObjectivesAfter completing this exercise, you will be able to:• Define structures• Save structures as reusable objects and reuse them• Handle formula collision• Use the cell editor

Business ExampleYou use query definitions with two structures for more complex analysis, and someof the structures shall be saved as global elements in order to be used by other querydefinitions. Eventually you need to watch out for formula collisions and resolve them.Via the cell editor every single cell that is affected by both structures can be addressed.

Task 1: Characteristic Structure (Without Key Figures)and Key Figure Structure (With Key Figures)Generate a report that represents the analysis of sales volumes for the whole year 2006and December 2006 referring to all materials as well as to pumps.

1. Create a new query based on the InfoProvider MutliProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, create a Characteristic structure with the following name:

Description: U## Comparison Pumps

This structure contains as the first structure element All Materials and assecond structure element only the Pumps (only materials whose key beginswith P-10*).

2. In the columns, within a Key Figure Structure, include the basic key figureSales Volume EUR two times.

Restrict one of them to all months in 2006 and name it Sales Volume EUR2006.

Restrict the other to December 2006 and name it Sales Volume EURDecember 2006.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 155

Page 170: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Define a new formula that calculates the percentage share of the sales volumefor December 2006 in relation to the sales volume for the whole year 2006 andname it % Share Sales Volume EUR Dec 2006 to 2006

Hint: Remember that you have two ways to define a key figure structure:

1. Drag the desired key figures into the columns where you canEdit them, for example,to create a restricted key figure. The KeyFigures structure will appear automatically.

2. Or:

Select the heading of the Columns area and use the right mousebutton to choose New Structure. Select the structure header and usethe right mouse button to choose New Selection from the contextmenu. The New Selection dialog box appears where you can selectthe desired key figure and restrict it if wanted.

3. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 001

Technical Name: U##_QD_STR001

Now, execute the query.

4. To create a reusable structure, save the characteristic structure U## ComparisonPumps as a global structure with the technical name of U##_STR_CP001.

Task 2: Two Characteristic Structures (Without KeyFigures)You want to create a new query containing two characteristic structures. For one ofthem, the global structure from the preceding task is to be used.

1. Create a new query based on the InfoProvider MutliProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, reuse the global structure U## Comparison Pumps and enhance thestructure - after changing it into a local structure - by adding a formula thatcalculates the percentage share of the Pumps in relation to All Materials. UsePumps % Share of All Materials as the description.

Continued on next page

156 © 2011 SAP AG. All rights reserved. 2011

Page 171: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

2. For the columns, create a second characteristic structure named U##Comparison Countries. The first structure element has to represent thecharacteristic country restricted to Germany, the second structure element allOther Countries.

3. In the report, the key figure Sales Volume EUR has to be shown.

4. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 002

Technical Name: U##_QD_STR002

Now, execute the query.

Task 3: Formula Collision and Cell EditorGenerate a report that represents the sales volumes and incoming orders for the 2half-years of 2006 as well as for the whole year 2006 with percentage changes.

1. Create a new query based on the InfoProvider MultiProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, create a structure with the following description: Half-yearComparison

This structure contains the first and second half-years of 2006 (Description:Half-year 1/2006 and Half-year 2/2006) The structure should alsoinclude the whole year 2006 (Description: Year 2006) as a sum of the twohalf-years.

You define the fourth part as a formula for calculating the percentage variance ofthe two half-years contained in the structure (Description: % Variance ofHalf-years 1 and 2/2006).

2. In the columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders (T_INCORDV). Define a new formula that calculates thepercentage share of the sales volume in relation to incoming orders.

Describe the formula with: Sales Volume % Share of IncomingOrders

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 003

Technical Name: U##_QD_STR003

Now, execute the query.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 157

Page 172: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

4. At the points where the calculated key figure Sales Volume % Share of IncomingOrders in the column crosses both Year 2006 and % Variance of Half-years 1and 2/2006 in the rows, there are formula collisions.

Make the necessary setting to have the desired calculations in the proper way.

5. You need information on the percentage share of the sales volume for both thehalf-years in relation to the whole year. You define a new formula SalesVolume % Share of Sales Volume - Year 2006 that uses thevalue from a particular cell for this calculation. Use the Cell Editor for selectingthe sales volume for year 2006 as a reference cell.

Use the Cell Editor to suppress the cell results at the point were the formulaSales Volume % Share of Sales Volume - Year 2006 in the columns crosses with% Variance of Half-years 1 and 2/2006 in the rows.

158 © 2011 SAP AG. All rights reserved. 2011

Page 173: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Solution 6: Define Structures and work withCellsTask 1: Characteristic Structure (Without Key Figures)and Key Figure Structure (With Key Figures)Generate a report that represents the analysis of sales volumes for the whole year 2006and December 2006 referring to all materials as well as to pumps.

1. Create a new query based on the InfoProvider MutliProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, create a Characteristic structure with the following name:

Description: U## Comparison Pumps

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 159

Page 174: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

This structure contains as the first structure element All Materials and assecond structure element only the Pumps (only materials whose key beginswith P-10*).

a) Open the Query Designer.

b) To create a new query, choose the icon New Query from the toolbar.

c) Choose InfoAreas → Reporting Layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01)→ Open.

d) Right-click in the heading of the Rows area. In the context menu, chooseNew Structure and fill in the description U## Comparison Pumps inthe Properties area.

e) To define the first element of the structure, go to the context menu of theU## Comparison Pumps structure, and chose New Selection. Enter AllMaterials as the description in the Properties area. In the context menuof the All Materials structure element, choose Edit. Under the Materialdimension, choose the Material characteristic and place it in the selectionwindow using Drag & Drop. Choose OK.

f) For the definition of the second structure element, choose New Selectionagain in the context menu for structure U## Comparison Pumps. EnterPumps as the description in the Properties area. In the context menu ofthe Pumps structure element, choose Edit. Under the Material dimension,choose the Material characteristic, and place it in the selection screenusing Drag & Drop.

g) In the context menu for Material, choose Restrict → Show: Single Values.Select the Search link. In the Material (Key) field, enter P-10*. Choosethe Start Search button. Highlight all the found materials and transfer themto the right side by using the Arrow button. Choose OK two times.

2. In the columns, within a Key Figure Structure, include the basic key figureSales Volume EUR two times.

Restrict one of them to all months in 2006 and name it Sales Volume EUR2006.

Restrict the other to December 2006 and name it Sales Volume EURDecember 2006.

Continued on next page

160 © 2011 SAP AG. All rights reserved. 2011

Page 175: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Define a new formula that calculates the percentage share of the sales volumefor December 2006 in relation to the sales volume for the whole year 2006 andname it % Share Sales Volume EUR Dec 2006 to 2006

Hint: Remember that you have two ways to define a key figure structure:

1. Drag the desired key figures into the columns where you canEdit them, for example,to create a restricted key figure. The KeyFigures structure will appear automatically.

2. Or:

Select the heading of the Columns area and use the right mousebutton to choose New Structure. Select the structure header and usethe right mouse button to choose New Selection from the contextmenu. The New Selection dialog box appears where you can selectthe desired key figure and restrict it if wanted.

a) Use Drag & Drop to place the basic key figure Sales Volume EUR(T_INVCD_V) into the Columns area. In the context menu of the selectedkey figure choose Edit.

Under the Time dimension, choose the Cal. year / month characteristic andplace it in the Details of the Selection screen using Drag & Drop.

In the context menu for Cal. year / month, choose Restrict → Show: ValueRange → Between: January 2006 and December 2006. Use the arrowbutton to transfer the restriction to the right side. Choose OK .

In the description area, enter Sales Volume EUR 2006, split in tworows. Choose OK.

b) In the context menu of the key figure Sales Volume EUR 2006, chooseCopy and Paste. Enter the context menu of the new key figure and chooseEdit. Change the description into Sales Volume EUR December2006, split into two lines.

In the context menu for Cal. year / month, choose Restrict → Show: SingleValues and select December 2006. Use the arrow button to transfer therestriction to the right side and use the other arrow button to transfer theJanuary 2006 to December 2006 restriction to the left side. Choose OKtwo times.

Make sure that this key figure is positioned last in the structure.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 161

Page 176: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

c) For the calculation of the percentage share of the sales volume forDecember 2006 in relation to the sales volume of the whole year 2006,choose New Formula in the context menu for the key figure structure. Thenchoose Edit from the context menu of the formula.

Description: % Share Sales Volume EUR Dec 2006 to 2006

d) Use Drag & Drop to place Sales Volume EUR December 2006 into theDetail View area. Under Percentage Functions, choose Percentage Share(%A) and use Drag & Drop to place it into the Formula area. Use Drag &Drop to place Sales Volume EUR 2006 into the Formula field. Choose OK.

Make sure that this key figure is positioned last in the structure.

3. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 001

Technical Name: U##_QD_STR001

Now, execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Choose Save Query :

Description: U## Query Structures 001

Technical Name: U##_QD_STR001

b) Execute the query via Exit and use the query or via Execute.

4. To create a reusable structure, save the characteristic structure U## ComparisonPumps as a global structure with the technical name of U##_STR_CP001.

a) Go back into the Query Designer.

b) In the context menu of the U## Comparison Pumps structure, choose Saveas.... When prompted, enter the technical name U##_STR_CP001 andchoose OK.

c) Note that you now can find the structure as a global structure in theInfoProvider area on the left-hand side of the Query Designer underStructures → Without Key Figures.

Continued on next page

162 © 2011 SAP AG. All rights reserved. 2011

Page 177: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Task 2: Two Characteristic Structures (Without KeyFigures)You want to create a new query containing two characteristic structures. For one ofthem, the global structure from the preceding task is to be used.

1. Create a new query based on the InfoProvider MutliProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, reuse the global structure U## Comparison Pumps and enhance thestructure - after changing it into a local structure - by adding a formula thatcalculates the percentage share of the Pumps in relation to All Materials. UsePumps % Share of All Materials as the description.

a) Define a new query in the Query Designer:

Choose New Query→ InfoAreas → Reporting Layer → Sales andDistribution → MutliProvider - Customer Sales (P_SALES01)→ Open.

b) From the Structures → Without Key Figures folder, transfer the U##Comparison Pumps into the Rows using Drag & Drop.

c) In the context menu of the structure choose Remove Reference.

d) In the context menu of the structure choose New Formula. In the contextmenu of the new formula, choose Edit.

Enter the Description Pumps % Share of All Materials. UseDrag & Drop to place the structure element Pumps into the Detail Viewarea. Under Percentage Functions, choose Percentage Share (%A) and useDrag & Drop to place it into the Formula area. Use Drag & Drop to placeAll Materials into the Formula field. Choose OK.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 163

Page 178: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

2. For the columns, create a second characteristic structure named U##Comparison Countries. The first structure element has to represent thecharacteristic country restricted to Germany, the second structure element allOther Countries.

a) Call up the context menu in the heading of the Columns area. Choose NewStructure and fill in the description U## Comparison Countries inthe Properties area.

b) To define the first element of the structure, go to the context menu of theU## Comparison Countries structure, and chose New Selection. EnterGermany as the description in the Properties area. In the context menuof the Germany structure element, choose Edit. Under the Customerdimension, choose the Country (T_SOLD_TO__0COUNTRY) characteristicand place it in the selection screen using Drag & Drop.

In the context menu for Country, choose Restrict → Show: Single Valuesand select Germany (DE) . Use the Arrow button to transfer the restrictionto the right side . Choose OK two times.

c) For the definition of the second structure element, choose the context menuof the first structure element “Germany”, then Copy and Paste. Enter thecontext menu of the new structure element and choose Edit. Change thedescription into Other Countries.

In the context menu for Country, choose Restrict, select the value forGermany in the right-hand window and then choose Exclude fromSelection. Choose OK two times.

d) Make sure that the Other Countries structure element is last in the structure.

3. In the report, the key figure Sales Volume EUR has to be shown.

a) Use Drag & Drop to place the basic key figure Sales Volume EUR(T_INVCD_V) into the Characteristic Restrictions area on the Filter tab.

4. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 002

Technical Name: U##_QD_STR002

Continued on next page

164 © 2011 SAP AG. All rights reserved. 2011

Page 179: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Now, execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Choose Save Query :

Description: U## Query Structures 002

Technical Name: U##_QD_STR002

b) Execute the query via Exit and use the query or via Execute.

Task 3: Formula Collision and Cell EditorGenerate a report that represents the sales volumes and incoming orders for the 2half-years of 2006 as well as for the whole year 2006 with percentage changes.

1. Create a new query based on the InfoProvider MultiProvider - Customer Sales(P_SALES01) in the Reporting Layer → Sales and Distribution InfoArea.

In the rows, create a structure with the following description: Half-yearComparison

This structure contains the first and second half-years of 2006 (Description:Half-year 1/2006 and Half-year 2/2006) The structure should alsoinclude the whole year 2006 (Description: Year 2006) as a sum of the twohalf-years.

You define the fourth part as a formula for calculating the percentage variance ofthe two half-years contained in the structure (Description: % Variance ofHalf-years 1 and 2/2006).

a) Define a new query in the Query Designer:

Choose New Query→ InfoAreas → Reporting Layer → Sales andDistribution → MutliProvider - Customer Sales (P_SALES01)→ Open.

b) Call up the context menu in the heading of the Rows area. Choose NewStructure and fill in the description Half-year Comparison in theProperties area.

c) To define the first half-year as part of the structure, go to the context menuof the Half-year Comparison structure, and chose New Selection. EnterHalf-Year 1/2006 as the description in the Properties area.

In the context menu of the Half-year 1/2006 structure element, choose Edit.Under the Time dimension, choose the Cal. year / quar characteristic andplace it in the selection screen using Drag & Drop.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 165

Page 180: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

In the context menu for Cal. year / quar, choose Restrict → Show: SingleValues and select 1.2006 and 2.2006. Use the arrow button to transfer therestriction to the right side. Choose OK twice.

d) For the definition of the second half-year as part of the structure, goto the context menu of the Half-year Comparison structure, and choseNew Selection. Enter Half-year 2/2006 as the description in theProperties area. In the context menu of the Half-year 2/2006 structureelement, choose Edit. Under the Time dimension, choose the Cal. year /month characteristic and place it in the selection screen using Drag & Drop.

In the context menu for Cal. year / quar, choose Restrict → Show: SingleValues and select 3.2006 and 4.2006. Use the arrow button to transfer therestriction to the right side. Choose OK twice.

e) For the definition of the two new formulas in the structure, choose NewFormula in the context menu for the structure Half-year Comparison.

Description: Year 2006.

Use Drag & Drop to place Half-year 1/2006 into the Detail View field.Choose the operator + (Plus) and place Half-year 2/2006 into the DetailView field.

Confirm your entries with OK.

f) In the context menu for the structure Half-year Comparison, choose NewFormula. Choose Edit from the context menu of the new formula.

Description: % Variance of Half-years 1 and 2/2006

Use Drag & Drop to place half-year 2/2006 into the Detail View field.Choose the Percentage Variance (%) function. Use Drag & Drop to placeHalf-year 1/2006 into the Detail View field. Choose OK.

2. In the columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders (T_INCORDV). Define a new formula that calculates thepercentage share of the sales volume in relation to incoming orders.

Continued on next page

166 © 2011 SAP AG. All rights reserved. 2011

Page 181: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Describe the formula with: Sales Volume % Share of IncomingOrders

a) Use Drag & Drop to place the basic key figures Sales Volume EUR(T_INVCD_V) and Incoming Orders (T_INCORDV) into the columns.

b) For the calculation of the percentage share of the sales volume in relationto incoming orders, choose New Formula in the context menu for thekey figure structure. Then choose Edit from the context menu of the newformula.

Description: Sales Volume % Share of Incoming Orders

Use Drag & Drop to place Sales Volume EUR (T_INVCD_V) into theDetail View field. Under Percentage Functions, choose Percentage Share(%A) and use Drag & Drop to place it into the Detail View field. Use Drag& Drop to place Incoming Orders EUR (T_INCORDV) into the DetailView field. Choose OK.

c) Make sure that the new formula is positioned last in the key figure structure.

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Structures 003

Technical Name: U##_QD_STR003

Now, execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Choose Save Query :

Description: U## Query Structures 003

Technical Name: U##_QD_STR003

b) Execute the query via Exit and use the query or via Execute.

4. At the points where the calculated key figure Sales Volume % Share of IncomingOrders in the column crosses both Year 2006 and % Variance of Half-years 1and 2/2006 in the rows, there are formula collisions.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 167

Page 182: BW305 BW Query Design and Analysis

Unit 4: Working with Key Figures and Structures in Queries BW305

Make the necessary setting to have the desired calculations in the proper way.

a) Go back to the query definition .

b) In the Properties area for the formula Sales Volume % Share of IncomingOrders, choose Extended → Eliminate Formula Collision → Use Resultsof this Formula.

c) In the Properties area for the formula % Variance of Half-years 1 and2/2006, choose Extended → Eliminate Formula Collision → Use Resultsof this Formula.

d) Execute the query again and check the resulting report.

5. You need information on the percentage share of the sales volume for both thehalf-years in relation to the whole year. You define a new formula SalesVolume % Share of Sales Volume - Year 2006 that uses thevalue from a particular cell for this calculation. Use the Cell Editor for selectingthe sales volume for year 2006 as a reference cell.

Use the Cell Editor to suppress the cell results at the point were the formulaSales Volume % Share of Sales Volume - Year 2006 in the columns crosses with% Variance of Half-years 1 and 2/2006 in the rows.

a) Go back to the query definition.

b) Use the Cells icon to call up the Cell Editor.

c) At the place where the Year 2006 and Sales Volume EUR calculationscross, choose New Cell Reference in the context menu. Go back to theRows/Columns tab page of the Query Designer.

d) For the definition of the percentage share of the sales volume in relationto the sales volume of the year 2006, choose New Formula in the contextmenu for the key figure structure.

Description: Sales Volume % Share of Sales Volume -Year 2006.

Use Drag & Drop to place Sales Volume EUR into the Detail View field.Choose Percentage Share (%A). Place Sales Volume EUR/Year 2006 fromthe Cells section into the Detail View field. Choose OK.

e) Call up the Cell Editor again, and at the intersection of % Variance ofHalf-years 1 and 2/2006 and Sales Volume % Share of Sales Volume - Year2006, choose New Cell Reference in the context menu.

In the Properties area of the cell, choose Display → Always Hide.

f) Execute the query again and check the resulting report.

168 © 2011 SAP AG. All rights reserved. 2011

Page 183: BW305 BW Query Design and Analysis

BW305 Lesson: Defining Structures and Working with Cells

Lesson Summary

You should now be able to:• Define structures• Work with queries containing two structures• Save structures as reusable objects and reuse them• Handle formula collision• Use the cell editor

2011 © 2011 SAP AG. All rights reserved. 169

Page 184: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Explain the objectives and use of restricted key figures in information analyses• Define restricted key figures at the InfoProvider level and at the query level• Explain the use of constant selection• Explain the objectives and use of calculated key figures in information analyses• Define calculated key figures at the InfoProvider level and at the query level• Define a calculated key figure and defining missing objects directly• Using Boolean Operators within calculated key figures• Identify the General, Display, Extended, and Calculations options within the

properties of key figures• Carry out Currency Translation in the Business Explorer• Use the Exception Aggregation to deliver many additional options for analysis• Define structures• Work with queries containing two structures• Save structures as reusable objects and reuse them• Handle formula collision• Use the cell editor

170 © 2011 SAP AG. All rights reserved. 2011

Page 185: BW305 BW Query Design and Analysis
Page 186: BW305 BW Query Design and Analysis
Page 187: BW305 BW Query Design and Analysis

Unit Summary BW305

171 © 2011 SAP AG. All rights reserved. 2011

Page 188: BW305 BW Query Design and Analysis

Unit Summary BW305

172 © 2011 SAP AG. All rights reserved. 2011

Page 189: BW305 BW Query Design and Analysis

Unit 5Working with Characteristics and

Hierarchies in Queries

Unit OverviewThis unit deals with the properties of characteristics and the various options forenhancing reports with additional information in the form of attributes.

To increase the clarity of your reports, hierarchies can be included into the report andstructures be used in conjunction with hierarchies.

This unit also covers creating external hierarchies in SAP NetWeaver BusinessWarehouse. Time-dependent hierarchy structures and linked nodes will be applied.

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe the various properties of characteristics and their use in adjustingreports to your requirements

• Demonstrate the benefit of using attributes to describe characteristics in moredetail

• Describe the difference between using display attributes and navigation attributes• Display characteristics in the rows or columns hierarchically• Include external hierarchies in your reports• Define how the external hierarchy is displayed in the report• Use external hierarchies to make restrictions• Configure a hierarchical display within structures• Combine hierarchies and structures• Define external hierarchies in SAP NetWeaver BW• Create time-dependent hierarchy structures• Use link nodes in the hierarchy definition

2011 © 2011 SAP AG. All rights reserved. 173

Page 190: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Unit ContentsLesson: Configuring Properties of Characteristics and Working WithAttributes ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175

Exercise 7: Configure Properties of Characteristics and Work withAttributes... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183

Lesson: Integrating Hierarchies into Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189Procedure: Including external Hierarchies in Reports .. . . . . . . . . . . . . . . . . . . .192Procedure: Configuring a hierarchical display within structures... . . . . . . .194Exercise 8: Integrate Hierarchies into Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . .197

Lesson: Creating External Hierarchies in SAP NetWeaver BW .... . . . . . . . . . .210Procedure: Creating Hierarchies .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217

174 © 2011 SAP AG. All rights reserved. 2011

Page 191: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

Lesson: Configuring Properties of Characteristics andWorking With Attributes

Lesson OverviewThis lesson deals with the properties of characteristics and the various options forenhancing reports with additional information in the form of attributes.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe the various properties of characteristics and their use in adjustingreports to your requirements

• Demonstrate the benefit of using attributes to describe characteristics in moredetail

• Describe the difference between using display attributes and navigation attributes

Business ExampleReports are often used as the basis for decision-making. To implement measuresresulting from these reports without losing time, it is often necessary to collectadditional information quickly, such as a contact person and the telephone number ofa sold to party or the person responsible for a cost center. Including this informationin your reports in the form of attributes saves valuable time.

Configuring Properties of CharacteristicsThe various components of a query have specific properties that reproduce importantfunctions. You access the properties of a characteristic by simply clicking on thecharacteristic which then brings up the properties in the Properties pane on the rightside of the screen. Make sure the Properties pane is displayed (and not the Tasks pane)by clicking on the tab a the bottom of the screen. The properties are organized withtabs into groups, these are described below.

Hint: Sometimes it is easier to view the properties if you resize the Propertiespane.

It is possible to maintain properties of multiple characteristics simultaneously.Simply highlight all the characteristics you want to include, the properties panewill then display the properties. If there are any conflicts between the different

2011 © 2011 SAP AG. All rights reserved. 175

Page 192: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

characteristics that is, one characteristic uses long description whereas anothercharacteristic uses the medium description then you will see the text Multiple ValuesSelected where the setting would normally appear. In this case you will need to selectthe individual characteristics to see their respective settings.

Figure 46: Properties for Characteristics

You will notice that it is possible to use the default settings from the InfoObjectmetadata by checking the Use default settings box. When you override any standardsettings, this box becomes unchecked to show that the standard settings are not used.You can easily return to the standard settings by rechecking this box.

You can define the following properties for characteristics in the different tabs ofProperties.

176 © 2011 SAP AG. All rights reserved. 2011

Page 193: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

General tabDescription

The text provided in the InfoObject maintenance appears here. You can changethe text and display it in the query.

Note: It is also possible to edit the description “in-line” using thestandard Microsoft Windows feature. This means you are able to changethe description directly on the characteristic by simply clicking onceon the characteristic. The cursor becomes positioned at the start of thedescription ready for you to start editing.

Display tabDisplay As

This is where you determine how characteristic values display, as long as thevalues were created in the InfoObject maintenance for the characteristic:

No DisplayKey and TextTextKeyText and Key

Text ViewIf you choose to display Text, Text and Key or Key and Text in Display As above,then Text View is where you choose the length of the text required. Rememberthere could be up to three different lengths available: Short-, Medium- andLong-Length Text.

SortingYou can make settings for sorting within the characteristic. You can use thefollowing:

The characteristic itself, sorted by Key or TextAll attributes of the characteristic sorted by Key or Text

The sort sequence is either Ascending or Descending.

Hint: No need to use the attribute that you have selected for sorting inthe display.

2011 © 2011 SAP AG. All rights reserved. 177

Page 194: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Results Rows

• Always Display

Result for this characteristic are always displayed.

• Display if More than One value

The result will only be displayed if there is more than one value, that is,only when there is something to total!

• Always suppress

Result for this characteristic are never displayed.

Display LevelThis setting corresponds with the setting in the InfoFieldweb item within the BExWeb Application Designer to decide whether a static filter on the characteristicshould appear in the list of static filters in the web application or not.

• In Simple overview• In Normal overview• Only in Detail Overview

Hierarchy tabHierarchy settings

For the hierarchical display of the values of a characteristic you can make thenecessary settings on the Hierarchy tab, for example, which hierarchy should beused and to which level the hierarchy should be initially expanded.

Planning tabPlanning on Hierarchy Nodes

Here you make the settings for planning the characteristic on hierarchy nodeswithin BW Integrated Planning.

178 © 2011 SAP AG. All rights reserved. 2011

Page 195: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

Extended tabAccess Type for Result Values

You can restrict the display of query result values:

• Posted Values: The Use Characteristic Setting indicator refers exclusivelyto Posted Values. You cannot specify the default value in InfoObjectmaintenance.

• Characteristic Relationships: For more information about this access type,see Form-Based Planning.

• Master Data: All characteristic values from the master data are displayed,independent of transaction data. With this access type, you can easilycreate a “List of Slow-Moving Items”, for example.

Filter Value Selection at Query ExecutionYou can specify how filter values are to be selected for query execution:

• Only Posted Values for Navigation• Only Values in InfoProvider• Values in Master Data Table• Characteristic Relationships

Attributes (Display and Navigation)Characteristics can be described in more detail through attributes. For example, youcan assign the attribute Telephone Number to the characteristic Sold to party to displaythe telephone number of the sold to party.

You assign attributes to characteristics in the InfoObject maintenance. You canmaintain them as purely Display Attributes or as Navigation Attributes wherebynavigation attributes are simultaneously also display attributes.

You can show Display Attributes in a report in the drilldown. However, navigationsteps are not possible. (For example, you cannot choose values from a displayattribute as a filter.)

To include a display attribute in the drilldown, open the folder for the characteristicwithin the InfoProvider tree. Once in the Attributes folder, drag the required attributeinto the query definition, you must drop it directly over the characteristic (thecharacteristic must first be dragged into the query definition!).

In the Properties for a specific attribute for a characteristic, you can set the displayfunctions as key, name, and so on. You can also change the name to suit yourrequirements.

2011 © 2011 SAP AG. All rights reserved. 179

Page 196: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

You can use Navigation Attributes for defining queries in reporting in the sameway as characteristics. They always display in the dimension of the characteristic towhich they belong.

Figure 47: Navigation and Display Attributes in the Query Designer

To use an attribute as a navigation attribute, note the following:

1. You have to flag the attribute as a navigation attribute in the InfoObjectmaintenance of the characteristic.

2. You have to select that attribute from the list of possible navigation attributes inInfoCube maintenance.

Note the following when using navigation attributes:

• Navigation attributes appear as characteristics in the query design.• Very slight loss in query performance when compared to characteristics. This

can be rectified using aggregates.

180 © 2011 SAP AG. All rights reserved. 2011

Page 197: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

Note the following when using time-dependent attributes:

• Time-dependent attributes enable you to view current transactional data withattribute values from the past. Which time-dependent values of the attribute dataare applied for the report depends on the Key Date of the query definition.

2011 © 2011 SAP AG. All rights reserved. 181

Page 198: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

182 © 2011 SAP AG. All rights reserved. 2011

Page 199: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

Exercise 7: Configure Properties ofCharacteristics and Work with Attributes

Exercise ObjectivesAfter completing this exercise, you will be able to:• Make settings for the various functions of characteristic properties to structure

your reports• Use display attributes to describe characteristics in more detail

Business ExampleTo make decisions based on your reports without losing valuable time, you canintegrate additional information, such as the telephone number of a sold-to party,into your reports.

To structure your reports more clearly, you can specify whether the results rowsdisplay for each characteristic.

Using navigation attributes, you can enable the users of your report to filter the reportto the additional information.

Task:Define a report that displays the sold-to parties, their materials, the relevant salesrevenues, and the costs for the first two quarters of the year 2006.

Display the location, region, and telephone number for the sold-to parties as additionalinformation. Make the necessary settings so that you can select data based on countryand postal code later.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

In the columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Sales Volume (0INVCD_VAL).

In the rows, include the Sold to Party (T_SOLD_TO) andMaterial (0MATERIAL)characteristics.

Restrict the data to the first two quarters of the year 2006 and enable navigationusing both of these quarters.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 183

Page 200: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

2. For additional information of the sold-to party, include the attributes location,region, and telephone number in your report. For the region, define that only thetext is to be displayed.

3. Determine properties for the characteristics in the query definition. Changethe name Sold to Party to Customer.

Display only the name of the Sold to party and sort the values alphabetically indescending order by the attribute Location.

To structure the report clearly, specify that the results rows do not display forCal. year / quar (0CALQUARTER) when the quarter is included in the drilldown.

4. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Characteristics 001

Technical Name: U##_QD_CHA001

Now execute the query.

5. In the executed report: is it already possible to filter the report by Region and toposition Region at the beginning of the report?

__________________________________________________________________

6. What do you have to do to be able to filter the executed report by Region and toposition Region at the beginning of the report?

184 © 2011 SAP AG. All rights reserved. 2011

Page 201: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

Solution 7: Configure Properties ofCharacteristics and Work with AttributesTask:Define a report that displays the sold-to parties, their materials, the relevant salesrevenues, and the costs for the first two quarters of the year 2006.

Display the location, region, and telephone number for the sold-to parties as additionalinformation. Make the necessary settings so that you can select data based on countryand postal code later.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

In the columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Sales Volume (0INVCD_VAL).

In the rows, include the Sold to Party (T_SOLD_TO) andMaterial (0MATERIAL)characteristics.

Restrict the data to the first two quarters of the year 2006 and enable navigationusing both of these quarters.

a) To define a new query, open the Query Designer.

b) Choose New Query→ InfoAreas → Reporting Layer → Sales andDistribution → MultiProvider - Customer Sales (P_SALES01) → Open.

c) Use Drag & Drop to transfer the basic key figures Sales Volume EUR(T_INVCD_V) and Sales Volume (0INVCD_VAL) into the columns.

d) For the characteristics, choose:

Dimensions → Customer → Sold to Party (T_SOLD_TO) and use Drag &Drop to transfer it into the Rows.

Dimensions → Material → Material (0MATERIAL) and use Drag & Dropto transfer it into the Rows.

Dimensions→ Time → Cal. year / quar (0CALQUARTER) and use Drag &Drop to transfer it into the Free Characteristics.

Go to Default Values on the Filter tab page. Choose, from the context menufor Cal. year / quar→ Restrict → Show: Single Values, select 1.2006 and2.2006, and transfer your selection using the arrow button. Choose OK.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 185

Page 202: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

2. For additional information of the sold-to party, include the attributes location,region, and telephone number in your report. For the region, define that only thetext is to be displayed.

a) To include display attributes in the definition, from the Attributes folderunder the Sold to party characteristic transfer the required attributesLocation (0CITY), Region (0REGION), and Telephone 1 (0PHONE) to therows under Sold to party.

b) In the Properties area for the attribute Region: Value Display → Displayas → Text.

3. Determine properties for the characteristics in the query definition. Changethe name Sold to Party to Customer.

Display only the name of the Sold to party and sort the values alphabetically indescending order by the attribute Location.

To structure the report clearly, specify that the results rows do not display forCal. year / quar (0CALQUARTER) when the quarter is included in the drilldown.

a) In the Properties area for the characteristic Sold to Party (T_SOLD_TO):

General → Description, change the name to Customer

Display → Value Display → Display as → Text

Display → Sorting→ Sort characteristic, choose Location, to define Sortby, choose Key, and to define the Sort Direction, choose Descending.

b) To hide the results rows for the Cal. year / quar characteristic, choose fromthe Properties area for this characteristic:

Display → Results Rows → Always Suppress

4. Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Characteristics 001

Technical Name: U##_QD_CHA001

Now execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Choose Save and use:

Description: U## Query Characteristics 001

Technical Name: U##_QD_CHA001

b) Execute the query via Exit and use the query or via Execute.Continued on next page

186 © 2011 SAP AG. All rights reserved. 2011

Page 203: BW305 BW Query Design and Analysis

BW305 Lesson: Configuring Properties of Characteristics and Working With Attributes

5. In the executed report: is it already possible to filter the report by Region and toposition Region at the beginning of the report?

__________________________________________________________________

a) It is not possible neither to filter by a display attribute nor to drill down bya display attribute!

6. What do you have to do to be able to filter the executed report by Region and toposition Region at the beginning of the report?

a) Go back into the query definition.

b) From the Customer dimension, transfer the navigational attributeRegion (T_SOLD_TO__0REGION) using Drag & Drop into the FreeCharacteristics.

Caution: Make sure the technical names display.

c) Execute the query again.

d) You are now able to filter and to drill down by the navigational attributeRegion (T_SOLD_TO__0REGION).

2011 © 2011 SAP AG. All rights reserved. 187

Page 204: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Lesson Summary

You should now be able to:• Describe the various properties of characteristics and their use in adjusting

reports to your requirements• Demonstrate the benefit of using attributes to describe characteristics in more

detail• Describe the difference between using display attributes and navigation attributes

188 © 2011 SAP AG. All rights reserved. 2011

Page 205: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Lesson: Integrating Hierarchies into Reports

Lesson OverviewThis lesson deals with integrating hierarchies into reports and using structures inconjunction with hierarchies.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Display characteristics in the rows or columns hierarchically• Include external hierarchies in your reports• Define how the external hierarchy is displayed in the report• Use external hierarchies to make restrictions• Configure a hierarchical display within structures• Combine hierarchies and structures

Business ExampleYou can increase the clarity of your reports by arranging several characteristics andkey figures hierarchically in your reports. To analyze the characteristics values of, forexample, a cost center or a material, external hierarchies are often used. It may also benecessary to combine structures with hierarchies for presentation in the report. It isalso possible to use hierarchies to make some restrictions.

Hierarchy Options in a Query

1. You can display the characteristics in the rows or in the columns as a hierarchy.2. You can select an external hierarchy for a characteristic in the query definition.3. You can define how the hierarchy is displayed in the report.4. You can use external hierarchies to make restrictions.5. You can configure a hierarchical display within structures.6. You can combine hierarchies and structures.

2011 © 2011 SAP AG. All rights reserved. 189

Page 206: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Displaying Characteristics in the rows or columnshierarchicallyCharacteristics can be displayed in rows or columns as hierarchies by activatingDisplay as Hierarchy in the tab General from the properties of the Rows or Columnsheader.

The only prerequisite is that there are more than one characteristic in the rowsrespectively in the columns.

Figure 48: Hierarchical Positioning of Characteristics

Including external Hierarchies in your ReportsExternal hierarchies are used in analyses to describe alternative views of the data.External hierarchies can be loaded from the source systems by either using predefinedBW Content data flows or the flat file interface. Alternatively, they can be createddirectly in BW.

External Hierarchies comprise a series of nodes that are joined to one another in a treestructure. Usually, the leaves of a hierarchy are represented by characteristic values.

The term “External” hierarchy does not reflect the fact that such a hierarchy isnormally loaded from an external source system but reflects the fact that the hierarchydates (independent of being loaded or being created in BW directly) are master data

190 © 2011 SAP AG. All rights reserved. 2011

Page 207: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

belonging to a characteristic and are not part of the InfoProvider (InfoCube, DSO,MultiProvider, and so on) on which your query bases. Thus, “External” is in terms ofnot being part of the InfoProvider.

• You create external hierarchies for basic characteristics, for example, Material(0MATERIAL).

• You determine whether a characteristic can have a hierarchy in the InfoObjectmaintenance. This is also where you define the properties of the permittedhierarchies (for example, hierarchy versions, time-dependent hierarchystructures).

• External hierarchies are saved in special master data tables. They behave likemaster data and therefore, you can use and modify them in all InfoCubes.

• You can define several external hierarchies for a characteristic.

Figure 49: External Hierarchies in Queries

2011 © 2011 SAP AG. All rights reserved. 191

Page 208: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Including external Hierarchies in Reports

1. Click on the characteristic that you want to present in a hierarchy so that theProperties are displayed.

2. In the Properties pane, select the Hierarchy tab.

3. Press the button adjacent to the Selected Hierarchy box and choose a hierarchyfrom the list, make the other settings to fine tune the presentation of the hierarchy.

Configuring Properties of an external Hierarchy inReportsEach hierarchy has the properties that were determined in the hierarchy definition. Youcan override the following hierarchy properties in the query definition for a hierarchy.

Expand to LevelTo determine the hierarchy level to which the hierarchy is expanded in the report.

Position of Lower Level NodesChoose whether the subordinate nodes are positioned above or below a superiornode.

Values of Posted NodesChoose whether you want to Always Show or Hide the values of posted nodes.

Nodes with Only One Lower-Level NodeChoose whether you want to Always Show or Hide nodes with only one lowerlevel node.

SortingWithin the hierarchy, you can sort in Descending or Ascending order by Keyor Text.You cannot sort in Descending or Ascending order if you choose Sort by Asin the Hierarchy.

• Expand to Level• Position of Lower Level Nodes• Values of Posted Nodes• Nodes with Only One Lower-Level Node• Sorting

192 © 2011 SAP AG. All rights reserved. 2011

Page 209: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Using External Hierarchies to Make RestrictionsYou can use hierarchies to select filter values for characteristics by selecting individualhierarchy nodes.

If you restrict the characteristic to one hierarchy node, the node hierarchy isautomatically taken as the display hierarchy. However, you can switch the displayhierarchy to not active.

To restrict a characteristic to a hierarchy node, from the dialog box, select Restrict andthen the hierarchy. Select the required hierarchy node and confirm with OK.

Displaying Structures hierarchicallyYou can configure a hierarchical display within structures (can be key figure structuresor characteristic structures)

Figure 50: Structure Display

2011 © 2011 SAP AG. All rights reserved. 193

Page 210: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Configuring a hierarchical display within structures

1. Within the structure, copy those structure members, which you want to displayas sub items, using drag and drop onto that structure member, which you wantto display as node for the sub items.

2. Then you can decide via Properties → Display tab → Status of Node for thenode structure member whether the node should be displayed Expanded orCollapsed in the initial view of the report.

3. In the executed report, by clicking on the Expand / Collapse button you can thenexpand or collapse the node.

4.

Combining Hierarchies and Structures

Figure 51: Hierarchies and Structures

You can combine hierarchies and structures in the display so that you can choose todisplay the elements in the rows / columns in nonhierarchical form (example A) andhierarchical form (example B).

194 © 2011 SAP AG. All rights reserved. 2011

Page 211: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

In the screenshot above the KeyFigures structure, which itself carries a hierarchicaldisplay is integrated into the rows whereby for Material an external hierarchy isassigned.

A:Rows → Properties → Display as Hierarchy: not active

B:Rows → Properties → Display as Hierarchy: active

2011 © 2011 SAP AG. All rights reserved. 195

Page 212: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

196 © 2011 SAP AG. All rights reserved. 2011

Page 213: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Exercise 8: Integrate Hierarchies intoReports

Exercise ObjectivesAfter completing this exercise, you will be able to:• Display characteristics in the rows or columns hierarchically• Include external hierarchies in your reports• Define how the external hierarchy is displayed in the report• Use external hierarchies to make restrictions• Configure a hierarchical display within structures• Combine hierarchies and structures

Business ExampleYou can increase the clarity of your reports by arranging several characteristicshierarchically within the reports. You want to use an external hierarchy for thecharacteristic material and make restrictions using this external hierarchy. You needto combine a hierarchically displayed key figure structure with this hierarchy foruse in this analysis.

Task 1:You want to display an overview of specific sales volumes and incoming orders for thedivisions and the distribution channels within individual sales organizations in yourreport. To structure the report clearly, display the characteristics Sales Organization ,Division, and Distribution Channel as a hierarchy.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

In the Columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders EUR (T_INCORDV).

Transfer the characteristics Sales Organization (0SALESORG), Division(0DIVISION) and Distribution Channel (0DISTR_CHAN) to the Rows in thatsequence.

Enable navigation by month in the report using Cal. year / month(0CALMONTH) in the Free Characteristics area.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 197

Page 214: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

2. Display the characteristics in the Rows as a hierarchy. The initial view should beexpanded to the Sales Organization.

Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 001

Technical name: U##_QD_HIER001

Now execute the query.

Task 2:In another report, you want to display the materials with their sales volumes andincoming orders as a hierarchy (Product Hierarchy for Material MARA (PRDHA)).You also want to see the sales volumes and incoming orders for specific customersand display these with the relevant materials.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

In the Columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders EUR (T_INCORDV).

Transfer the Material (0MATERIAL) characteristic into the Rows.

Enable navigation in the report by month, for the months January 2006 to March2006.

2. Display the material as a hierarchy using the Product Hierarchy for MaterialMARA (PRDHA).

For the report display, specify that the hierarchy is sorted by text and indescending order.

Make the relevant settings so that when the query is executed, the hierarchy isexpanded to level four, and the lower-level nodes are positioned below (Down)the upper-level nodes.

Display the values of posted nodes and don't suppress the nodes with only onevalue.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 002

Technical name: U##_QD_HIER002

Now execute the query and view the results.

Continued on next page

198 © 2011 SAP AG. All rights reserved. 2011

Page 215: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

3. Open the query definition and Drag & Drop the Sold to party characteristic intothe Rows below the characteristic Material.

Display the Rows as a hierarchy, the initial view should be expanded to theMaterial.

Save the query and then execute it again.

In the report, expand the hierarchy nodes to customer level and include theselected month in the horizontal drilldown.

Task 3:To analyze sales volumes and profits that you have reached with your materials in thefirst and second quarters of the year 2006, you want to combine a display hierarchywith a structure.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

Transfer the characteristic Material (0MATERIAL) into the Rows.

Display the material as a hierarchy using the Product Hierarchy for MaterialMARA hierarchy.

2. Create a key figure structure in the Rows that contains Sales Volume EUR(T_INVCD_V) and Incoming Orders EUR (T_INCORDV).

Create a formula, Deviation for that structure that calculates the differencebetween the Sales Volume EUR (T_INVCD_V) and the Incoming Orders EUR(T_INCORDV).

Display Sales Volume EUR (T_INVCD_V) and Incoming Orders EUR(T_INCORDV) as sub-items of the calculated key figure Deviation .

The key figure structure is to be positioned under the Material characteristic.

3. As an additional characteristic, transfer Cal. year / quar (0CALQUARTER)using Drag & Drop into the Rows below the key figure structure. Restrict thecharacteristic to the first and second quarters of 2006.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 003

Technical name: U##_QD_HIER003

Now execute the query, and view the results by navigation through the differenthierarchy types.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 199

Page 216: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Task 4:You want to compare the various display formats for the report that you have justcreated. Copy the query that you defined and choose the hierarchical display forthe Rows.

Then drag the key figure structure into the columns, and finally select the nodeVehicles for Material.

1. Save the query U## Query Hierarchy 003 under the new name

Description: U## Query Hierarchy 004

Technical name: U##_QD_HIER004

In the new query definition, display the Rows hierarchically.

Restrict the material to the node Vehicles.

Save the query and execute it. Compare the appearance of the two displayformats.

2. To optimize the appearance of the report, position the key figure structure intothe columns.

Finally select the node Vehicles for Material.

200 © 2011 SAP AG. All rights reserved. 2011

Page 217: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Solution 8: Integrate Hierarchies intoReportsTask 1:You want to display an overview of specific sales volumes and incoming orders for thedivisions and the distribution channels within individual sales organizations in yourreport. To structure the report clearly, display the characteristics Sales Organization ,Division, and Distribution Channel as a hierarchy.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

In the Columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders EUR (T_INCORDV).

Transfer the characteristics Sales Organization (0SALESORG), Division(0DIVISION) and Distribution Channel (0DISTR_CHAN) to the Rows in thatsequence.

Enable navigation by month in the report using Cal. year / month(0CALMONTH) in the Free Characteristics area.

a) To define a new query, open the Query Designer.

b) Choose New Query→ InfoAreas → Reporting Layer → Sales andDistribution → MultiProvider - Customer Sales (P_SALES01) → Open.

c) Use Drag & Drop to transfer the basic key figures Sales Volume EUR(T_INVCD_V) and Incoming Orders EUR (T_INCORDV) into the Columns.

d) For the characteristics, choose:

Dimensions → Sales area data → Sales Organization (0SALESORG) anduse Drag & Drop to transfer it into the Rows.

Dimensions → Sales area data → Division (0DIVISION) and use Drag &Drop to transfer it into the Rows.

Dimensions → Sales area data → Distribution Channel (0DISTR_CHAN)and use Drag & Drop to transfer it into the Rows.

Dimensions → Time → Cal. year / month (0CALMONTH) and use Drag &Drop to transfer it into the Free Characteristics.

2. Display the characteristics in the Rows as a hierarchy. The initial view should beexpanded to the Sales Organization.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 201

Page 218: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Finally, save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 001

Technical name: U##_QD_HIER001

Now execute the query.

a) For the Row header, in the Properties → General → Display as Hierarchyarea, check the box for Active, and Expand To → Sales Organization.

b) To save the query, choose Save Query and save it under Roles → Role##(U##_Role) → Queries :

Choose Save and use:

Description: U## Query Hierarchy 001

Technical name: U##_QD_HIER001

c) Execute the query and view the results.

Task 2:In another report, you want to display the materials with their sales volumes andincoming orders as a hierarchy (Product Hierarchy for Material MARA (PRDHA)).You also want to see the sales volumes and incoming orders for specific customersand display these with the relevant materials.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

In the Columns, include the basic key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders EUR (T_INCORDV).

Transfer the Material (0MATERIAL) characteristic into the Rows.

Continued on next page

202 © 2011 SAP AG. All rights reserved. 2011

Page 219: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Enable navigation in the report by month, for the months January 2006 to March2006.

a) To define a new query, open the Query Designer.

b) Choose New Query → InfoAreas → Reporting Layer → Sales andDistribution → MultiProvider - Customer Sales (P_SALES01) → Open.

c) Use Drag & Drop to transfer the basic key figures Sales Volume EUR(T_INVCD_V) and Incoming Orders EUR (T_INCORDV) into the Columns.

d) For the characteristics, choose:

Dimensions → Material → Material (0MATERIAL) and use Drag & Dropto transfer it into the Rows.

Dimensions → Time → Cal. year / month (0CALMONTH) and use Drag &Drop to transfer it into the Free Characteristics.

Go to Default Values on the Filter tab page. Choose, from the contextmenu for Cal. year / month→ Restrict → Show: Single Values, select1.2006, 2.2006 and 3.2006, and transfer your selection using the arrowbutton. Choose OK.

2. Display the material as a hierarchy using the Product Hierarchy for MaterialMARA (PRDHA).

For the report display, specify that the hierarchy is sorted by text and indescending order.

Make the relevant settings so that when the query is executed, the hierarchy isexpanded to level four, and the lower-level nodes are positioned below (Down)the upper-level nodes.

Display the values of posted nodes and don't suppress the nodes with only onevalue.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 002

Technical name: U##_QD_HIER002

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 203

Page 220: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Now execute the query and view the results.

a) In the Properties area for the characteristicMaterial (0MATERIAL), choosethe Hierarchy tab page.

Selected Hierarchy: Product Hierarchy for Material MARA (PRDHA).

Expand to Level : 4.

Position of Lower-Level Nodes: Below.

Values of Posted Nodes: Always Show.

Nodes with Only One Lower-Level Node: Always Show.

Sorting: Sort by → Text and Sort Direction → Descending.

b) To save the query, choose Save Query and save it under Roles → Role##(U##_Role) → Queries :

Choose Save and use:

Description: U## Query Hierarchy 002

Technical name: U##_QD_HIER002

c) Execute the query and view the results.

3. Open the query definition and Drag & Drop the Sold to party characteristic intothe Rows below the characteristic Material.

Display the Rows as a hierarchy, the initial view should be expanded to theMaterial.

Save the query and then execute it again.

In the report, expand the hierarchy nodes to customer level and include theselected month in the horizontal drilldown.

a) From the BEx Analyzer, choose Tools → Edit Query. In the querydefinition choose:

Dimensions → Customer → Sold to party (T_SOLD_TO) and Drag & Dropit into the Rows area below the characteristic Material .

b) For the Row header, in the Properties → General → Display as Hierarchyarea, check the box for Active. and Expand To → Material.

c) Save the query and then execute it again.

d) Drill across using the Cal. year / month characteristic.

Continued on next page

204 © 2011 SAP AG. All rights reserved. 2011

Page 221: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Task 3:To analyze sales volumes and profits that you have reached with your materials in thefirst and second quarters of the year 2006, you want to combine a display hierarchywith a structure.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

Transfer the characteristic Material (0MATERIAL) into the Rows.

Display the material as a hierarchy using the Product Hierarchy for MaterialMARA hierarchy.

a) To define a new query, open the Query Designer.

b) Choose New Query → InfoAreas → Reporting Layer → Sales andDistribution → MultiProvider - Customer Sales (P_SALES01) → Open.

c) Choose Dimensions → Material → Material (0MATERIAL) and use Drag& Drop to transfer it into the Rows.

d) In the Properties area for the characteristicMaterial (0MATERIAL), choosethe Hierarchy tab page.

Selected Hierarchy: Product Hierarchy for Material MARA (PRDHA).

2. Create a key figure structure in the Rows that contains Sales Volume EUR(T_INVCD_V) and Incoming Orders EUR (T_INCORDV).

Create a formula, Deviation for that structure that calculates the differencebetween the Sales Volume EUR (T_INVCD_V) and the Incoming Orders EUR(T_INCORDV).

Display Sales Volume EUR (T_INVCD_V) and Incoming Orders EUR(T_INCORDV) as sub-items of the calculated key figure Deviation .

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 205

Page 222: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

The key figure structure is to be positioned under the Material characteristic.

a) Use Drag & Drop to move the key figures Sales Volume EUR (T_INVCD_V)and Incoming Orders EUR (T_INCORDV) into the Rows area under theMaterial characteristic, the key figure structure is created automatically.

b) To define the new formula Deviation in the key figure structure, choose:

Context menu of structure → New Formula

Enter the Description Deviation.

Choose Edit.

c) Use Drag & Drop to transfer Sales Volume EUR (T_INVCD_V) → Minus→ Incoming Orders EUR (T_INCORDV) into the Detail View field, andchoose OK.

d) Use Drag & Drop to transfer the calculated key figure Deviation to thefirst place in the key figure structure.

Drag both Sales Volume EUR and Incoming Orders EUR onto thecalculated key figure Deviation in order to display them as sub-items.

3. As an additional characteristic, transfer Cal. year / quar (0CALQUARTER)using Drag & Drop into the Rows below the key figure structure. Restrict thecharacteristic to the first and second quarters of 2006.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy 003

Technical name: U##_QD_HIER003

Continued on next page

206 © 2011 SAP AG. All rights reserved. 2011

Page 223: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Now execute the query, and view the results by navigation through the differenthierarchy types.

a) Dimensions → Time → Cal. year / quar (0CALQUARTER) and use Drag& Drop to transfer it into the Rows below the key figure structure.

b) Restrict Cal. year / quar (0CALQUARTER) to the single values 1.2006and 2.2006.

c) To save the query, choose Save Query and save it under Roles → Role##(U##_Role) → Queries :

Choose Save and use:

Description: U## Query Hierarchy 003

Technical name: U##_QD_HIER003

d) Execute the query, and view the results by navigation through the differenthierarchy types.

Task 4:You want to compare the various display formats for the report that you have justcreated. Copy the query that you defined and choose the hierarchical display forthe Rows.

Then drag the key figure structure into the columns, and finally select the nodeVehicles for Material.

1. Save the query U## Query Hierarchy 003 under the new name

Description: U## Query Hierarchy 004

Technical name: U##_QD_HIER004

In the new query definition, display the Rows hierarchically.

Restrict the material to the node Vehicles.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 207

Page 224: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Save the query and execute it. Compare the appearance of the two displayformats.

a) Go back to the query definition U## Query Hierarchy 003 and chooseQuery → Save As.

Description: U## Query Hierarchy 004

Technical name: U##_QD_HIER004

b) For the Row header, in the Properties → General → Display as Hierarchyarea, check the box for Active.

c) Save the query and execute it and compare the appearance of the twodisplay formats.

2. To optimize the appearance of the report, position the key figure structure intothe columns.

Finally select the node Vehicles for Material.

a) Go back into the query definition and Drag and drop the key figure structurefrom the Rows into the Columns.

b) To restrict the hierarchy to the node Vehicles, go to Default Values on theFilter tab page. From the context menu for Material → Restrict → Show:Single Values → Product Hierarchy , select the node Vehicles, and transferyour selection using the arrow button. Choose OK.

Save and execute the query again.

208 © 2011 SAP AG. All rights reserved. 2011

Page 225: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Hierarchies into Reports

Lesson Summary

You should now be able to:• Display characteristics in the rows or columns hierarchically• Include external hierarchies in your reports• Define how the external hierarchy is displayed in the report• Use external hierarchies to make restrictions• Configure a hierarchical display within structures• Combine hierarchies and structures

2011 © 2011 SAP AG. All rights reserved. 209

Page 226: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Lesson: Creating External Hierarchies in SAP NetWeaverBW

Lesson OverviewThis lessons covers creating external hierarchies in SAP NetWeaver BW. It alsodeals with time-dependent hierarchy structures and linked nodes for use in creatinghierarchies.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Define external hierarchies in SAP NetWeaver BW• Create time-dependent hierarchy structures• Use link nodes in the hierarchy definition

Business ExampleExternal hierarchies are used in analysis to describe alternative views of the data.External hierarchies can be loaded from the source systems by either using predefinedBW Content data flows or the flat file interface. Alternatively, they can be createddirectly in BW.

The hierarchy structures that you require are time-dependent so that they can portraitrestructuring in reports.

Hierarchy ComponentsNodesA hierarchy is made up of nodes. The relationship between the nodes is defined asfollows:

• The uppermost node is the root.• Each node (except for the uppermost node) is assigned to one super-ordinate

node.• There is a distinction between postable and not postable nodes.

210 © 2011 SAP AG. All rights reserved. 2011

Page 227: BW305 BW Query Design and Analysis

BW305 Lesson: Creating External Hierarchies in SAP NetWeaver BW

Hierarchy LevelsAll nodes that are on the same level in a hierarchy (nodes that are the same distanceaway from the root) form a hierarchy level. The root of a hierarchy forms the firstlevel. The level of a node denotes the distance of the node from the root.

LeavesHierarchy leaves contain the characteristic values for the basic characteristic and cantherefore have entries in the fact table. In contrast to postable nodes, a leaf cannothave any subordinate nodes.

IntervalsIntervals contain a number of leaves that belong together, described by their upper andlower limits. You can create them for a node that has more than one leaf. By definingintervals, new characteristic values that are added to the master data automaticallybecome assigned to the interval if the characteristic value is included in the intervalrange.

Basic CharacteristicYou can create hierarchies only for those characteristics that do not relate to anothercharacteristic.

2011 © 2011 SAP AG. All rights reserved. 211

Page 228: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Creating Hierarchies

Figure 52: Creating Hierarchies 1

As a prerequisite for creating hierarchies, in the InfoObject maintenance for thecharacteristic concerned, you have to set the With Hierarchies indicator, which statesthat the characteristic can have hierarchies. You also have to determine whether thehierarchy or hierarchy structure can be time-dependent, or whether versions can becreated for it.

212 © 2011 SAP AG. All rights reserved. 2011

Page 229: BW305 BW Query Design and Analysis

BW305 Lesson: Creating External Hierarchies in SAP NetWeaver BW

Figure 53: Creating Hierarchies 2

Hierarchy nodes or leaves can appear several times under different super-ordinatenodes.

You can then either set the nodes as link nodes or make the hierarchy structuretime-dependent and specify that the time intervals of all duplicate nodes with thesame technical key do not overlap.

Link Nodes

You use link nodes to include a sub tree in a hierarchy more than once. The name,the InfoObject and, if necessary, the from/to date fields of the nodes are identical.However, the link node is only a link to the original node that you cannot changeindependently. Link nodes cannot have their own lower-level nodes. They take onthe lower-level nodes of the original node. These lower-level nodes do not displayin the hierarchy maintenance.

Hierarchy Properties on InfoObject LevelHierarchy settings must be defined for the characteristic on which it is based. It isimportant that you are familiar with these settings before you define a new hierarchystructure as the settings may limit what you are able to achieve. The settings are partof the metadata for the characteristic and so you access these from the InfoObjectmaintenance screen (use RSA1 or RSD1) and then navigate to the Hierarchy tab.

2011 © 2011 SAP AG. All rights reserved. 213

Page 230: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Figure 54: Hierarchy Properties set in the InfoObject definition

214 © 2011 SAP AG. All rights reserved. 2011

Page 231: BW305 BW Query Design and Analysis

BW305 Lesson: Creating External Hierarchies in SAP NetWeaver BW

The settings are:

• Hierarchies, version-dependent

Check this box if you want to maintain different versions of the hierarchies.When you define each hierarchy, you will need to supply a version identifier.This means whenever you select hierarchies in a query you are able to choosefrom the available versions.

• Hierarchy not time-dependent

Select this radio button if you don't need to store the changes to the structureover time.

• Entire hierarchy is time-dependent

Select this radio button if you want to define hierarchy structures in relation totime intervals. When you develop a query, which uses the hierarchy you can alsoselect the hierarchy valid for a specific date.

• Time-dependent hierarchy structure

Select this radio button if you want to be able to define the individual nodes inrelation to time intervals. When you develop a query, which uses the hierarchyyou can also select the hierarchy nodes valid for a specific date.

• Use Temporal Hierarchy Join

If members appear in more than one node over a time period (that is, a person isreassigned to a new team) then a check in this box will ensure you are able toreport on these movements in the same result.

• Intervals Permitted in Hierarchy

Sometimes it is more efficient to use intervals to specify the members of thehierarchy nodes. That is, cost centers 1000 to 1999 = New Hire Costs, ratherthan defining members individually (much work and ongoing maintenance). Anynew cost centers you later add within the range will automatically be includedin the hierarchy.

• Reverse +/- Sign for the Node

Check this box if it makes sense to present the key figures with the sign reversed.This is purely a presentation feature and does not alter the actual value of thekey figure.

2011 © 2011 SAP AG. All rights reserved. 215

Page 232: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Make sure you have maintained each valid characteristic you want to use to representnodes as external characteristics. For example, for a material hierarchy you maychoose material group or material type as external characteristics. When you aredeveloping the hierarchy structure only these characteristics will appear in the list ofvalid choices for characteristic nodes.

216 © 2011 SAP AG. All rights reserved. 2011

Page 233: BW305 BW Query Design and Analysis

BW305 Lesson: Creating External Hierarchies in SAP NetWeaver BW

Creating Hierarchies

1. Call the Data Warehousing Workbench and, under Modeling, choose theInfoObject tree.

2. Highlight the characteristic for which you want to create a hierarchy and, fromthe context menu, choose Create Hierarchy.

3. In the dialog box, enter the technical name of the hierarchy, the hierarchy version(if necessary), the time base, and at least a short description for the hierarchy.Once you have confirmed your entries, the Maintain Hierarchy screen appears.

4. To create nodes and leaves, choose the relevant pushbutton for the node that youwant to create. You can choose from text nodes, characteristic nodes of externalcharacteristics, leaves of the basic characteristic of the hierarchy, or intervals.

Postable nodes (characteristic nodes of the basic characteristic in the hierarchy,intervals) are symbolized by the green InfoObject icon.

Not postable nodes (text nodes, external characteristic nodes) are symbolized bythe yellow InfoObject icon or by the file folder icon.

Note: You can arrange the nodes as you wish beneath one another as faras interval level. You cannot attach any additional nodes under intervals.

5. Repeat this step until you have determined the final hierarchy structure.

6. Save and activate your hierarchy.

Reporting-relevant Settings in the Hierarchy MaintenanceYou have various options for hierarchy settings in the hierarchy maintenance.

Level MaintenanceA level encompasses all nodes in a hierarchy that are at the same stage in thedrilldown. You can use Level Maintenance to determine names for the different levelsof a hierarchy. These names are then used in the context menu of the query duringnavigation.

Hierarchy AttributesYou can set the presentation parameters for the hierarchy display in the query usingHierarchy Attributes.

2011 © 2011 SAP AG. All rights reserved. 217

Page 234: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

218 © 2011 SAP AG. All rights reserved. 2011

Page 235: BW305 BW Query Design and Analysis

BW305 Lesson: Creating External Hierarchies in SAP NetWeaver BW

Figure 55: Showing/Hiding the Values of Posted Nodes

• Do Not Display Leaves for Inner Nodes in the Query

There are various display options for an inner, postable node, that is, an innernode that has subordinate postable nodes (lower-level nodes). You can eithercreate a leaf for each inner node and insert it directly underneath the inner node,or choose not to display the additional nodes.

This setting for the Hierarchy attributes Do or Do Not .... Display Leaves forInner Nodes in the Query correspond with the following settings in the querydefinition:

Values of Posted Nodes: Always Show or Hide.

• Display Behavior for Leaves of Inner Nodes Changeable

You can determine whether the user is able to change the display for the runtimeof the query. The following values are possible:

' ': The display cannot be changed in the query.

'X': The display can be changed in the query.

• Suppress Unassigned Node

Here you can specify whether to suppress the node under which all postablecharacteristic values that do not appear in the hierarchy display.

• Root/Totals Item Appears Above/Below

You can determine whether the root and therefore, the totals item display at theend or start of the query and whether the leaves appear above or below.

• Drilldown Start Level

You can set the default level to which the hierarchy is drilled down when youfirst call up the query. You can overwrite this setting in the query definition.

2011 © 2011 SAP AG. All rights reserved. 219

Page 236: BW305 BW Query Design and Analysis

Unit 5: Working with Characteristics and Hierarchies in Queries BW305

Lesson Summary

You should now be able to:• Define external hierarchies in SAP NetWeaver BW• Create time-dependent hierarchy structures• Use link nodes in the hierarchy definition

220 © 2011 SAP AG. All rights reserved. 2011

Page 237: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Describe the various properties of characteristics and their use in adjusting

reports to your requirements• Demonstrate the benefit of using attributes to describe characteristics in more

detail• Describe the difference between using display attributes and navigation attributes• Display characteristics in the rows or columns hierarchically• Include external hierarchies in your reports• Define how the external hierarchy is displayed in the report• Use external hierarchies to make restrictions• Configure a hierarchical display within structures• Combine hierarchies and structures• Define external hierarchies in SAP NetWeaver BW• Create time-dependent hierarchy structures• Use link nodes in the hierarchy definition

2011 © 2011 SAP AG. All rights reserved. 221

Page 238: BW305 BW Query Design and Analysis

Unit Summary BW305

222 © 2011 SAP AG. All rights reserved. 2011

Page 239: BW305 BW Query Design and Analysis
Page 240: BW305 BW Query Design and Analysis
Page 241: BW305 BW Query Design and Analysis

Unit Summary BW305

223 © 2011 SAP AG. All rights reserved. 2011

Page 242: BW305 BW Query Design and Analysis

Unit Summary BW305

224 © 2011 SAP AG. All rights reserved. 2011

Page 243: BW305 BW Query Design and Analysis

Unit 6Working with Variables in Queries

Unit OverviewThis unit shows you how to define different types of variables and their variousprocessing types. Examples of variables that are delivered with Business Contentare also presented.

Unit ObjectivesAfter completing this unit, you will be able to:

• Maintain the various types of variables and their processing types• Creating Characteristic value variables in queries• Creating text variables in queries• Creating hierarchy and hierarchy node variables in queries• Create a formula variable in a query using the Variable Editor, which will insert

a value to be used in a formula Key Figure.• Using queries with variables that are delivered with Business Content• Creating a replacement path processed Characteristic value variable to transfer

values from a Pre-Query to a Result-Set Query• Create a variable using the Variable Offset parameter• Test a variable using the Variable Offset parameter

Unit ContentsLesson: Maintaining Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227Lesson: Creating Characteristic Value and Text Variables in Queries .. . . . . .238

Exercise 9: Create Characteristic Value and Text Variables .. . . . . . . . . . . . .243Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries.. . . . .251

Exercise 10: Create Hierarchy and Hierarchy Node Variables inQueries.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

Lesson: Creating Formula Variables in Queries .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262Exercise 11: Create Formula Variables in Queries.. . . . . . . . . . . . . . . . . . . . . . . .265

2011 © 2011 SAP AG. All rights reserved. 225

Page 244: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson: Business Content Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271Exercise 12: Use Business Content Variables .. . . . . . . . . . . . . . . . . . . . . . . . . . . .273

Lesson: Transferring Values between Queries using Variables .. . . . . . . . . . . . .277Exercise 13: Transfer Values between Queries using Variables(Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279

Lesson: Using Variable Offsets .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286Exercise 14: Use Variable Offsets.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289

226 © 2011 SAP AG. All rights reserved. 2011

Page 245: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

Lesson: Maintaining Variables

Lesson OverviewThis lesson shows you the different types of variables and their various processingtypes using the Variable Editor.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Maintain the various types of variables and their processing types

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values. You must be able todefine variables of different types using the Variable Editor.

Maintaining VariablesVariables are query parameters that you define in the Query Designer and that arefilled with values only when you execute the query or Web application.

Figure 56: Creating Queries with Variables

2011 © 2011 SAP AG. All rights reserved. 227

Page 246: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Variables are reusable objects and act as placeholders for:

• Characteristic values• Hierarchies• Hierarchy nodes• Texts• Formula elements

The variables defined in the Query Designer are available in all InfoProviders for usein query definition. Variables do not depend on the InfoProvider, but rather on theInfoObject for which they were created.

Variables enable you to set queries more flexibly (query parameterization). Whenusing variables in the Query Designer, you do not choose fixed characteristic values,hierarchies, hierarchy nodes, texts, or formula elements, but rather you set variables asplaceholders. These placeholders are then filled with values at query runtime (whenyou insert the query into a workbook, when you refresh a workbook or when youlaunch the query on the Web). If you use variables, a query definition can then serveas the basis for many different queries.

Variable Types / Processing TypesThere are different variable types, depending on the object (for example, characteristicor formula) for which the variable is defined as a placeholder.

Figure 57: Overview of Processing Types for the Different Types of Variables

228 © 2011 SAP AG. All rights reserved. 2011

Page 247: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

A variable process type defines how a variable is to receive its values. The followingprocessing types are available:

User Entry/Default ValueReplacement PathAuthorizationCustomer ExitSAP Exit

• User Entry / Default Value

If you choose User Entry/Default Value as the processing type for a variable,you can manually enter the required value for the variable in a dialog box whenyou execute the query.

You enter a default value when you create the variable. This default value is thendisplayed for input-enabled variables in the input field of the variable screen. Forfields that are not input-enabled, the default value is used as the variable value.

• Replacement Path

The processing type Replacement Path enables you to specify the value thatautomatically replaces the variable when the query or Web application isexecuted.

For example, when you enter a variable as a characteristic value, you do notneed to determine the text for the characteristic value straight away, but can letit be filled dynamically to match the characteristic that is used when the queryis executed for the variable.

1. Text variables and formula variables with the replacement pathprocessing type are replaced by a value from a corresponding characteristicor from a different variable. The Variable Editor automatically takesyou through the Characteristic dialog step. This is where you select thereference for the replacement value.

2. Characteristic value variables with the replacement path processingtype are replaced by a query result.

In the Replacement Path dialog box, you select the query containing theresults that you want to use as a variable. You can now use the data resultof the selected query as a variable in a different query.

• Authorization

The Authorization processing type enables you to fill the variables automaticallywith the values from the authorization of a user.

2011 © 2011 SAP AG. All rights reserved. 229

Page 248: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

If you choose the Authorization processing type when you create a variable, thevariable fills automatically with the values in the user's authorization.

When the user opens a query, the data selection is automatically carried outaccording to his or her authorizations.

• Customer exit

If necessary, you have the option of using a customer exit to set up a processingtype for variables that is tailored specifically to your needs.

The Customer Exit processing type for variables enables you to determine valuesfor variables by means of a function module exit. The function module usedis EXIT_SAPLRRS0_001.

You create a project in transaction CMOD by selecting the SAP enhancementRSR00001 and assigning this to the enhancement project. Activate the project.

Note: For more information about working with the SAP enhancementfor global variables in reporting, see the SAP enhancement help. Callthe transaction SMOD. Enter the name of the enhancement (RSR00001),choose Documentation and then Edit Display/Change. For moreinformation about working with Customer Exits, see the ApplicationHelp in transaction CMOD.

• SAP Exit

The SAP exit processing type is contained in variables that are delivered withSAP NetWeaver BW Business Content.

Defining New VariablesNew variables are defined in the Variable Editor within the Query Designer. Thesettings are made on a series of tabs.

GeneralReplacement PathDetailsDefault ValuesCurrencies and Units

The fields on each tab will only appear if they are relevant to the context in whichyou are defining the variable.

230 © 2011 SAP AG. All rights reserved. 2011

Page 249: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

General Information TabIn this tab you enter the name of the variable and choose the Global Settings.Depending on the context you can also choose the method of populating the variables:

Manual Input/default valueReplacement PathCustomer ExitAuthorization

Figure 58: New Variable: General Information

Replacement Path TabThis tab is used for characteristic value variables, formula variables, and text variableswith the replacement path processing type.

2011 © 2011 SAP AG. All rights reserved. 231

Page 250: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Figure 59: New Variable: Replacement Path

There are different options for the replacement path, according to the type of variableused:

• Text variables and formula variables with the Replacement Path processingtype are replaced by a value from a corresponding characteristic or from adifferent variable. The value for a formula variable has to be a number. Thevalue for a text variable has to be a text.

1. Under Replace Variable With, you have the following options:Key (Internal Value)External Characteristic Value of the KeyLabel (Text)Attribute ValueHierarchy Attribute

2. Using the setting Use Interval, you determine whether the From-Value,the To-Value, or the Difference is used as the value when the value to bereplaced is an interval.

232 © 2011 SAP AG. All rights reserved. 2011

Page 251: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

3. The setting Offset Start and Offset Length enables you to determine thestart and the length of the text output. For example, if the only the first 10characters of the text are to be used, the Offset Start value would be 0 andthe Offset Length value would be 10.

4. The Evaluate as Boolean function (value 0 or 1)

This function is only available for formula variables.

If you select this setting, the formula variable is not replaced by a value(for example, key value), but rather it specifies whether a non-zero ornon-blank value exists.

• The value of the variable is 0 if the value to be replaced is a stringwith only blank characters or a zero.

• The value of the variable is 1 if the value to be replaced is a stringwith characters that are not blank or a number that is not zero.

• Characteristic value variables with the Replacement Path processing typeare replaced by a query result.

You can now use the data result of the selected query in a different query usingthe variable.

Example: You want to insert the result of the query Top 5 Products into anotherquery Sales Volume - Calendar Year/Month variably.

1. Highlight the characteristic, for example, Product, and create a newvariable.

2. Enter a name and a description for the variable and choose the ReplacementPath processing type.

3. You reach the Replacement Path tab now from the Replace Variable Valuewith drop-down list you must choose Query. Now enter the name of thequery, which will supply the variable values (that is, the query Top 5Products) where that query uses a condition to select the top 5 productsfor the month.

4. You can now insert the variable into the query (Sales Volume - CalendarYear/Month) to determine how the sales volume of the 5 products with thehighest sales volumes has developed on a month-by-month basis.

Note: Each time that the query Sales Volume - Calendar Year/Month isexecuted, the pre-query (Top 5 Products) is executed beforehand. Thiscan lead to long runtimes. If you do not absolutely need to execute apre-query (for example, you do not have to calculate the top 5 productsevery time since these changes only monthly), we recommend to you usea variable that represents a precalculated value set, where the variablevalues are stored persistently.

2011 © 2011 SAP AG. All rights reserved. 233

Page 252: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Details TabThe Details tab allows you to enter settings for all types of variables except forvariables with the replacement path processing type.

The details tab presents only those options that are possible and useful.

234 © 2011 SAP AG. All rights reserved. 2011

Page 253: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

Figure 60: New Variable: Details

1. Under Variable Represents, select the display area that the variable is torepresent. You can choose from:

• Single Value

The variable represents one value only.

• Multiple Single Values

The variable represents a range of single values.

You can use this setting with hierarchy nodes, for example, to enable theuser to enter several single nodes.

• Interval

The variable represents a from-value and a to-value.

• Selection Option

The variable represents a combination of single values and intervals ofyour choice.

• Precalculated Value Set

The variable represents a number of values that are stored in a databasetable by the Information Broadcaster.

2. Under Variable is, specify whether the variable input is Optional, Mandatory, orMandatory, Initial Value not Allowed.

3. Under Variable is Ready for input you can determine whether the variableis input-enabled when the query or Web application is executed. If theready-for-input option is active (= default setting), the variables screen is offeredwhen you execute the query or Web application. You can then enter the requiredvalues, confirm the default values, or change the default values.

4. Copy personalization data from variable: You can personalize variable valuesfor input-enabled variables for each user. These personal values are saved foreach variable and each user.

Default Values TabWhen you define a variable, you enter one or more default values. These then appearin the variables screen when you execute the query or Web application.

Currencies and Units TabThese settings are used with formula variables.

2011 © 2011 SAP AG. All rights reserved. 235

Page 254: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

You can select from the following dimensions:

AmountQuantityPrice (= currency/unit)Number (= default setting)Date

Changing Variables in the Variable EditorOnce a variable has been created, the Variable Editor uses a dialog box to give all ofthe selection options available for changing an existing variable.

Figure 61: Editing a Variable

The individual fields of the dialog box reflect the dialog steps in the Variable Editorand show the current settings of the variable. The dialog box is context sensitive,which means that only the fields and options that are relevant for the variable display,depending on the type of variable and the processing type.

236 © 2011 SAP AG. All rights reserved. 2011

Page 255: BW305 BW Query Design and Analysis

BW305 Lesson: Maintaining Variables

Lesson Summary

You should now be able to:• Maintain the various types of variables and their processing types

2011 © 2011 SAP AG. All rights reserved. 237

Page 256: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson: Creating Characteristic Value and Text Variablesin Queries

Lesson OverviewThis lesson show you how to create Characteristic value and text variables in queriesusing the Variable Editor.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Creating Characteristic value variables in queries• Creating text variables in queries

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able todefine Characteristic value variables and text variables of different processing typesusing the Variable Editor.

Creating Characteristic value variables in queriesWhen selecting Characteristic values in the query definition, you can select variablesinstead of fixed values. These variables, which act as placeholders, are filled withvalues when you execute the query. You can use variables to select single valuesand value ranges.

238 © 2011 SAP AG. All rights reserved. 2011

Page 257: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

2011 © 2011 SAP AG. All rights reserved. 239

Page 258: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Figure 62: Characteristic Value Variable

1. Selecting Single Value Variables

In the context menu of the characteristic, choose Restrict. The dialog box forselecting characteristic values appears.

Select the Variables option from the Show drop-down list and then transfer therequired variables using Drag&Drop or the Arrow button.

2. Selecting Single Value Variables as Variable Value Range Limits

In the dialog box for selecting characteristic values, in the Show drop-down list,choose Value Ranges and set the required operator (Between, Less than, Greaterthan, and so on). Press the select values button and then select Variables fromthe Show drop-down list. Choose the variable for the “from operator. Repeat thisprocess for the “to” operator”.

When using the Between operator, you can restrict both limits using single valuevariables or choose a single value variable for one of the interval limits andtransfer a fixed value for the other interval limit on the Fixed Values tab page.

When using the operators Greater than or equal to, Less than or equal to,Greater than, or Less than from the list of available variables in the left window,highlight a variable and move this using Drag&Drop or the Arrow button intothe right Selection window.

Hint: Swapping Interval Limits

If you are using variables when making interval selections, you can swapthe limits by highlighting the relevant variable in the right Selectionwindow, and choosing Swap Interval Limits from the context menu.

3. Selecting Variables with Several Single Values or Value Ranges

Depending on how they have been defined, you only select single values forvariables, but also several single values, intervals, or selection options. UnderSingle Values, select the relevant variable from the variables window and specifythe values or interval limits when you execute the query.

Creating text variables in queriesText variables represent a text. You can use text variables in query descriptions,calculated key figures, and structural components.

240 © 2011 SAP AG. All rights reserved. 2011

Page 259: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

Text variables (and also formula variables) can be processed by Replacement Pathand be replaced with a value from a corresponding characteristic or from a differentvariable.

The value is either determined from the key, the external key, the description, or anattribute value. You can also define an offset start and offset length.

If you choose to replace the variable with the value of another variable, the variable isreplaced on the variables screen upon each data release (query execution). There aresome prerequisites to be fulfilled for using replace with a variable:

• Target Variable (= the variable that is to be replaced)

– The target variable is not allowed to be input-ready– The target variable must represent a single value

• Source Variable (= the variable that is to replace the target variable)

– The source variable must be a characteristic variable, a hierarchy variable,a text variable, or a formula variable. (The source variable is not allowed tobe a hierarchy node variable.)

– The source variable must be input-ready– The source variable must be available in the query– The source variable must represent a single value or an interval

To include an existing text variable, choose the “Select Text Variable” icon andsearch for the required text variable in the list of existing text variables. This appearswith its technical name, enclosed by ampersands (&), in the description.

2011 © 2011 SAP AG. All rights reserved. 241

Page 260: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

242 © 2011 SAP AG. All rights reserved. 2011

Page 261: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

Exercise 9: Create Characteristic Value andText Variables

Exercise ObjectivesAfter completing this exercise, you will be able to:• Creating Characteristic value variables in queries• Creating text variables in queries

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able todefine Characteristic value variables and text variables of different processing typesusing the Variable Editor.

Task:Create a Characteristic Value variable for a single value and for interval values withtext variables reflecting the respective selections using the Variable Editor.

1. Create a new query based on the MultiProvider – Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Sales Volume EUR (T_INVCD_V) in the Columns,restricted to the characteristic Cal. Year/Month (0CALMONTH). Restrict Cal.Year/month using a variable representing a single month, which displays adefault value 06.2009, which can be changed.

Use the following description for the variable:

Description: U## Month Single Value Variable

Variable name: U##_VAR_MON001

2. Define a new text variable that you include in the description of the restrictedkey figure so that you can list the month, to which the sales volume is restrictedat runtime, as a text (for example, Sales Volume EUR 06.2009). Ensure thatthe text variable relates to the from-value of the restricting characteristic Cal.Year/Month.

Use the following description for the text variable:

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 243

Page 262: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Description: U## Text From Variable

Variable name: U##_VAR_TMF001

3. Drag the Sales Volume EUR (T_INVCD_V) key figure into the Columns againand restrict this using a variable, which displays a default valuemonth interval,which can be changed at runtime to which the sales volume is restricted. Youwill use the month interval 01.2009 to 12.2009 as default values.

Use the following description for the variable:

Description: U## Month Interval Variable

Variable name: U##_VAR_MON002

4. To specify the selected interval in the Column header, you need a to-value textvariable in addition to the from-value text variable. Create the to-value textvariable and use both the from-value text variable and to-value text value textvariable in the restricted key figure description.

For the to-value text variable use:

Description: U## Text To Variable

Variable name: U##_VAR_TMT001

5. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Characteristic/Text Variables

Technical name: U##_QD_VAR001

Execute the query.

244 © 2011 SAP AG. All rights reserved. 2011

Page 263: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

Solution 9: Create Characteristic Value andText VariablesTask:Create a Characteristic Value variable for a single value and for interval values withtext variables reflecting the respective selections using the Variable Editor.

1. Create a new query based on the MultiProvider – Customer Sales (P_SALES01)in the Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Sales Volume EUR (T_INVCD_V) in the Columns,restricted to the characteristic Cal. Year/Month (0CALMONTH). Restrict Cal.Year/month using a variable representing a single month, which displays adefault value 06.2009, which can be changed.

Use the following description for the variable:

Description: U## Month Single Value Variable

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 245

Page 264: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Variable name: U##_VAR_MON001

a) To define a new query, open the Query Designer and choose InfoAreas →Reporting Layer → Sales and Distribution → MultiProvider – CustomerSales (P_SALES01) → Open.

b) Use Drag & Drop to transfer Material (0MATERIAL) from the Materialdimension into the Rows.

c) Use Drag & Drop to include the basic key figure Sales Volume EUR(T_INVCD_V) into the Columns.

d) From the context menu for Sales Volume EUR, choose Edit. TransferCal. Year/Month out of the Dimensions → Time into the right windowusing Drag & Drop.

e) From the context menu for Cal. Year/Month, choose Restrict. ChooseShow: Variables → Type: Characteristic Value Variable and press thebutton Create New Variable.

f) On the General tab page, enter:

Description: U## Month Single Value Variable

Variable name: U##_VAR_MON001

Processing by: Manual Input/Default Value

g) On the Details page, choose the following settings:

Variable Represents: Single Value

Variable is: Mandatory

Variable is ready for Input: Set the flag to active

h) On the Default Values tab page, select: Default Value: 06.2009 byclicking the button Change Default Values and change Show to SingleValues. From the list, choose the value.

i) Choose OK.

j) Transfer the variable that you have defined into the selection window andchoose OK.

The window closes and you return to the Change Selection dialog box.

Continued on next page

246 © 2011 SAP AG. All rights reserved. 2011

Page 265: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

2. Define a new text variable that you include in the description of the restrictedkey figure so that you can list the month, to which the sales volume is restrictedat runtime, as a text (for example, Sales Volume EUR 06.2009). Ensure thatthe text variable relates to the from-value of the restricting characteristic Cal.Year/Month.

Use the following description for the text variable:

Description: U## Text From Variable

Variable name: U##_VAR_TMF001

a) In the Change Selection dialog box, position the cursor at the end of the keyfigure description and select Enter to position the cursor on the next line.

Choose the Text Variables icon.

Choose Create New Variable.

b) On the General tab page, enter:

Description: U## Text From Variable

Variable name: U##_VAR_TMF001

Processing by: Replacement Path

Ref. Characteristic: Cal. year / month

c) On the Replacement Path tab page, select:

Replace Variable With: InfoObject

Replace With: External Characteristic Value Key

Use Interval: From Value

d) Choose OK on all open.

e) The text variable that you have defined appears in the description with itstechnical name enclosed with & characters.

3. Drag the Sales Volume EUR (T_INVCD_V) key figure into the Columns againand restrict this using a variable, which displays a default valuemonth interval,which can be changed at runtime to which the sales volume is restricted. Youwill use the month interval 01.2009 to 12.2009 as default values.

Use the following description for the variable:

Description: U## Month Interval Variable

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 247

Page 266: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Variable name: U##_VAR_MON002

a) Use Drag & Drop to include the basic key figure Sales Volume EUR(T_INVCD_V) in the Columns

b) From the context menu for Sales Volume EUR, choose Edit → Dimensions→ Time. Transfer Cal. Year/Month into the right window using Drag &Drop.

c) From the context menu for Cal. Year/Month, choose Restrict → Show:Variables → Type: Characteristic Value Variable and press the buttonCreate New Variable.

d) On the General tab page, enter:

Description: U## Month Interval Variable

Variable name: U##_VAR_MON002

Processing by: Manual Input/Default Value

e) On the Details page, choose the following settings:

Variable Represents: Interval

Variable is: Mandatory

Variable is ready for Input: Set the flag to active

f) On the Default Values tab page, click the button Change Default Values andchange Show to Value Ranges. Make sure the operator is Between. Forthe from-value choose 01.2009 and for the to-value choose 12.2009.

g) Choose OK.

h) Transfer the variable that you have defined into the selection window andchoose OK.

i) The window is closed and you return to the Change Selection dialog box.

4. To specify the selected interval in the Column header, you need a to-value textvariable in addition to the from-value text variable. Create the to-value textvariable and use both the from-value text variable and to-value text value textvariable in the restricted key figure description.

For the to-value text variable use:

Description: U## Text To Variable

Continued on next page

248 © 2011 SAP AG. All rights reserved. 2011

Page 267: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Characteristic Value and Text Variables in Queries

Variable name: U##_VAR_TMT001

a) In the Change Selection dialog box, position the cursor at the end of the keyfigure description and select Enter to position the cursor on the next line.

Choose the Text Variables icon.

Choose Entry of Variables.

b) Select the U## Text From Variable (U##_VAR_TMF001)

c) After the text variable, add the word to.

d) Choose the Text Variables icon again.

Choose Create New Variable.

e) On the General tab page, enter:

Description: U## Text To Variable

Variable name: U##_VAR_TMT001

Processing by: Replacement Path

Ref. Characteristic: Cal. year / month

f) On the Replacement Path tab page, select:

Replace Variable With: InfoObject

Variable Represents: External Characteristic Value Key

Use Interval: To Value

g) Choose OK.

h) The text variable that you have defined appears in the description withits technical name enclosed in &.

5. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Characteristic/Text Variables

Technical name: U##_QD_VAR001

Execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Characteristic/Text Variables

Technical name: U##_QD_VAR001

b) Execute the query via Exit and use the query or via Execute.

2011 © 2011 SAP AG. All rights reserved. 249

Page 268: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson Summary

You should now be able to:• Creating Characteristic value variables in queries• Creating text variables in queries

250 © 2011 SAP AG. All rights reserved. 2011

Page 269: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

Lesson: Creating Hierarchy and Hierarchy Node Variablesin Queries

Lesson OverviewThis lesson show you how to create hierarchy and hierarchy node variables in queriesusing the Variable Editor.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Creating hierarchy and hierarchy node variables in queries

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed hierarchy information and free selection of characteristic values and must beable to define hierarchy and hierarchy node variables using the Variable Editor.

Creating hierarchy and hierarchy node variables inqueriesHierarchy variables represent hierarchies. You can use them wherever hierarchiescan be selected.

2011 © 2011 SAP AG. All rights reserved. 251

Page 270: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Figure 63: Hierarchy Variables

Hierarchy node variables represent a node in a hierarchy. You can use them as analternative to hierarchy nodes as fixed values for restricting a characteristic.

If you use a hierarchy node variable, you can make selections by hierarchy nodewhen you use the query.

252 © 2011 SAP AG. All rights reserved. 2011

Page 271: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

There are two possible combinations of hierarchies and nodes:

• Variable hierarchy node with a fixed hierarchy

For example, a report about any department (variable hierarchy node) for thehierarchy valid for 2009 (fixed hierarchy).

1. To restrict a characteristic to a variable hierarchy node, use the contextmenu of the characteristic to call the dialog box for restricting characteristicvalues.

2. Change to Show selection to Variables option, then in the Type drop downlist select Hierarchy Node Variables.

3. From the list of variables in the left window, select the required variable.Use Drag&Drop (or the arrow pointing to the right) to move these intothe right Selection window.

• Variable hierarchy node with a variable hierarchy

For example, a report about any department (variable hierarchy node) for thehierarchy valid for the current calendar year (variable hierarchy).

1. To restrict a characteristic with a variable hierarchy to a variable hierarchynode, follow the same steps as above.

2. In the Properties pane make sure the Hierarchy tab is open and pressthe select hierarchy button. Then change the radio button to HierarchyVariables and select the required variable for the hierarchy selection.

Figure 64: Variables for Hierarchy Nodes

2011 © 2011 SAP AG. All rights reserved. 253

Page 272: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

To be able to enter a value for the hierarchy node variable at runtime, set the cursor

on the greyed-out input field and, using input help or the corresponding icon,select the required hierarchy node.

Note: If your are using a hierarchy variable at the same time, you first haveto select the hierarchy.

254 © 2011 SAP AG. All rights reserved. 2011

Page 273: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

Exercise 10: Create Hierarchy and HierarchyNode Variables in Queries

Exercise ObjectivesAfter completing this exercise, you will be able to:• Creating hierarchy and hierarchy node variables in queries

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed hierarchy information and free selection of characteristic values and must beable to define hierarchy and hierarchy node variables using the Variable Editor.

Task:You now want to display the materials as a hierarchy in your report and select thehierarchy at runtime.

By using a hierarchy node variable, you can be flexible in selecting individualhierarchy nodes.

1. In a new query, transfer the characteristic Material (0MATERIAL) in the Rowsand the key figure Sales Volume EUR (T_INVCD_V) in the Columns.

Restrict the material to a hierarchy node variable, which you create as a newvariable. Define the hierarchy node variable to allow the entry of multiplesingle values.

Enter the description:

Description: U## Hierarchy Node Variable

Technical name: U##_VAR_NODE001

Once you have created the hierarchy node variable, stay in the Select Values forMaterial dialog to define the hierarchy variable in the second step.

2. You also want to be able to select the hierarchy flexibly at runtime. To do this,define a hierarchy variable and include this in the query. Finally make thenecessary setting for the correct variable sequence for the variable dialogue.

Description: U## Hierarchy Variable

Technical name: U##_VAR_HIER001

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 255

Page 274: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy Variables

Technical Name: U##_QD_VAR002

Then execute it in the BEx Analyzer.

Select the hierarchy Product Hierarchy for Material MARA (PRDHA) and twohierarchy nodes.

Set other hierarchy nodes in the report as a filter for 0MATERIAL.

256 © 2011 SAP AG. All rights reserved. 2011

Page 275: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

Solution 10: Create Hierarchy and HierarchyNode Variables in QueriesTask:You now want to display the materials as a hierarchy in your report and select thehierarchy at runtime.

By using a hierarchy node variable, you can be flexible in selecting individualhierarchy nodes.

1. In a new query, transfer the characteristic Material (0MATERIAL) in the Rowsand the key figure Sales Volume EUR (T_INVCD_V) in the Columns.

Restrict the material to a hierarchy node variable, which you create as a newvariable. Define the hierarchy node variable to allow the entry of multiplesingle values.

Enter the description:

Description: U## Hierarchy Node Variable

Technical name: U##_VAR_NODE001

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 257

Page 276: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Once you have created the hierarchy node variable, stay in the Select Values forMaterial dialog to define the hierarchy variable in the second step.

a) To define a new query, open the Query Designer and choose InfoAreas→Reporting Layer → Sales and Distribution → MultiProvider - CustomerSales (P_SALES01) → Open.

b) Use Drag&Drop to transfer Material (0MATERIAL) from the Materialdimension into the Rows.

c) Use Drag&Drop to include the basic key figure Sales Volume EUR(T_INVCD_V) into the Columns.

d) In the Characteristic Restrictions area, from the context menu forMaterial,choose the Restrict → Show: Variables → Type: Hierarchy Node Variablesand press the button Create New Variable.

e) On the General tab page, enter:

Description: U## Hierarchy Node Variable

Variable name: U##_VAR_NODE001

Processing by: Manual Input/Default Value

f) On the Details tab page, choose the settings:

Variable Represents: Several Single Values

Variable is: Optional

Variable is ready for Input: Set the flag to active

g) Choose OK.

h) Do not leave the Select Values for Material dialog box.

2. You also want to be able to select the hierarchy flexibly at runtime. To do this,define a hierarchy variable and include this in the query. Finally make thenecessary setting for the correct variable sequence for the variable dialogue.

Description: U## Hierarchy Variable

Continued on next page

258 © 2011 SAP AG. All rights reserved. 2011

Page 277: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

Technical name: U##_VAR_HIER001

a) In the Selection for Material dialog box, highlight your newly createdhierarchy node variable, go to the bottom of the dialog box and choose theVariable Hierarchy button.

b) In the upcoming Select Hierarchy window, choose Hierarchy Variables.Select the button at the end of the entry field. Another window, SelectValues for Material, opens. There choose Create New Variable.

c) On the General tab page, enter:

Description: U## Hierarchy Variable

Variable name: U##_VAR_HIER001

Processing by: Manual Input/Default Value

d) On the Details tab page, choose the settings:

Variable Represents: Single Value

Variable is: Optional

Variable is ready for Input: Set the flag to active

e) Choose OK 3 times until you return to the Select Hierarchy window. Selectyour new hierarchy variable and press OK.

f) Back on the Select Values for Material window, transfer your hierarchynode variable into the selection window on the right side. You see nowthat the U## Hierarchy Variable is now assigned to the U##Hierarchy Node Variable

g) Close the Select Values for Material window by choosing OK.

h) Go to the Query Properties, and under Variable Sequence drag thehierarchy variable to the first place.

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy Variables

Technical Name: U##_QD_VAR002

Then execute it in the BEx Analyzer.

Select the hierarchy Product Hierarchy for Material MARA (PRDHA) and twohierarchy nodes.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 259

Page 278: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Set other hierarchy nodes in the report as a filter for 0MATERIAL.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Hierarchy Variables

Technical Name: U##_QD_VAR002

b) Execute it in the BEx Analyzer.

c) Set other hierarchy nodes in the query as a filter for the material.

260 © 2011 SAP AG. All rights reserved. 2011

Page 279: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Hierarchy and Hierarchy Node Variables in Queries

Lesson Summary

You should now be able to:• Creating hierarchy and hierarchy node variables in queries

2011 © 2011 SAP AG. All rights reserved. 261

Page 280: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson: Creating Formula Variables in Queries

Lesson OverviewThis lesson shows you how to create formula variables in queries using the VariableEditor.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Create a formula variable in a query using the Variable Editor, which will inserta value to be used in a formula Key Figure.

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values. You must must be ableto define formula variables for additional Key Figures in a query using the VariableEditor.

Creating Formula Variables in QueriesFormula variables represent numerical values. You can use formula variables informulas.

262 © 2011 SAP AG. All rights reserved. 2011

Page 281: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Formula Variables in Queries

Figure 65: Variables for Formulas

Example:

To calculate the average sales by store, use a formula variable to provide the numberof stores to the calculation. This value could be read from a master table, supplied bya user at run time, it could even be an attribute of an organization.

2011 © 2011 SAP AG. All rights reserved. 263

Page 282: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

264 © 2011 SAP AG. All rights reserved. 2011

Page 283: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Formula Variables in Queries

Exercise 11: Create Formula Variables inQueries

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create a formula variable in a query using the Variable Editor, which will insert

a value to be used in a formula Key Figure.

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able todefine formula variables for additional Key Figures in a query using the VariableEditor.

Task:You want to display the quantities sold for your materials purchased by customers.You also want to display the total gross weight of all materials purchased.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution → MultiProvider- Customer Sales InfoArea.

Transfer the Sold-to Party (T_SOLD_TO) characteristic into the Rows.

Transfer the Material (0MATERIAL) characteristic into the Rows under theSold-to Party (T_SOLD_TO) characteristic.

Include the basic key figure Order Entry Quantity (0INCORDQTY) in theColumns.

2. Add a new key figure in the Columns for Total Gross Weight Sold using a newformula variable with the following description:

Description: U## Formula Variable (Attribute)

Variable name: U##_VAR_FORM001

This will use the replacement path to calculate the gross weight from the attributeGross Weight for Material.

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Formula Variable

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 265

Page 284: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Technical name: U##_QD_VAR003

Now execute the query.

266 © 2011 SAP AG. All rights reserved. 2011

Page 285: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Formula Variables in Queries

Solution 11: Create Formula Variables inQueriesTask:You want to display the quantities sold for your materials purchased by customers.You also want to display the total gross weight of all materials purchased.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution → MultiProvider- Customer Sales InfoArea.

Transfer the Sold-to Party (T_SOLD_TO) characteristic into the Rows.

Transfer the Material (0MATERIAL) characteristic into the Rows under theSold-to Party (T_SOLD_TO) characteristic.

Include the basic key figure Order Entry Quantity (0INCORDQTY) in theColumns.

a) To define a new query, open the Query Designer and choose InfoAreas→Reporting Layer → Sales and Distribution → MultiProvider - CustomerSales (P_SALES01) → Open..

b) Use Drag&Drop to transfer Sold-to Party from the Customer dimensioninto the Rows.

c) Use Drag&Drop to transfer Material from the Material dimension into theRows after Sold-to Party.

d) Use Drag&Drop to include the basic key figure Order Entry Quantity(0INCORDQTY) in the Columns.

2. Add a new key figure in the Columns for Total Gross Weight Sold using a newformula variable with the following description:

Description: U## Formula Variable (Attribute)

Variable name: U##_VAR_FORM001

This will use the replacement path to calculate the gross weight from the attributeGross Weight for Material.

a) From the context menu for the Key Figure structure, choose New Formula.Then choose Edit from the context menu of the new formula. Enter thedescription Total Gross Weight Sold.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 267

Page 286: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

b) In the Available Operands field, from the context menu for FormulaVariables, choose New Variable. Then choose Edit from the context menuof the new variable.

c) On the General tab page, enter:

Description: U## Formula Variable (Attribute)

Variable name: U##_VAR_FORM001

Processing by: Replacement Path

Ref. Characteristic: Material

d) On the Replacement Path tab page, select:

Replace Variable With: InfoObject

Replace With: Attribute Value

Attribute: Gross Weight The drop down box will display all the attributesfor the Reference Characteristic.

Use Interval: From

e) On the Currency/Unit tab page, the Dimension is set as Number.

f) Choose OK.

g) From the formula variables directory, transfer the new formula variableU## Formula Variable (Attribute) into the Detail View field.

Choose OK.

h) From the list of buttons representing Basic Functions, choose the buttonwhich represents the multiplication function.

i) From the list of Operators, open the folder for Data Functions anddouble-click on the function Value without dimension (no unit) [NODIM]to place it after the multiplication function.

j) Within the open parentheses of the Value without dimension (no unit)[NODIM] drag the basic key figure Order Entry Quantity (0INCORDQTY)from the list of Available Operands.

k) Click OK to place the new formula into the Columns and make it the lastkey figure in the Key Figure Structure.

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Formula Variable

Continued on next page

268 © 2011 SAP AG. All rights reserved. 2011

Page 287: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Formula Variables in Queries

Technical name: U##_QD_VAR003

Now execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Formula Variable

Technical name: U##_QD_VAR003

b) Execute the query.

2011 © 2011 SAP AG. All rights reserved. 269

Page 288: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson Summary

You should now be able to:• Create a formula variable in a query using the Variable Editor, which will insert

a value to be used in a formula Key Figure.

270 © 2011 SAP AG. All rights reserved. 2011

Page 289: BW305 BW Query Design and Analysis

BW305 Lesson: Business Content Variables

Lesson: Business Content Variables

Lesson OverviewThis lesson shows you how to use variables of processing type SAP Exit, found inBusiness Content and accessed through the Variable Editor.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Using queries with variables that are delivered with Business Content

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able to usevariables provided by Business Content and accessed through the Variable Editor.

Business Content VariablesBusiness Content variables are delivered for all types of variables. You have toactivate the variables delivered before you can use them.

Variables that are delivered with Business Content from SAP NetWeaver BusinessWarehouse often have the SAP exit processing type. This enables you to createcomplex queries quickly and easily.

For time characteristics, a range of variables are delivered that replace frequently usedtime periods or specific times, for example, the current month or the comparablemonth of the previous year.

2011 © 2011 SAP AG. All rights reserved. 271

Page 290: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Figure 66: Business Content Variables for 0CALMONTH

272 © 2011 SAP AG. All rights reserved. 2011

Page 291: BW305 BW Query Design and Analysis

BW305 Lesson: Business Content Variables

Exercise 12: Use Business ContentVariables

Exercise ObjectivesAfter completing this exercise, you will be able to:• Using variables in queries that are delivered with SAP NetWeaver Business

Warehouse Business Content

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able to usevariables provided by Business Content and accessed with the Variable Editor.

Task:To display the sales volume in the current quarter of the previous year for chosenmaterials, use variables that are delivered with Business Content.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

Include the characteristic Material (0MATERIAL) in the Rows and restrict itusing the content variableMaterial (Selection Options, Optional) (0S_MAT).

2. Include the basic key figure Sales Volume EUR (T_INVCD_V) in the Columns,restricted to the characteristic Cal. Year/Month (0CALMONTH). Restrict Cal.Year/Month using the Content variable Current Quarter in Previous Year(0CMCQULY).

The description of the restricted key figure should be:

Sales Volume EUR Current Quarter Previous Year

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Content Variables

Technical name: U##_QD_VAR004

Now execute the query.

2011 © 2011 SAP AG. All rights reserved. 273

Page 292: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Solution 12: Use Business Content VariablesTask:To display the sales volume in the current quarter of the previous year for chosenmaterials, use variables that are delivered with Business Content.

1. Create a new query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider in the Reporting Layer → Sales and Distribution InfoArea.

Include the characteristic Material (0MATERIAL) in the Rows and restrict itusing the content variableMaterial (Selection Options, Optional) (0S_MAT).

a) To define a new query, open the Query Designer.

b) Choose InfoAreas → Reporting Layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01) → Open.

c) Use Drag&Drop to transfer Material (0MATERIAL) from the Materialdimension into the Rows.

d) Use Drag&Drop to transfer Material (0MATERIAL) from the Materialdimension into the Characteristic Restriction area of the Filter tab page.

There, from the context menu for Material, choose Restrict → Show:Variables → Type: Characteristic Value Variable and select the variableMaterial (Selection Options, Optional) (0S_MAT).

Choose OK.

2. Include the basic key figure Sales Volume EUR (T_INVCD_V) in the Columns,restricted to the characteristic Cal. Year/Month (0CALMONTH). Restrict Cal.Year/Month using the Content variable Current Quarter in Previous Year(0CMCQULY).

The description of the restricted key figure should be:

Continued on next page

274 © 2011 SAP AG. All rights reserved. 2011

Page 293: BW305 BW Query Design and Analysis

BW305 Lesson: Business Content Variables

Sales Volume EUR Current Quarter Previous Year

a) Use Drag&Drop to include the basic key figure Sales Volume EUR(T_INVCD_V) in the Columns.

b) From the context menu for Sales Volume EUR, choose Edit → Dimensions→ Time. Transfer Cal. Year/Month to the right window using Drag&Drop.

c) From the context menu for Cal. Year/Month, choose Restrict → Show:Variables → Type: Characteristic Value Variable and select the variableCurrent Quarter in Previous Year (0CMCQULY).

d) To enhance the description of the key figure, place the cursor after SalesVolume EUR and select Enter to insert a carriage return. Then typeCurrent Quarter Previous Year.

e) Choose OK.

3. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Content Variables

Technical name: U##_QD_VAR004

Now execute the query.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Content Variables

Technical name: U##_QD_VAR004

b) Execute the query, and when the variable dialog appears, use the icon to theright of the entry field to select values.

Select the button More to open the Selection area.

Use Drag&Drop to move the values “1400-300”, “1400-310” and“1400-315” into the Selection area.

c) Select OK.

2011 © 2011 SAP AG. All rights reserved. 275

Page 294: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson Summary

You should now be able to:• Using queries with variables that are delivered with Business Content

276 © 2011 SAP AG. All rights reserved. 2011

Page 295: BW305 BW Query Design and Analysis

BW305 Lesson: Transferring Values between Queries using Variables

Lesson: Transferring Values between Queries usingVariables

Lesson OverviewThis lesson shows you how to create a variable with the Variable Editor that willtransfer values from one query (pre-query) to another (result-set query).

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Creating a replacement path processed Characteristic value variable to transfervalues from a Pre-Query to a Result-Set Query

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values. You need to be able todefine a variable with the Variable Editor that can transfer values from a pre-query toa result-set query.

Characteristic Value Variables with “Replacement Path”Processing TypeCharacteristic value variables with the Replacement Path processing type are replacedby a query result.

You can now use the data result of the selected query in a different query using thiskind of variable.

2011 © 2011 SAP AG. All rights reserved. 277

Page 296: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Example: You want to insert the result of the query Top 5 Products into another querySales Volume - Calendar Year/Month variably.

1. Highlight the characteristic, for example, Product, and create a new variable.2. Enter a name and a description for the variable and choose the Replacement

Path processing type.3. You reach the Replacement Path tab now from the Replace Variable Value with

drop-down list. Choose Query. Now enter the name of the query which willsupply the variable values (i.e., the query Top 5 Products) where that queryuses a condition to select the top 5 products for the month.

4. You can now insert the variable into the query (Sales Volume - CalendarYear/Month) to determine how the sales volume of the 5 products with thehighest sales volumes has developed on a month-by-month basis.

Note: Each time that the query Sales Volume - Calendar Year/Month isexecuted, the pre-query (Top 5 Products) is executed beforehand. This canlead to long runtimes. If you do not absolutely need to execute a pre-query (forexample, you do not have to calculate the top 5 products every time since thesechange only monthly), we recommend that you use a variable that represents aprecalculated value set, where the variable values are stored persistently.

278 © 2011 SAP AG. All rights reserved. 2011

Page 297: BW305 BW Query Design and Analysis

BW305 Lesson: Transferring Values between Queries using Variables

Exercise 13: Transfer Values betweenQueries using Variables (Optional)

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create a replacement path processed Characteristic value variable to transfer

values from a Pre-Query to a Result-Set Query

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able todefine a variable with the Variable Editor that can transfer values from a pre-query toa result-set query.

Task:Create a Pre-Query (source query) to deliver values for a Characteristic value variablewith the replacement path used in a Result-Query (target query).

1. Create a new query as a Pre-Query based on the Order Details (P_SD01) DSO inthe Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Qty in OUn (0QUANT_B) in the Columns.

Define a restriction in Default values for the characteristic Company Code(0COMP_CODE) to evaluate the material items which were sold within thefollowing company codes: IDES UK (2000), IDES Portugal (2100), IDESFrance (2200) , IDES Italia (2400) and IDES Netherlands (2400)

Define a restriction in Default values for the characteristic Calendar Day(0CALDAY) with a variable to evaluate the material items which were soldduring the default interval January 1, 2009 and December 31, 2009.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Order Details (Pre)

Technical name: U##_QD_VAR005

Execute the query and take note of the individual materials items listed.

Finally, close the query.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 279

Page 298: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

2. Create a second query as a Result Query based on the MultiProvider -Customer Sales (P_SALES01) InfoProvider in the Reporting Layer → Sales andDistribution InfoArea. This query uses the results from the Pre-Query.

Place the characteristic Material (0MATERIAL) into the CharacteristicRestrictions area on the Filter tab.

Restrict the characteristic Material (0MATERIAL) to the values found out by thePre-Query using a characteristic value variable with replacement path.

Description for the variable: U## Replacement Path for QueryVariable

Variable name: U##_VAR_PATH001

Include the characteristic Sold to Party (T_SOLD_TO) in the Rows.

Include the basic key figure Invoiced Quantity (0INVCD_QTY) in the Columns.

Include the characteristic Cal. Year/Month (0CALMONTH) in the columns andrestrict it to January 2009 - March 2009 as default values.

Finally, place Material (0MATERIAL) in the Free Characteristics area.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Result Query

Technical name: U##_QD_VAR006

Execute the query and drill down by Material. How many materials are shown?

280 © 2011 SAP AG. All rights reserved. 2011

Page 299: BW305 BW Query Design and Analysis

BW305 Lesson: Transferring Values between Queries using Variables

Solution 13: Transfer Values betweenQueries using Variables (Optional)Task:Create a Pre-Query (source query) to deliver values for a Characteristic value variablewith the replacement path used in a Result-Query (target query).

1. Create a new query as a Pre-Query based on the Order Details (P_SD01) DSO inthe Reporting Layer → Sales and Distribution InfoArea.

Place the characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Qty in OUn (0QUANT_B) in the Columns.

Define a restriction in Default values for the characteristic Company Code(0COMP_CODE) to evaluate the material items which were sold within thefollowing company codes: IDES UK (2000), IDES Portugal (2100), IDESFrance (2200) , IDES Italia (2400) and IDES Netherlands (2400)

Define a restriction in Default values for the characteristic Calendar Day(0CALDAY) with a variable to evaluate the material items which were soldduring the default interval January 1, 2009 and December 31, 2009.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Order Details (Pre)

Technical name: U##_QD_VAR005

Execute the query and take note of the individual materials items listed.

Finally, close the query.

a) To define a new query, open the Query Designer and choose InfoAreas →Reporting Layer → Sales and Distribution → Order Details (P_SD01)→ Open.

b) Use Drag&Drop to transfer Material from the Key Part folder into theRows.

c) Use Drag&Drop to include the basic key figure Qty in OUn (0QUANT_B)into the Columns.

d) Use Drag&Drop to include the characteristic Company Code(0COMP_CODE) in the Default values.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 281

Page 300: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

e) From the context menu for Company Code (0COMP_CODE), chooseRestrict. Choose Show: Single Values.

f) Select the following values and move them to the Selection screen: IDESUK (2000), IDES Portugal (2100), IDES France (2200) , IDES Italia(2400) and IDES Netherlands (2400).

g) Choose OK.

h) Use Drag&Drop to include the characteristic Calendar Day (0CALDAY)in the Default values.

i) From the context menu for Calendar Day (0CALDAY), choose Restrict.Choose Show: Value Ranges and Between.

From Value: 01.01.2009

To Value: 31.12.2009

Hint: Since the Characteristic is Calendar Day, choosing a singlevalue displays a calendar which defaults to the current date. Usethe Column Left and Column Right buttons to move themonths backwards and forwards.

j) Choose OK.

k) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Order Details (Pre)

Technical name: U##_QD_VAR005

l) Execute the query and take note of the individual materials items listed.

m) Close the query.

2. Create a second query as a Result Query based on the MultiProvider -Customer Sales (P_SALES01) InfoProvider in the Reporting Layer → Sales andDistribution InfoArea. This query uses the results from the Pre-Query.

Place the characteristic Material (0MATERIAL) into the CharacteristicRestrictions area on the Filter tab.

Restrict the characteristic Material (0MATERIAL) to the values found out by thePre-Query using a characteristic value variable with replacement path.

Description for the variable: U## Replacement Path for QueryVariable

Continued on next page

282 © 2011 SAP AG. All rights reserved. 2011

Page 301: BW305 BW Query Design and Analysis

BW305 Lesson: Transferring Values between Queries using Variables

Variable name: U##_VAR_PATH001

Include the characteristic Sold to Party (T_SOLD_TO) in the Rows.

Include the basic key figure Invoiced Quantity (0INVCD_QTY) in the Columns.

Include the characteristic Cal. Year/Month (0CALMONTH) in the columns andrestrict it to January 2009 - March 2009 as default values.

Finally, place Material (0MATERIAL) in the Free Characteristics area.

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Result Query

Technical name: U##_QD_VAR006

Execute the query and drill down by Material. How many materials are shown?

a) To define a new query, open the Query Designer and choose InfoAreas →Reporting Layer → Sales and Distribution → MultiProvider - CustomerSales (P_SALES01) → OK.

b) Use Drag&Drop to transfer Material from the Material dimension into theCharacteristic Restrictions area on the Filter tab.

c) From the context menu for Material, choose Restrict → Show: Variables→ Type: Characteristic Value Variable and press the button Create NewVariable.

d) On the General tab page, enter:

Description: U## Replacement Path Variable

Variable technical name: U##_VAR_PATH001

Processing by: Replacement Path

Ref. Characteristic: 0MATERIAL

On the Replacement Path tab page, select:

Replace Variable With: Query

Query: U##_QD_VAR005

Choose OK.

Find and select your variable and then choose OK.

e) Use Drag&Drop to transfer Sold to Party from the Customer dimensioninto the Rows.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 283

Page 302: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

f) Use Drag&Drop to include the basic key figure Invoiced Quantity(0INVCD_QTY) into the Columns.

g) Use Drag&Drop to transfer Cal. Year/Month from the Time dimensioninto the Columns.

h) In the Filter tab, restrict Cal. Year/Month to January 2009 - March2009 in the Default Values area.

i) Use Drag&Drop to transfer Material from the Material dimension into theFree Characteristics.

j) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Result Query

Technical name: U##_QD_VAR006

Execute the query. Drill down by Material. How many materials areshown? Three materials are shown based on the output of the Pre-Querythat selected the materials sold only in certain European countries duringthe year 2009.

284 © 2011 SAP AG. All rights reserved. 2011

Page 303: BW305 BW Query Design and Analysis

BW305 Lesson: Transferring Values between Queries using Variables

Lesson Summary

You should now be able to:• Creating a replacement path processed Characteristic value variable to transfer

values from a Pre-Query to a Result-Set Query

2011 © 2011 SAP AG. All rights reserved. 285

Page 304: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson: Using Variable Offsets

Lesson OverviewBy using Variable Offset you will be able to reuse the same variable several times in aquery but returning a different set of values.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Create a variable using the Variable Offset parameter• Test a variable using the Variable Offset parameter

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able toreuse the same variables in a query with each variable occurrence returning a differentset of values.

Using Variable OffsetsTo analyze key figures that have a fixed time-relationship to one another, you can usethe variable offset. For example, you want to compare the sales volume from thecurrent time period with that of the same time period in the previous year. In yourreport definition, you can use the same variable several times to restrict the key figuresand determine a difference from the input value.

286 © 2011 SAP AG. All rights reserved. 2011

Page 305: BW305 BW Query Design and Analysis

BW305 Lesson: Using Variable Offsets

Figure 67: Variable Offset

You can also use the variable offset to select an interval as a restriction relativeto either the upper or lower value of a range. This can be achieved using only onevariable. To do this:

1. Use the Value Range option then select a variable as the upper value.2. Then select the same variable for the lower value.3. Now specify the variable offset for either the upper or lower limit.

2011 © 2011 SAP AG. All rights reserved. 287

Page 306: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

288 © 2011 SAP AG. All rights reserved. 2011

Page 307: BW305 BW Query Design and Analysis

BW305 Lesson: Using Variable Offsets

Exercise 14: Use Variable Offsets

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create a variable with an offset parameter value• Test a variable with an offset parameter value

Business ExampleYou are responsible for creating and using flexible reports in your company withdetailed information and free selection of characteristic values and must be able todefine variables with the variable offset parameter using the Variable Editor.

Task:To display the comparison of sales volumes in different time periods for chosenmaterials, use the variable parameter, Variable Offset, which will let you reuse thesame variable in the query with only a single manual user entry.

1. Open the query with the Technical Name U##_QD_VAR001 (or, if not availableuse query U00_QD_VAR001) based on the MultiProvider - Customer Sales(P_SALES01) InfoProvider in the Reporting Layer → Sales and DistributionInfoArea.

2. Copy the query as

Description: U## Query Variable Offset

Technical Name: U##_QD_VAR007

3. Delete the restricted key figure Sales Volume EUR &U##_VAR_TMF001&to &U##_VAR_TMT001& and use a copy of Sales Volume EUR(U##_VAR_TMF001 as an additional Key Figure with a variable offset of -1.

4. Save the query again and execute the query.

2011 © 2011 SAP AG. All rights reserved. 289

Page 308: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Solution 14: Use Variable OffsetsTask:To display the comparison of sales volumes in different time periods for chosenmaterials, use the variable parameter, Variable Offset, which will let you reuse thesame variable in the query with only a single manual user entry.

1. Open the query with the Technical Name U##_QD_VAR001 (or, if not availableuse query U00_QD_VAR001) based on the MultiProvider - Customer Sales(P_SALES01) InfoProvider in the Reporting Layer → Sales and DistributionInfoArea.

a) To open an existing query, open the Query Designer.

b) Choose InfoAreas → Reporting Layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01) → Open.

c) Double click on the query with the Technical Name U##_QD_VAR001.

d) Choose OK.

2. Copy the query as

Description: U## Query Variable Offset

Technical Name: U##_QD_VAR007

a) In the Query Designer, use the menu path

b) Choose Query → Save as and save the query under Roles → Role##(U##_Role) → Queries:

Description: U## Query Variable Offset

Technical Name: U##_QD_VAR007

Then click OK.

Continued on next page

290 © 2011 SAP AG. All rights reserved. 2011

Page 309: BW305 BW Query Design and Analysis

BW305 Lesson: Using Variable Offsets

3. Delete the restricted key figure Sales Volume EUR &U##_VAR_TMF001&to &U##_VAR_TMT001& and use a copy of Sales Volume EUR(U##_VAR_TMF001 as an additional Key Figure with a variable offset of -1.

a) Right click the restricted key figure Sales Volume EUR&U##_VAR_TMF001& to &U##_VAR_TMT001& and use the optionRemove to delete the key figure from the query.

b) Right click the restricted key figure Sales Volume EUR (U##_VAR_TMF001and chose the option Copy.

c) Right click the restricted key figure Sales Volume EUR (U##_VAR_TMF001and chose the option Paste.

d) From the context menu for the copied key figure, chose Edit.

e) From the context menu for the restricting variable U## Month Single ValueVariable (U##_VAR_MON001), choose Restrict.

f) In the Selection window right click on the variable and then choose thebutton Set offset for variable and enter -1.

4. Save the query again and execute the query.

a) To save the query, choose Save Query.

b) Execute the query.

2011 © 2011 SAP AG. All rights reserved. 291

Page 310: BW305 BW Query Design and Analysis

Unit 6: Working with Variables in Queries BW305

Lesson Summary

You should now be able to:• Create a variable using the Variable Offset parameter• Test a variable using the Variable Offset parameter

292 © 2011 SAP AG. All rights reserved. 2011

Page 311: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Maintain the various types of variables and their processing types• Creating Characteristic value variables in queries• Creating text variables in queries• Creating hierarchy and hierarchy node variables in queries• Create a formula variable in a query using the Variable Editor, which will insert

a value to be used in a formula Key Figure.• Using queries with variables that are delivered with Business Content• Creating a replacement path processed Characteristic value variable to transfer

values from a Pre-Query to a Result-Set Query• Create a variable using the Variable Offset parameter• Test a variable using the Variable Offset parameter

2011 © 2011 SAP AG. All rights reserved. 293

Page 312: BW305 BW Query Design and Analysis

Unit Summary BW305

294 © 2011 SAP AG. All rights reserved. 2011

Page 313: BW305 BW Query Design and Analysis
Page 314: BW305 BW Query Design and Analysis
Page 315: BW305 BW Query Design and Analysis

Unit Summary BW305

295 © 2011 SAP AG. All rights reserved. 2011

Page 316: BW305 BW Query Design and Analysis

Unit Summary BW305

296 © 2011 SAP AG. All rights reserved. 2011

Page 317: BW305 BW Query Design and Analysis

Unit 7Working with Exceptions and

Conditions in Queries

Unit OverviewThis unit shows you how to define and include exceptions and conditions in querydefinitions to further analyze a report. Exceptions allow you to highlight deviationsfrom threshold values. Conditions allow you to reduce report options to display datathat is most important.

Unit ObjectivesAfter completing this unit, you will be able to:

• Create exceptions in a query definition• Activate and deactivate exceptions within a report• Create conditions in a query definition using the BEx Query Designer• Activate and deactivate conditions within a report• Change and delete conditions

Unit ContentsLesson: Creating Exceptions in the BEx Query Designer .. . . . . . . . . . . . . . . . . . . .298

Exercise 15: Create Exceptions in the BEx Query Designer .. . . . . . . . . . . .307Lesson: Creating Conditions in the BEx Query Designer .. . . . . . . . . . . . . . . . . . . .314

Exercise 16: Create Conditions in the BEx Query Designer.. . . . . . . . . . . . .323

2011 © 2011 SAP AG. All rights reserved. 297

Page 318: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Lesson: Creating Exceptions in the BEx Query Designer

Lesson OverviewThis lesson shows you how to use the Exception Editor to define exceptions in a querydefinition in the BEx Query Designer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Create exceptions in a query definition• Activate and deactivate exceptions within a report

Business ExampleYou have been asked by the management of your organization to create a warningsystem within reports so that values that deviate from expected values are noticedby users at a glance. To accomplish this, you need to define threshold values withdifferent colors in an Exception on a query level.

Defining Exceptions in the Query Designer

Figure 68: Active Exception in a Web Analysis

298 © 2011 SAP AG. All rights reserved. 2011

Page 319: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

The functions in exception reporting enable you to select and highlight unusualdeviations of key figure values in a query. You can see deviations from predefinedthreshold values or intervals in the query result displayed in different colors if theexception is active. Early spotting of these deviations provides the basis for timelyand effective reactions.

Creating Exceptions

Figure 69: Creating a New Exception in the Query Designer

You create an exception in the Query Designer by selecting the icon from theQuery Designer toolbar to open the Exception Editor window. Right click anywherein the window and choose New Exception to create the new exception object. It willbe displayed in the Exception window as Exception # (where '#' is a sequentiallyassigned number starting with 1). Right click on this exception object and choose Editto begin creating the exception definition.

2011 © 2011 SAP AG. All rights reserved. 299

Page 320: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Figure 70: General Tab of the Exception Definition

On the General tab, you can set the default status, description and one or moreexception values. The default status is set via the Exception is Active checkbox. If thecheckbox is filled, the exception is applied as soon as you execute the query. In theBEx Analyzer, from the BEx toolbar choose, Insert List of Exceptions. There youhave the option of activating or deactivating the exception from there.

You can use exceptions to evaluate one or all key figures (structure elements) in yourquery definition. If you want to use exceptions selectively on specific key figures inyour query definition, you have to define an exception for each key figure accordingly.

Exception Values

On the Exception Values section of the General tab page, you enter your values by firstchoosing New. An alert level row is activated at the bottom of the screen consistingof the fields Alert Level, Operator and one or more Value fields, depending on theoperator chosen. You choose Transfer to add your entries to the list of exceptionvalues.

You can set the alert levels to the colors red (Bad 1, 2 and 3), yellow (Critical 1, 2 and3), and green (Good 1, 2 and 3), each in three shades, as required. These nine alertlevels are internally numbered and ranked as follows:

300 © 2011 SAP AG. All rights reserved. 2011

Page 321: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

Alert Level Name Alert Level Rank

Good 1 1

Good 2 2

Good 3 3

Critical 1 4

Critical 2 5

Critical 3 6

Bad 1 7

Bad 2 8

Bad 3 9

The colors relate to the color characteristic values of the format templates delivered bySAP and symbolize traffic light colors.

Hint: If you want to assign your own colors, choose Workbook Settingson the design toolbar in BEx Analyzer. So that these changes are kept inthe query, you have to save them in a workbook. In BEx Web applications,you can display exceptions using the background color of the cell and theicons option. The background colors are set in the portal theme. The iconsare stored in the MIME Repository.

You can include all values or specific intervals (for example, only those falling belowthe threshold value in the red area) in the threshold value catalog. You can enter fixedpoint or floating point numbers for the values you are defining.

With key figures values on the border between two alert levels, the highest alert levelrank is used. For example, take the scenario where there is an alert level of 'Between 0and 1000' using 'Bad 3' and another alert level defined as 'Between 1000 and 5000'using 'Critical 3', and the key figure being evaluated has a value of exactly 1000. Thekey figure value of 1000 is the common point between the two alert level ranges. Inthis case, the value will be assigned the color used for 'Bad 3' since it has a higher alertlevel rank as shown in the table above.

2011 © 2011 SAP AG. All rights reserved. 301

Page 322: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Figure 71: Definition and Display Tabs of the Exception Definition

Definition Tab

On the Definition tab of the exception definition, you can select to evaluate theexception against one or all of the key figure elements of the structure. There is also asetting for determining whether the exception is evaluated before or after any localcalculation within the query.

Display Tab

On the Display tab of the exception definition you have control over which cells of ananalysis receive the color for the determined alert level. If you select the checkbox forException Affects Data Cells, then the following choices can be made:

302 © 2011 SAP AG. All rights reserved. 2011

Page 323: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

Key Figure Choice Result

Evaluated StructureElement

The structure element chosen on the Definition tab will bethe one to receive the color assigned to the alert level.

All StructureElements

Regardless of which structure element is being evaluated inthe exception, all structure elements will receive the colorassigned to the alert level.

Following StructureElement

With this setting, you can evaluate one structure element,but then apply the color of the alert level to a differentstructure element.

If the checkbox for Exception Affects Characteristic Cells is selected, then you canselect from the following options:

Characteristic CellChoice

Result

Rows The color of the alert level determined by the exception isapplied to the characteristic values in the row where theexception occurs.

Columns The color of the alert level determined by the exceptionis applied to the characteristic value in the column wherethe exception occurs.

Rows and Columns The color of the alert level determined by the exception isapplied to the characteristic value in both the column androw where the exception occurs.

Cell Restrictions

On the Cell Restrictions tag page, you can specify whether the exception applies toboth detail and result (total) values or to only the result values. This setting is usedfor any characteristic that is not used in the Define Cell Restrictions area in the lowerpart of the screen.

2011 © 2011 SAP AG. All rights reserved. 303

Page 324: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Figure 72: Cell Restrictions Tab of the Exception Definition

In the Define Cell Restrictions window, you can choose New to define an operator foreach characteristic in the query definition, and a value for each operator. You alsochoose Transfer to add your restrictions to the list.

You have the following selection options for the operators:

EverythingThe cell context is not restricted. The exception applies for every drill-downstate of the characteristic.

Totals OnlyThe exception affects only the aggregated values of the characteristic.

Everything Except TotalsThe exception affects all values except for the aggregated values of thecharacteristic.

Fixed ValueThe exception applies only to a specific characteristic value of the characteristic,which you can determine in the search help in the Value field. You can also usea characteristic value variable here. To do this, select Variables Entry. Youare then given the option of using or changing an existing characteristic valuevariable, or of creating a new one.

304 © 2011 SAP AG. All rights reserved. 2011

Page 325: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

LevelThe exception applies only to specific hierarchy levels of the characteristic. Youenter the required hierarchy level in the Value field here.

Hint: If there is a characteristic in the drill-down that is not recorded in theDefine Cell Restrictions area, the effect that the exception has depends onwhether you selected Exception Affects Everything or Exception Only AffectsResults on the Cell Restrictions tab page. If you selected Exception AffectsEverything, it does not matter where you integrate the characteristic in thedrill-down; the exception is applied accordingly. However, if you selectedException Only Affects Results, you have to place this characteristic at the endof the drill-down, otherwise the exception does not take effect.

Changing and Deleting ExceptionsYou can change exceptions in the Query Designer by choosing Edit from the contextmenu of the exception definition and selecting the appropriate tab.

If you want to delete an exception, choose Remove from the context menu of theexception definition.

Hint: If you execute your report using your own web template, you cancreate, change, activate, and deactivate exceptions using the List of ExceptionsWeb item. You can delete an exception using the context menu only if youcreated the exception in the web application itself.

2011 © 2011 SAP AG. All rights reserved. 305

Page 326: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

306 © 2011 SAP AG. All rights reserved. 2011

Page 327: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

Exercise 15: Create Exceptions in the BExQuery Designer

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create exceptions in the BEx Query Designer• Display exceptions in a report

Business ExampleIn order to highlight values that exceed or fall short of specified thresholds in a report,you have to define these threshold values in a query definition. You have the task ofdetermining intervals for threshold values that you defined with your superiors, andintegrating these so that they can be accessed at any time. The management of yourorganization also wants to have the flexibility of defining threshold values in order touse and analyze reports taking market conditions into consideration.

Task:You need to define a query to use with exceptions.

1. Create a new query using the InfoProvider MultiProvider - Customer Sales(P_SALES01) within the Reporting Layer → Sales and Distribution InfoArea.Place the Characteristic Sold-to Party (T_SOLD_TO) from the CustomerDimension, the Characteristic Material (0MATERIAL) from the MaterialDimension, and the Characteristic Cal.year / month (0CALMONTH) from theTime Dimension in the Rows.

In the Columns, include the Sales Volume EUR (T_INVCD_V) Key Figure.

In the Characteristic Restriction area, place the Characteristic Sales Organization(0SALESORG) from the Sales Area Dimension and restrict it to GermanyFrankfurt (1000).

Also in the Characteristic Restriction area, place the Characteristic Cal.year /month (0CALMONTH) and restrict it to January 2009 - March 2009.

2. Define the following exception: Description: Exception AbsoluteValues and put a check in the Exception is Active checkbox. Exception Values:

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 307

Page 328: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Alert Level Operator Value Value

Bad 3 Less Than 10,000

Critical 2 Beetween 10,000 50,000

Good 1 Greater Than 50,000

In the first step, no more settings are necessary, so confirm your exception bychoosing OK.

3. Now save the query definition under Roles → Role## (U##_Role) → Queries:

Description: U## Query Exceptions

Technical name: U##_QD_EXC001.

Execute the query in the BEx Analyzer or in the Web.

4. You now see that all values of the Sales Volume EUR (T_INVCD_V) column arein color. What happens in the report if you check the button Exception OnlyAffects Results on the Cell Restrictions tab page in the exception definition?

_____________________________________________________________________

5. Which further settings do you have to implement to evaluate only the results ofthe Characteristic Cal.year / month (0CALMONTH) by the exception?

6. In the executed report, remove the Characteristic Cal. year / month from thedrill-down. Does the exception still work?

_____________________________________________________________________

7. Stay in the executed report, insert the Characteristic Cal. year / month backinto the drill-down, but now, remove the Characteristic Sold-to Party from thedrill-down. What do you notice now?_____________________________________________________________________

308 © 2011 SAP AG. All rights reserved. 2011

Page 329: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

Solution 15: Create Exceptions in the BExQuery DesignerTask:You need to define a query to use with exceptions.

1. Create a new query using the InfoProvider MultiProvider - Customer Sales(P_SALES01) within the Reporting Layer → Sales and Distribution InfoArea.Place the Characteristic Sold-to Party (T_SOLD_TO) from the CustomerDimension, the Characteristic Material (0MATERIAL) from the MaterialDimension, and the Characteristic Cal.year / month (0CALMONTH) from theTime Dimension in the Rows.

In the Columns, include the Sales Volume EUR (T_INVCD_V) Key Figure.

In the Characteristic Restriction area, place the Characteristic Sales Organization(0SALESORG) from the Sales Area Dimension and restrict it to GermanyFrankfurt (1000).

Also in the Characteristic Restriction area, place the Characteristic Cal.year /month (0CALMONTH) and restrict it to January 2009 - March 2009.

a) In the BEx Query Designer choose New Query and select InfoAreas,Reporting Layer → Sales and Distribution → MultiProvider - CustomerSales (P_SALES01) and choose Open.

b) Place Sold to party (T_SOLD_TO) from the Customer Dimension,Material(0MATERIAL) from the Material Dimension, and Cal.year / month(0CALMONTH) from the Time Dimension in the Rows.

c) Place the Key Figure Sales Volume EUR (T_INVCD_V) in the Columns.

d) Include Sales Organization (SALESORG) from the Sales Area Dimensionin the Characteristic Restriction area and restrict it to Germany Frankfurt(1000).

e) Include Cal. Year/Month (0CALMONTH) in the Characteristic Restrictionarea and restrict it to January 2009 - March 2009.

2. Define the following exception: Description: Exception AbsoluteValues and put a check in the Exception is Active checkbox. Exception Values:

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 309

Page 330: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Alert Level Operator Value Value

Bad 3 Less Than 10,000

Critical 2 Beetween 10,000 50,000

Good 1 Greater Than 50,000

In the first step, no more settings are necessary, so confirm your exception bychoosing OK.

a) In the BEx Query Designer toolbar, choose the Exceptions button. Rightmouse click in the Exceptions area, then New Exception. Enter the contextmenu of the new Exception 1 and choose Edit.

b) On the General tab page, enter the description Exception AbsoluteValues and ensure that Exception Is Active is checked.

c) Under Define Exception Values, enter the different alert levels listed in thetable above by using the buttons New and Transfer.

d) Do not make any changes on the other tab pages and save your exceptionby choosing OK.

3. Now save the query definition under Roles → Role## (U##_Role) → Queries:

Description: U## Query Exceptions

Technical name: U##_QD_EXC001.

Execute the query in the BEx Analyzer or in the Web.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Exceptions

Technical name: U##_QD_EXC001.

b) Then, choose Exit and use the query or Execute.

4. You now see that all values of the Sales Volume EUR (T_INVCD_V) column arein color. What happens in the report if you check the button Exception OnlyAffects Results on the Cell Restrictions tab page in the exception definition?

Continued on next page

310 © 2011 SAP AG. All rights reserved. 2011

Page 331: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

_____________________________________________________________________

a) In the BEx Query Designer, go to the Exceptions tab page, in the contextmenu of the Exception Absolute Values, choose Edit. On the CellRestrictions tab page, check the button Exception Only Affects Results,press OK. Alternatively you can change the settings of the exceptions byusing the Properties tab page directly in the Query Designer.

b) Save the query and execute it again. The result in the report is that onlythe overall result of the Sales Volume EUR (T_INVCD_V) Key Figureis in color.

5. Which further settings do you have to implement to evaluate only the results ofthe Characteristic Cal.year / month (0CALMONTH) by the exception?

a) You have to go to the Exceptions area, enter the exception ExceptionsAbsolute Values, open the Cell Restrictions tab page and assign thefollowing operators to the different characteristics used in the querydefinition by using the New button and the Transfer button:

Sold-to party ––> Everything Except Totals

Material ––> Everything Except Totals

Cal. year / month ––> Totals only

To define these settings there's not the opportunity to use the Properties tabpage directly in the Query Designer.

b) Save the query and execute it again and check the effect of changing thesettings of the exception.

6. In the executed report, remove the Characteristic Cal. year / month from thedrill-down. Does the exception still work?

_____________________________________________________________________

a) In the BEx Analyzer, removeCal. year / month by clicking with the rightmouse button and choosing Remove Drilldown. If you are using a Webreport, remove the Characteristic from the navigation block or the table byclicking with the right mouse button and choosing Remove Drilldown.

Now you don't see the Key Figure's single values for the CharacteristicCal. year / month any more, but its' results, so the exception still worksand the coloring is still there.

7. Stay in the executed report, insert the Characteristic Cal. year / month backinto the drill-down, but now, remove the Characteristic Sold-to Party from thedrill-down. What do you notice now?

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 311

Page 332: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

_____________________________________________________________________

a) You can see that the Key Figure values are no longer shaded by theexception.

This is because you now see the results of the Characteristic Sold-toParty in the report, and the results of this Characteristic are notaffected by the exception since the cell restriction is “EverythingExcept Totals”.

312 © 2011 SAP AG. All rights reserved. 2011

Page 333: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Exceptions in the BEx Query Designer

Lesson Summary

You should now be able to:• Create exceptions in a query definition• Activate and deactivate exceptions within a report

2011 © 2011 SAP AG. All rights reserved. 313

Page 334: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Lesson: Creating Conditions in the BEx Query Designer

Lesson OverviewThis lesson shows you how to define threshold values and ranked lists in the BExQuery Designer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Create conditions in a query definition using the BEx Query Designer• Activate and deactivate conditions within a report• Change and delete conditions

Business ExampleYou are responsible for developing queries that allow the sales department to flexiblyrestrict a report so that only the most important information displays. You now havethe task of using conditions within a query definition in order to meet the aims of thesales department. This should enable a more efficient analysis of data when largeamounts of data are analyzed.

314 © 2011 SAP AG. All rights reserved. 2011

Page 335: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

Defining Conditions

Figure 73: Focusing Data Using Conditions

By defining a condition, you have the option of analyzing the query results in moredetail. You can analyze combinations of characteristics using ranked lists, displayingyour ten best customers by sales revenue, for example. By defining value limits, youcan display all key figure values above or below a certain value. The data is restrictedaccordingly in the results area of the query so that you only see the area that interestsyou. You can define multiple conditions for a query, and then activate or deactivatethem in the report itself to create different views of the data.

You can make restrictions in the Query Designer, using the toolbar button Condition. As a prerequisite, you must have created a query definition for which one or

more conditions can be defined.

2011 © 2011 SAP AG. All rights reserved. 315

Page 336: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Figure 74: Defining a New Condition in the Query Designer (1)

Within the conditions pane that appears right click and chose the menu option NewCondition. A new condition is created with a temporary name. You must double-clickon this new object (or select it first then use the menu option Edit) to define thesettings for the condition.

316 © 2011 SAP AG. All rights reserved. 2011

Page 337: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

Figure 75: Defining a New Condition in the Query Designer (2)

The General Tab appear first. Here enter a Description and set the condition to Active.If the condition has the status Active, that condition is used in the report as soon asyou execute the query. If you do not set the active flag, the condition can be activatedin the report itself.

2011 © 2011 SAP AG. All rights reserved. 317

Page 338: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Figure 76: Conditions : General Tab

FeaturesIn Define Condition Parameters, choose New to select a Key Figure for which acondition is to be used. In the second field, you can see the operators for specifyingvalue definitions. You choose Transfer to add your entries to the list of conditions andchoose New to define more conditions. You save your conditions by choosing OK;you can then display your report in the BEx Analyzer or in the web.

Hint: A condition row consists of a key figure, an operator, and a value forthe operator. In query definitions that contain two structures, there is anadditional field for defining a structural component.

318 © 2011 SAP AG. All rights reserved. 2011

Page 339: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

You can use the following operators for threshold value conditions:

• Equal to

Example: Invoiced quantity equals 1000

• Not Equal to

Example: Line item not equal to 5

• Less than

Example: Sales revenue less than 100,000 EUR

• Greater than

Example: Incoming orders greater than 1,000,000 EUR

• Less than or equal to

Example: Sales revenue less than or equal to 100,000 EUR

• Greater than or equal to

Example: Incoming orders greater than or equal to 1,000,000 EUR

• Between

Example: Sales from/to, with the option of defining these values using a variablerequest

• Not Between

Example: Sales from/to excluded from display, with the option of defining thesevalues flexibly at runtime.

Hint: In the variable definition, select Variable Entry. You are thengiven the option of choosing an existing variable from the drop-downlist, changing the variable or creating a New Variable.

2011 © 2011 SAP AG. All rights reserved. 319

Page 340: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

You can use the following operators for ranked list functions:

• Top N

Example: Display the sales revenue of the top 5 customers

• Bottom N

Example: Display the bottom 3 (lowest) incoming orders

• Top %

Example: Restriction to 20% of the best revenue, in order

• Bottom %

Example: List of 15% of the customers with the lowest sales revenue, in order

• Top Sum

Example: You get a list of the products with the highest sales revenues wherethe total sales revenue makes up 20,000 EUR. All sales revenues are sorted indescending order and then the sum is calculated until the threshold value of20,000 EUR is exceeded. All products, including the product that takes the salesvolume over the 20,000 EUR mark, are listed.

• Bottom Sum

Example: Same as the Top Sum but here, a ranked list is sorted in ascendingorder of products with the weakest sales revenue until a sum greater than orequal to 20,000 EUR is reached. All products, including the product that takesthe sum over the 20,000 EUR mark are also listed here.

Caution: When you execute a report with an active condition, you alwayssee the unconditional query result in the Overall Result row (overall resultwithout filter). If you want to see the filtered (conditional) query result,from the context menu in the BEx Analyzer, you can choose Properties →Calculations → Calculate Result As → Summation. If you are using the webbrowser, you can call the context menu and then choose Attributes → DataCell→ Result Calculations → Sum .

320 © 2011 SAP AG. All rights reserved. 2011

Page 341: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

On the Characteristic Assignments tab you define how the condition will work inconjunction with the Characteristics in your query . If the query contains manydrill-down Characteristics it is very easy for the condition to be out of context andproduce invalid results. You can decide between the following options:

• All characteristics in the drill-down independently

The condition is always valid for all characteristic combinations.

• Most detailed characteristic along the rows

The condition will be applied to the most detailed characteristic along the rows.

• Most detailed characteristic along the columns

The condition will be applied to the most detailed characteristic along thecolumns.

• Individual Characteristic and Characteristic combinations

For this setting, you define precisely which characteristics must be in the drilldown before the condition is valid. Check the boxes to include them.

Figure 77: Conditions : Characteristic Assignment Tab

2011 © 2011 SAP AG. All rights reserved. 321

Page 342: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Using Several Conditions in a ReportIf you are using several conditions in one report, conflicts can arise that lead toautomatic deactivation. The following status descriptions appear in the display:

• Not Applicable

Reason:

The condition relates to a characteristic or characteristic combination thatis not included in the drill-down.

• Not Used (Inactive)

Reason:

The condition relates to a characteristic that is drilled down using an activedisplay hierarchy, orthe condition relates to a characteristic that is included through theactivation of another condition, leading to a collision, and is thereforedeactivated (however, you can reactivate this condition and automaticallydeactivate the last condition activated).

Caution: If you activate a condition for a combination of characteristics,the results row no longer displays.

Changing and Deleting ConditionsYou can change conditions in the Query Designer by choosing Edit from the contextmenu of the condition definition and selecting the appropriate tab.

If you want to delete a condition, choose Remove from the context menu of thecondition definition.

Hint: If you execute your report using your own web template, you cancreate, change, activate, and deactivate conditions using the List of ConditionsWeb item. You can delete a condition using the context menu only if youcreated the exception in the web application itself.

322 © 2011 SAP AG. All rights reserved. 2011

Page 343: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

Exercise 16: Create Conditions in the BExQuery Designer

Exercise ObjectivesAfter completing this exercise, you will be able to:• Define conditions in the BEx Query Designer and display them in a report• Display a report containing conditions

Business ExampleYou can define conditions to considerably reduce the volume of data in a report.

Task 1:Structure your query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider and include several conditions so that they can be activated as requiredin the report. To ensure a certain amount of flexibility, you want to use variablesin one of the conditions.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01)InfoProvider within the Reporting Layer → Sales and Distribution InfoArea.

Move the Characteristics Division (0DIVISION) and Material (0MATERIAL)into the Free Characteristics area.

Move the Characteristic Sold to Party (T_SOLD_TO) into the Rows and the KeyFigure Sales Volume EUR (T_INVCD_V) into the Columns. Specify Summationas the result calculation for the Key Figure.

2. Define the first condition with the Description Top 5 and Bottom 3 AllChar. . Ensure that the condition applies to the Key Figure Sales Volume EURand for All Characteristics in the Drilldown Independently. The condition is to beactivated as required after the report is executed and not in the query definition.

3. Now create a second, not active condition with the description < 1000Comb.Sold-to Party, Division restricted to characteristics Sold toParty and Division and applied to the Sales Volume EUR key figure.

4. Define the third, not active condition with the description Variable ValuesAll Char.. Specify that the condition applies for All Characteristicsin the Drilldown Independently and for the Key Figure Sales VolumeEUR, use the operator Between and the variables Variable From Value 1M(U00_VAR_FROM001) and Variable Till Value 10M (U00_VAR_TIL001).

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 323

Page 344: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

5. Define the fourth and final, not active condition with the Description BottomSum 1000 Material restricted to the single Characteristic Material andapplied to the Sales Volume EUR Key Figure.

6. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions

Technical name: U##_QD_COND001

Execute the query in the Web Analyzer and see the function of each of theconditions by activating and deactivating them.

7. Choose the Settings link and the tab Conditions to access and activate/deactivateusing Toggle State all existing conditions.

Activate and deactivate the different conditions and extend the results area oryour table using the free characteristics available.

Task 2:Optional

Create a Pre-Query to deliver values for a Characteristic value variable with thereplacement path used in a Result-Query.

1. Create a new query as Pre-Query based on the Order Details (P_SD01) DSO inthe Reporting Layer → Sales and Distribution InfoArea.

Place the Characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Net value (0NET_VALUE) in the Columns andrestrict the key figure using Calendar day (0CALDAY) from 01.01.2009 to31.12.2009.

Define a condition to evaluate the Top 5 Materials concerning the key figure Netvalue (0NET_VALUE). As the key figure contains different currencies a currencytranslation in the properties of the key figure is necessary:

Use the Conversion Type Fixed target currency, current date (MT)(MEANTODAY) and the Target Currency Euro (EUR)

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions (Pre-Query)

Technical name: U##_QD_PRE001

Execute the query and take note of the individual materials items listed.

Continued on next page

324 © 2011 SAP AG. All rights reserved. 2011

Page 345: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

Finally, close the query.

2. Create a second query as a Result Query based on the MultiProvider -Customer Sales (P_SALES01) InfoProvider in the Reporting Layer → Sales andDistribution InfoArea. This query uses the results from the Pre-Query.

Place the characteristic Material (0MATERIAL) into the Free Characteristicsarea and additionally into the Characteristic Restrictions area on the Filter tab.

There, restrict it to the values found out by your Pre-Query U##_QD_PRE001using a Characteristic value variable with replacement path.

Variable Description: U## Variable Top 5 Materials

Variable name: U##_VAR_PATH002

Include the Characteristic Cal. Year/Month (0CALMONTH) into the Columnsand additionally into the Characteristic Restrictions area in order to restrict itto 01.2009 - 03.2009 .

From the Sales Area Dimension, select Sales Organization, place it in the Rowsand additionally into the Characteristic Restrictions area in order to restrict it toGermany Frankfurt (1000).

Include the Basic Key Figure Invoiced Quantity (0INVCD_QTY) in the Columns.

Save the query in your Reporting role in the Queries folder as:

Description: U## Query Conditions Results

Technical name: U##_QD_RES001

Execute the query and drill down by Material. How many materials are shown?Compare the material numbers shown from the material numbers you previouslyrecorded from the Pre-Query.

2011 © 2011 SAP AG. All rights reserved. 325

Page 346: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Solution 16: Create Conditions in the BExQuery DesignerTask 1:Structure your query based on the MultiProvider - Customer Sales (P_SALES01)InfoProvider and include several conditions so that they can be activated as requiredin the report. To ensure a certain amount of flexibility, you want to use variablesin one of the conditions.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01)InfoProvider within the Reporting Layer → Sales and Distribution InfoArea.

Move the Characteristics Division (0DIVISION) and Material (0MATERIAL)into the Free Characteristics area.

Move the Characteristic Sold to Party (T_SOLD_TO) into the Rows and the KeyFigure Sales Volume EUR (T_INVCD_V) into the Columns. Specify Summationas the result calculation for the Key Figure.

a) In the BEx Query Designer choose New Query and select InfoAreas,Reporting Layer → Sales and Distribution → MultiProvider - CustomerSales (P_SALES01) and choose Open.

b) From the Sales Area Dimension, move Division to the Free Characteristicsarea.

c) From the Material Dimension, move Material to the Free Characteristicsarea.

d) Move the Characteristic Sold to Party (T_SOLD_TO) into the Rows.

e) Move the Key Figure Sales Volume EUR (T_INVCD_V) into theColumns.To specify the appropriate result calculation, go to Properties →Calculations → Calculate Result As and select Summation.

Continued on next page

326 © 2011 SAP AG. All rights reserved. 2011

Page 347: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

2. Define the first condition with the Description Top 5 and Bottom 3 AllChar. . Ensure that the condition applies to the Key Figure Sales Volume EURand for All Characteristics in the Drilldown Independently. The condition is to beactivated as required after the report is executed and not in the query definition.

a) Press the Conditions button in the BEx Query Designer toolbar. TheConditions area opens. Right-mouse-click within this area, and thenchoose New Condition. Double-click or Right-mouse-click → Edit on thenew Condition 1.

b) General tab page:

Description: Top 5 and Bottom 3 All Char.

Remove the check from the Condition is Active box.

Fill in the Condition parameters by pressing the New button.

Key Figures Operator Values

Sales Volume EUR(T_INVCD_V)

Top N 5

Sales Volume EUR(T_INVCD_V)

Bottom N 3

Select Transfer after each one to add it to the condition.

Characteristic Assignment tab page:

All Characteristics in the Drilldown Independently

Confirm with OK.

3. Now create a second, not active condition with the description < 1000Comb.Sold-to Party, Division restricted to characteristics Sold toParty and Division and applied to the Sales Volume EUR key figure.

a) Right-mouse-click within the Conditions area, and then New Condition.Double-click or Right-mouse-click → Edit on the new Condition 2.

b) General tab page:

Description: < 1000 Comb.Sold-to Party, Division

Remove the check from the Condition is Active box.

Condition parameters:

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 327

Page 348: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Key Figures Operator Values

Sales Volume EUR(T_INVCD_V)

Less Than 1000

Characteristic Assignment tab page:

Individual Characteristics. and Char. Combinations.

Select the characteristics Sold to Party and Division.

4. Define the third, not active condition with the description Variable ValuesAll Char.. Specify that the condition applies for All Characteristicsin the Drilldown Independently and for the Key Figure Sales VolumeEUR, use the operator Between and the variables Variable From Value 1M(U00_VAR_FROM001) and Variable Till Value 10M (U00_VAR_TIL001).

a) General tab page:

Description: Variable Values All Char.

Remove the check from the Condition is Active box.

Condition parameters:

Key Figures Op-era-tor

From Value To Value

Sales Volume EUR(T_INVCD_V)

Be-tween

Variable: Fromvalue(U00_VAR_FROM001)Default Value:1.000.000

Variable: Till Value(U00_VAR_TIL001)Default Value:10.000.000

Characteristic Assignment tab page:

All Characteristics in the Drilldown Independently

Continued on next page

328 © 2011 SAP AG. All rights reserved. 2011

Page 349: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

5. Define the fourth and final, not active condition with the Description BottomSum 1000 Material restricted to the single Characteristic Material andapplied to the Sales Volume EUR Key Figure.

a) General tab page:

Description: Bottom Sum 1000 Material

Remove the check from the Condition is Active box.

Condition parameters:

Key Figures Operator Values

Sales Volume EUR(T_INVCD_V)

Bottom Total 1000

Characteristic Assignment tab page:

Individual Chars. and Char. Combinations.

Select the Characteristic Material.

6. Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions

Technical name: U##_QD_COND001

Execute the query in the Web Analyzer and see the function of each of theconditions by activating and deactivating them.

a) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions

Technical name: U##_QD_COND001

Then, choose Execute.

b) In the variable dialog box, select OK to accept the default values fromthe variables.

7. Choose the Settings link and the tab Conditions to access and activate/deactivateusing Toggle State all existing conditions.

Activate and deactivate the different conditions and extend the results area oryour table using the free characteristics available.

a) Activate and deactivate the different conditions in various combinations andextend the results area of your table using the free characteristics available.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 329

Page 350: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Task 2:Optional

Create a Pre-Query to deliver values for a Characteristic value variable with thereplacement path used in a Result-Query.

1. Create a new query as Pre-Query based on the Order Details (P_SD01) DSO inthe Reporting Layer → Sales and Distribution InfoArea.

Place the Characteristic Material (0MATERIAL) into the Rows.

Include the basic key figure Net value (0NET_VALUE) in the Columns andrestrict the key figure using Calendar day (0CALDAY) from 01.01.2009 to31.12.2009.

Define a condition to evaluate the Top 5 Materials concerning the key figure Netvalue (0NET_VALUE). As the key figure contains different currencies a currencytranslation in the properties of the key figure is necessary:

Use the Conversion Type Fixed target currency, current date (MT)(MEANTODAY) and the Target Currency Euro (EUR)

Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions (Pre-Query)

Technical name: U##_QD_PRE001

Execute the query and take note of the individual materials items listed.

Finally, close the query.

a) To define a new query, open the Query Designer and choose New Query →InfoAreas→ Reporting Layer → Sales and Distribution → Order Details(P_SD01) → Open.

b) Use Drag&Drop to transfer Material from the Key part into the Rows.

c) Use Drag&Drop to include the Basic Key Figure Net value (0NET_VALUE)into the Columns.

d) In the Properties of the Basic Key Figure, select the Conversions tab. Inthe field Conversion Type select the value Fixed target currency, currentdate (MT) (MEANTODAY) and in the field Target Currency select thevalue Euro (EUR).

e) Restrict the Key Figure using Calendar day (0CALDAY) restricted to valuesfrom 01.01.2009 to 31.12.2009.

Continued on next page

330 © 2011 SAP AG. All rights reserved. 2011

Page 351: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

f) Now define the condition. Press the Conditions button in the BEx QueryDesigner toolbar. The Conditions area opens. Right click within this area,and then choose New Condition. Double-click or Right mouse click →Edit on the new Condition 1.

g) General tab page:

Description: Top 5 Materials.

Condition is Active box has to be checked.

Fill in the Condition parameters: by pressing the New button.

Key Figures Operator Values

Net value(0NET_VALUE)

Top N 5

Characteristic Assignment tab page:

All Characteristics in the Drilldown Independently

Confirm with OK.

h) Save the query under Roles → Role## (U##_Role) → Queries:

Description: U## Query Conditions (Pre-Query)

Technical name: U##_QD_PRE001

i) Execute the query and take note of the individual materials items listed.

j) Close the query.

2. Create a second query as a Result Query based on the MultiProvider -Customer Sales (P_SALES01) InfoProvider in the Reporting Layer → Sales andDistribution InfoArea. This query uses the results from the Pre-Query.

Place the characteristic Material (0MATERIAL) into the Free Characteristicsarea and additionally into the Characteristic Restrictions area on the Filter tab.

There, restrict it to the values found out by your Pre-Query U##_QD_PRE001using a Characteristic value variable with replacement path.

Variable Description: U## Variable Top 5 Materials

Variable name: U##_VAR_PATH002

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 331

Page 352: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Include the Characteristic Cal. Year/Month (0CALMONTH) into the Columnsand additionally into the Characteristic Restrictions area in order to restrict itto 01.2009 - 03.2009 .

From the Sales Area Dimension, select Sales Organization, place it in the Rowsand additionally into the Characteristic Restrictions area in order to restrict it toGermany Frankfurt (1000).

Include the Basic Key Figure Invoiced Quantity (0INVCD_QTY) in the Columns.

Save the query in your Reporting role in the Queries folder as:

Description: U## Query Conditions Results

Technical name: U##_QD_RES001

Execute the query and drill down by Material. How many materials are shown?Compare the material numbers shown from the material numbers you previouslyrecorded from the Pre-Query.

a) To define a new query, open the Query Designer and choose New Query →InfoAreas→ Reporting Layer → Sales and Distribution → MultiProvider -Customer Sales (P_SALES01) → OK.

b) Use Drag&Drop to transfer Material from the Material Dimension into theFree Characteristics and additionally into the Characteristic Restrictionsarea on the Filter tab.

c) There, from the context menu for Material, choose Restrict → Show:Variables → Type: Characteristic Value Variable and press the buttonCreate New Variable.

d) On the General tab page, enter:

Description: U## Variable Top 5 Materials

Variable technical name: U##_VAR_PATH002

Processing by: Replacement Path

Ref. Characteristic: Material

On the Replacement Path tab page, select:

Replace Variable With: Query

Query: U##_QD_PRE001

Choose OK.

Find and select your variable and then choose OK.

Continued on next page

332 © 2011 SAP AG. All rights reserved. 2011

Page 353: BW305 BW Query Design and Analysis

BW305 Lesson: Creating Conditions in the BEx Query Designer

e) Use Drag&Drop to transfer Cal. Year/Month from the Time Dimension intothe Columns and additionally into the Characteristic Restrictions area ofthe Filter tab and restrict it to 01.2009 - 03.2009 .

f) Use Drag&Drop to transfer Sales Organization from the Sales AreaDimension into the Rows and additionally into the CharacteristicRestrictions area on the Filter tab and then restrict it to GermanyFrankfurt (1000) .

g) Use Drag&Drop to include the Basic Key Figure Invoiced Quantity(0INVCD_QTY) into the Columns.

h) Save the query in your Reporting role in the Queries folder as:

Description: U## Query Conditions Results

Technical name: U##_QD_RES001

Execute the query. Drill down by Material. How many materials areshown? Five materials are shown based on the result of the Pre-Querythat selected the top five materials. Compare the material numbers shownfrom the material numbers you previously recorded from the Pre-Query.They are identical.

2011 © 2011 SAP AG. All rights reserved. 333

Page 354: BW305 BW Query Design and Analysis

Unit 7: Working with Exceptions and Conditions in Queries BW305

Lesson Summary

You should now be able to:• Create conditions in a query definition using the BEx Query Designer• Activate and deactivate conditions within a report• Change and delete conditions

334 © 2011 SAP AG. All rights reserved. 2011

Page 355: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Create exceptions in a query definition• Activate and deactivate exceptions within a report• Create conditions in a query definition using the BEx Query Designer• Activate and deactivate conditions within a report• Change and delete conditions

2011 © 2011 SAP AG. All rights reserved. 335

Page 356: BW305 BW Query Design and Analysis

Unit Summary BW305

336 © 2011 SAP AG. All rights reserved. 2011

Page 357: BW305 BW Query Design and Analysis
Page 358: BW305 BW Query Design and Analysis
Page 359: BW305 BW Query Design and Analysis

Unit Summary BW305

337 © 2011 SAP AG. All rights reserved. 2011

Page 360: BW305 BW Query Design and Analysis

Unit Summary BW305

338 © 2011 SAP AG. All rights reserved. 2011

Page 361: BW305 BW Query Design and Analysis

Unit 8InfoProviders in SAP NetWeaverBusiness Warehouse Reporting

Unit OverviewThe unit shows you the differences between the InfoProviders, which can be used inthe BEx Query Designer and which role they play in different reporting scenarios.

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe the differences between the various InfoProviders• Select the InfoProviders according to their use in creating reports• Use the different generated elements of InfoProviders found in the BEx Query

Designer

Unit ContentsLesson: InfoProviders in SAP NetWeaver Business Warehouse ... . . . . . . . . .340Lesson: InfoProviders in the BEx Query Designer .. . . . . . . . . . . . . . . . . . . . . . . . . . . .346

2011 © 2011 SAP AG. All rights reserved. 339

Page 362: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

Lesson: InfoProviders in SAP NetWeaver BusinessWarehouse

Lesson OverviewThis lesson shows you the differences between the various InfoProviders that can beused in the BEx Query Designer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe the differences between the various InfoProviders

Business ExampleYou are responsible for creating many different reports in your SAP NetWeaver BWsystem. You need to know the differences between the InfoProviders and how tochoose the best one as a query data provider.

InfoProviders in SAP NetWeaver BW ReportingInfoProviders are objects for which you can create and execute queries in SAPNetWeaver BW. These include objects that physically store data - the data targets, suchas InfoCubes, DataStore Objects, and InfoObjects (Characteristics with Attributes orTexts). InfoProviders also include objects that do not contain any physical data, suchas InfoSets, VirtualProviders and MultiProviders. The term “InfoProvider” is thegeneric term used to describe any objects or views relevant to reporting.

340 © 2011 SAP AG. All rights reserved. 2011

Page 363: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in SAP NetWeaver Business Warehouse

Figure 78: InfoProvider Overview

• Data Targets

Data targets are SAP NetWeaver BW objects that have their own data store(which means they physically contain data). These objects include InfoCubes,DataStore Objects and InfoObjects (characteristics with attributes or texts). Thesystem supplies data targets with data from the source systems using a loadprocess (or by writing directly into the tables for real-time object types). Datatargets become InfoProviders if they are used in BEx reporting.

Note: Characteristic InfoObjects have to be included in the InfoProvidertree in the Data Warehousing Workbench to make them available as datatargets and as InfoProviders for reporting.

InfoCubesIn reporting, an InfoCube is a self-contained dataset (for example, abusiness area). You can analyze this data in a BEx query. The tables in anInfoCube are structured in a star schema (multidimensional data model).

Note: InfoCubes that physically contain data in the SAP NetWeaverBW system are called Standard InfoCubes (type of InfoCube thatdistinguishes them from virtual types, see below).

2011 © 2011 SAP AG. All rights reserved. 341

Page 364: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

DataStore ObjectsDataStore Objects store consolidated and cleansed data on a detailed(granular or atomic) level. In reporting, you use DataStore Objects fordetailed reporting in SAP NetWeaver BW, for example, for reporting onindividual business documents (orders, invoices etc).A DataStore Object describes a consolidated data set from one or more datasources. DataStore Objects are available for transaction data and formaster data. You can analyze this data set in a BEx query.In contrast to multidimensional data stores for InfoCubes, data in DataStoreObjects is stored in flat database tables. A DataStore Object contains akey (for example, document number, item number), as well as data fields,which can contain Key Figures or Characteristics (for example, customer,invoice quantity). You can transfer DataStore Object data into connectedInfoCubes or into additional DataStore Objects in the same system or evenin a different system.

Characteristic InfoObjectsCharacteristic InfoObjects can have tables into which the master datainformation (Attributes, Texts, Hierarchies) is loaded from the sourcesystem.Once you have included a Characteristic InfoObject in the InfoProvidertree, you can use it as an InfoProvider for BEx reporting.You use these InfoProviders for master data reporting in SAP NetWeaverBW.

• InfoProviders Without Their Own Data Store

VirtualProviderA VirtualProvider is an InfoCube whose transaction data is not physicallymanaged in SAP NetWeaver BW, but stored externally in the source system.Only the multidimensional structure of the VirtualProvider is defined in theSAP NetWeaver BW system. The data for reporting is read online fromanother system. In reporting, you define queries on VirtualProviders in thesame way as you define queries on Standard InfoCubes.

Note: However, since the data is read online from the sourcesystem, the performance differs when you execute reports forVirtualProviders. Therefore, we recommend that you only useVirtualProviders in specific, well planned, scenarios (with smallquantities of data and relatively infrequent data requests with arestricted number of users).

BW InfoSets

342 © 2011 SAP AG. All rights reserved. 2011

Page 365: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in SAP NetWeaver Business Warehouse

BW InfoSets do not have a data store of their own, but instead connectcertain InfoProvider tables using joins. Therefore provide an additionalsemantic layer (reporting-relevant view) for BEx reporting.You can create BW InfoSets from InfoCubes (only Standard type),DataStore Objects and Characteristic InfoObjects with master data.

Note: BW InfoSets enable temporal joins with which you cancreate reports depicting changes over time. For example, a linkfrom document data in a DataStore Object to time-dependentmaster data (for example, link a sales transaction to the masterdata of the person who was head of the department at the time ofthe transaction).

HybridProviderThere are two types of HybridProvider: HybridProviders based on aDataStore object and HybridProviders based on direct access.The HybridProvider based on a DataStore object is a combination ofDataStore object and InfoCube. The newest data here is in the DataStoreobject. The InfoCube serves as an aggregate. By storing the InfoCube datain the BW Accelerator, you indirectly index DataStore object data there too.You should use a HybridProvider based on a DataStore object as theInfoProvider when you load data using real-time data acquisition. A datatransfer process for real-time data acquisition fills the DataStore object inthe HybridProvider with current data in real time. The daemon for real-timedata acquisition activates this data, ensuring that the data is immediatelyavailable for analysis purposesThe HybridProvider on direct access is based on a combination ofVirtualProvider and InfoCube. The newest data is not replicated into BW.It is read directly in the source system using the VitualProvider instead.You have access to real-time data without having to set up real-time dataacquisition. There is no wait time as compared to real-time data acquisition,where the data is available in real time but not immediately.

TransientProviderA TransientProvider derived from a Classic InfoSet is an InfoProvider thatallows access to the data of an InfoSet from BI tools without the need forthe InfoProvider to be modeled in the SAP NetWeaver BW system or forthe data to be replicated in the SAP NetWeaver BW system.Note that the term InfoSets here relates to SAP Application Server (AS)objects that can be created in every SAP system and that are referred to asClassic InfoSets in the context of SAP NetWeaver BW

CompositeProvider

2011 © 2011 SAP AG. All rights reserved. 343

Page 366: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

A CompositeProvider is an InfoProvider that brings together data from oneor more analytical indexes (by Join or Union) and makes it available forreporting and analysis. The CompositeProvider is defined in a graphicalenvironment allowing for rapid modeling. This makes it possible to bringtogether data from multiple sources using analytical indexes and to quicklyput together a prototype. Storing the data in BW Accelerator also ensuresfaster access to data in the query.The prerequisites here is that you are using SAP NetWeaver BWAccelerator.

• MultiProviders

A MultiProvider combines data from several InfoProvider tables and makes itavailable for use in reporting. The MultiProvider does not contain its own data.Its data comes exclusively from the InfoProviders on which it is based. You cancreate a MultiProvider from any combination of InfoProviders except otherMultiProviders..

Note: MultiProviders are based on a union connection (union) instead ofjoins in BW InfoSets (intersection).

344 © 2011 SAP AG. All rights reserved. 2011

Page 367: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in SAP NetWeaver Business Warehouse

Lesson Summary

You should now be able to:• Describe the differences between the various InfoProviders

2011 © 2011 SAP AG. All rights reserved. 345

Page 368: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

Lesson: InfoProviders in the BEx Query Designer

Lesson OverviewThe lessons shows you the differences in the role each can play as a query dataprovider.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Select the InfoProviders according to their use in creating reports• Use the different generated elements of InfoProviders found in the BEx Query

Designer

Business ExampleYou are responsible for creating many different reports in your SAP NetWeaver BWsystem. You need to know the differences between the InfoProviders and how tochoose the best one as a query data provider.

346 © 2011 SAP AG. All rights reserved. 2011

Page 369: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in the BEx Query Designer

InfoProviders in the BEx Query Designer

Figure 79: InfoCube Elements in the Query Designer

Global Objects

An InfoCube can contain global elements, such as, Calculated Key Figures (as can allother InfoProviders) that are available for all query definitions for this InfoProviderThese elements are defined on a global level and you can use them in many differentreports.

InfoCube Elements

In accordance with its multidimensional structure, an InfoCube has Key Figures thatdisplay in their own folder in the Query Designer.

Characteristics display in Dimensions.

There are additional entries in the selection tree for a Characteristic to showcompounding information (if the Characteristic is compounded with a differentCharacteristic, for example, costcenter to controlling area). If you include aCharacteristic that has compounding information in the query definition, thecompounded Characteristic is also automatically included in the definition.

2011 © 2011 SAP AG. All rights reserved. 347

Page 370: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

From the list of entries for Attributes, Characteristic Value Variables, and Values, youcan use Drag&Drop to include the required elements in the query definition.

Usage

An InfoCube is the central evaluation object for reports, which need aggregated(summarized or compressed) data. InfoCubes tend to have Characteristic InfoObjects,which are of low cardinality unless Line Item Dimensions are used. As a result of therelationship between Dimensional Characteristics and the Fact table, InfoCube queriesexhibit true multidimensional views of aggregated data.

Figure 80: DataStore Object and InfoObject Elements in the Query Designer

Elements of InfoObject and DataStore Objects in the BEx Query Designer

The system generates the Key Figure Number of Records (1ROWCOUNT) forCharacteristic InfoProviders and for DataStore Objects and places them in the KeyFigures folder.

In the Dimensions folder, you find two different dimensions for each object type.For characteristic InfoProviders, the dimensions are Attributes and Key Part, inaccordance with the definition of the master data tables. For DataStore Objects, thedimensions are Data Part and Key Part.

348 © 2011 SAP AG. All rights reserved. 2011

Page 371: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in the BEx Query Designer

Usage

• DataStore Objects

For DataStore Objects, not only is the cumulative aggregation of key figuressupported, as with InfoCubes, it is also possible to overwrite data fields (keyfigures and characteristics). This is especially important in the context ofdocument-like structures. If documents are changed in the source system,these changes include not only numeric fields such as order quantity, but alsonon-numeric fields such as goods recipient, status and delivery date. So thatthese changes are also mapped to DataStore Objects in SAP NetWeaver BW,the relevant fields in the DataStore Objects must be overwritten and set to thecurrent value. In addition, it is possible to make a source delta compatible byoverwriting and using the available change log; that is, the delta that is updatedinto InfoCubes, for example, is calculated from two successive after images.

Using the Report-to-Report Interface, it is possible to enhance an InfoCubequery with details by jumping to a DataStore Object query.

• InfoObjects

While it is possible to query Characteristic InfoObjects, a CharacteristicInfoObject used as an InfoProvider is used with another InfoProvider in aMultiProvider, HybridProvider or InfoSet.

2011 © 2011 SAP AG. All rights reserved. 349

Page 372: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

Figure 81: InfoSets in the Query Designer

InfoSets in the BEx Query Designer

The system also automatically generates the key figure Number of Records(1ROWCOUNT) for InfoSets.

Two dimensions are provided for each InfoProvider in the InfoSet: Attribute andKey Part. An InfoSet composed of a DataStore Object connected to a characteristicdisplays four dimensions. The respective characteristics are then assigned to thedimensions.

350 © 2011 SAP AG. All rights reserved. 2011

Page 373: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in the BEx Query Designer

Usage

• An InfoSet enables reporting using several InfoProviders, using combinationsof master data-bearing characteristics, InfoCubes and DataStore Objects. Theinformation from the tables of the InfoProviders involved is merged (joined).

• If an InfoSet is formed of several characteristics you can map transitiveattributes and report using this master data.

• You can map variations in time with an InfoSet using a temporal join. For allother SAP NetWeaver BW objects, the data is determined by the key date of thequery. For InfoSets with a temporal join, data can be evaluated for a particulartime chosen by you. The key date of the query is not taken into account in theInfoSet.

• What did not happen scenarios when a master data-bearing Characteristic isjoined to a DSO or InfoCube using a left-outer join.

You can include each DataStore Object, each InfoCube and each InfoObject of thetype Characteristic with Master Data in a join. A join can contain either the same typeof object or different types of objects. You can include individual objects in a join asmany times as you want. Objects in the join are linked using join conditions (equaljoin conditions). A join condition determines the combination of records from theindividual objects that are included in the resulting set.

Figure 82: MultiProviders in the Query Designer

2011 © 2011 SAP AG. All rights reserved. 351

Page 374: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

MultiProviders in the Query Designer

In the Key Figure folder of a MultiProvider, you can find the generated key figureNumber of Records (1ROWCOUNT), if one of the InfoProviders included in theMultiProvider already contains this key figure, for example, in DataStore Objects.

The Data Package Dimension contains the generated Characteristic InfoProvider(0INFOPROV), which enables you to specify a unique InfoProvider in the selectionfor the query's display of data.

Usage

MultiProviders can simplify the InfoProvider modeling process. For instance, if youwant to model a sales scenario that is made up of the subprocesses order, delivery andbilling. Each of subprocess has its own (private) InfoObjects (delivery location andinvoice number, for example) as well as a number of cross-process objects (such ascustomer or order number). It makes sense here to model each subprocess in its ownInfoProvider and then combine the InfoProviders into a MultiProvider. There is oneInfoCube for order, delivery and payment respectively. You can execute individualqueries on the individual InfoCubes or obtain an overview of the entire process bycreating a query based on the MultiProvider. In addition, by using the generatedCharacteristic InfoProvider (0INFOPROV), you can specify a unique InfoProviderin the selection or the display. The value of this Characteristic is formed from the(technical) names of the InfoProviders involved.

MultiProviders can be used to take a large InfoCube representing a process orsubprocess which has grown large over time. For instance, one could split the datainto identical InfoCubes with each InfoCube representing a breakdown of the data bytime. By combining the InfoCubes into a MultiProvider, you can display data overlarge time periods or target a specific time period using the generated CharacteristicInfoProvider (0INFOPROV).

MutliProviders are also useful even if they contain only one InfoProvider component.If the query is written against the MultiProvider, the query is then protected from anyphysical changes to the metadata of the component InfoProvider that might occurby remodeling. Ordinarily, changes to an InfoProvider's structure deactivates theInfoProvider's queries.

HybridProviders in the Query Designer

In the Dimensions folder, you find two additional dimensions for the DataStoreObject, Data Part and Key Part.

Usage

352 © 2011 SAP AG. All rights reserved. 2011

Page 375: BW305 BW Query Design and Analysis

BW305 Lesson: InfoProviders in the BEx Query Designer

Due to its “hybrid” architecture, the HybridProvider provides faster access to datawhen you analyze data in queries. The term “Hybrid” means historic data is combinedwith a small set of new data. This ensures good system performance, for example,when you analyze data in a query that has real-time data.

TransientProvider in the Query Designer

Queries based on a TransientProvider derived from a Classic InfoSet does not supportany display and navigation attributes, or any hierarchies

Selections made in the InfoSet (SAP Application Server (AS) objects) maintenancetransaction are available in the variables editor in the BEx query.

For certain fields, such as fields of type DATS, InfoObjects from the SAP NetWeaverBW system are used when creating the TransientProvider. This makes it possible, forexample, to display calendars in the SAP NetWeaver BW tools for date fields and theusers do not have to enter the date manually.

Usage

The TransientProvider derived from a Classic InfoSet is an InfoProvider that allowsaccess to the data of an InfoSet from SAP NetWeaver BW tools. There is neither theneed to model the InfoProvider in the SAP NetWeaver BW system nor to replicate thedata in the SAP NetWeaver BW system.

2011 © 2011 SAP AG. All rights reserved. 353

Page 376: BW305 BW Query Design and Analysis

Unit 8: InfoProviders in SAP NetWeaver Business Warehouse Reporting BW305

Lesson Summary

You should now be able to:• Select the InfoProviders according to their use in creating reports• Use the different generated elements of InfoProviders found in the BEx Query

Designer

354 © 2011 SAP AG. All rights reserved. 2011

Page 377: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Describe the differences between the various InfoProviders• Select the InfoProviders according to their use in creating reports• Use the different generated elements of InfoProviders found in the BEx Query

Designer

2011 © 2011 SAP AG. All rights reserved. 355

Page 378: BW305 BW Query Design and Analysis

Unit Summary BW305

356 © 2011 SAP AG. All rights reserved. 2011

Page 379: BW305 BW Query Design and Analysis
Page 380: BW305 BW Query Design and Analysis
Page 381: BW305 BW Query Design and Analysis

Unit Summary BW305

357 © 2011 SAP AG. All rights reserved. 2011

Page 382: BW305 BW Query Design and Analysis

Unit Summary BW305

358 © 2011 SAP AG. All rights reserved. 2011

Page 383: BW305 BW Query Design and Analysis

Unit 9Handling Workbooks in the BEx

Analyzer

Unit OverviewThis unit shows you how to create a BEx workbook using the BEx Analyzer byembedding a query and define the settings, which influence the behavior of the resultin the workbook.

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe the role of the BEx workbook• Use the functions of the BEx Analysis Toolbox• Define general Workbook Settings within the BEx Design Toolbox

Unit ContentsLesson: Handling Workbooks in the BEx Analyzer.. . . . . . . . . . . . . . . . . . . . . . . . . . . .360

Exercise 17: Use Analysis Toolbox in the BEx Analyzer .. . . . . . . . . . . . . . . . .377

2011 © 2011 SAP AG. All rights reserved. 359

Page 384: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Lesson: Handling Workbooks in the BEx Analyzer

Lesson OverviewThis lesson shows you how to create a BEx workbook using the BEx Analyzer byembedding a query and define the settings that affect the behavior of the result inthe workbook.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe the role of the BEx workbook• Use the functions of the BEx Analysis Toolbox• Define general Workbook Settings within the BEx Design Toolbox

Business ExampleThe SAP BW users use BEx Analyzer as an analytical, reporting, and design toolembedded in Microsoft Excel to easily access InfoProvider data, Queries, QueryViews, and workbooks and to analyze the data by navigating interactively. They canconfigure global settings and specific settings for workbooks, create new workbooksand trigger the distribution of them. In order to define new query definitions theyalso can launch the BEx Query Designer.

General FeaturesWhen you first launch the BEx Analyzer the BEx Analysis Toolbox and the BEx DesignToolbox appear within the Custom Toolbars. The BEx Analysis Toolbox contains allthe functions used when the user is working with the query results in the workbook.The BEx Design Toolbox contains the functions used when developing the workbook.

Figure 83: Analysis versus Design Mode

360 © 2011 SAP AG. All rights reserved. 2011

Page 385: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Using the Open DialogueFirst you need to decide precisely what you want to open? The following choicesare available:

• Open workbook: Previously saved workbook.

This is a workbook that contains one or more queries and may also containspecific filters, graphics and formatting. The workbook may also be made upof many worksheets.

• Open Query: here you can decide if you want to open in terms of execute anexisting Query, or an existing Query View, or if you want to execute a reportbasing directly on an InfoProvider.

A new workbook based on the standard workbook is created to embed theexecuted query, view, or InfoProvider.

It is also possible to open the Query Designer directly from the BEx Analyzer. Thismeans you can either create a new query or open an existing query in maintenancemode in order to view it or modify it before using it in the BEx Analyzer.

Figure 84: BEx Analyzer Open Options

Open WorkbookThe Open Workbook dialog is used to locate an existing workbook. The followingbuttons on the left side of the Open workbook dialog help you find your workbook.

2011 © 2011 SAP AG. All rights reserved. 361

Page 386: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Figure 85: Open Workbook Dialog

• Find

Use this option to supply partial information that will help track down aworkbook

• History

This option will display the last workbooks you have worked with.

• Favorites

This option will display any workbook which you have added to your favorites.If you spot a workbook which you know you want to work with frequently youcan use the 'Add to Favorites' option so it will appear under this button thereafter.

• Roles

A user may be assigned to one or more roles by the system administrator. Theworkbooks may be stored against roles. If the user presses this button theywill see the roles to which they have been assigned and against these roles theassigned workbooks will appear.

Open QueryThe Open Query dialog is used to locate an existing query so that it can be embeddedwith a new workbook. It is worth remembering that you do not have to select aQuery, you could also select Query View.

A further possibility is to choose a InfoProvider. This means that all the data fromthe InfoProvider will appear in the result unconstrained. The user would then use thenavigation options in the workbook to filter the data as required.

362 © 2011 SAP AG. All rights reserved. 2011

Page 387: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

The following buttons on the left side of the Open Query dialog help you find yourquery.

Caution: A BEx Query is designed to reduce the amount of data extractedfrom the InfoProvider. The option of selecting the InfoProvider directly in theopen dialog could cause long run times as all data is extracted.

2011 © 2011 SAP AG. All rights reserved. 363

Page 388: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Figure 86: Open Query Dialog

• Find

Use this option to supply partial information which will help track down a query.

• History

This option will display the last queries you have worked with.

• Favorites

This option will display any query that you have added to your favorites. If youspot a query which you know you want to work with frequently you can use the'Add to Favorites' option so it will appear under this button thereafter.

• Roles

A user may be assigned to one or more roles by the system administrator. Thequeries may be stored against roles. If the user presses this button they will seethe roles to which they have been assigned and against these roles the assignedqueries will appear.

• InfoAreas

A query is assigned to an InfoProvider such as an InfoCube or InfoSet. AllInfoProviders are organized into InfoAreas. So if you know which InfoProvideryour query has been assigned to it may be easier to locate the query by drillingdown to the InfoProvider via the InfoAreas.

Saving WorkbookA workbook can contain the results of one or more queries, the queries can appear onmultiple worksheets or one a single worksheet. A workbook can be formatted to theuser's requirements (logos, fonts, styles etc.) and can contain Excel native formattingand other Excel features such as pivot tables, filters. When a workbook is savedthe current navigation state is also saved. This means that when the user reaches auseful navigation state they can choose to save the workbook so that next time theworkbook opens at the same position. The user can also choose whether to refreshthe data automatically when the workbook next opens or to open the workbook withthe old (frozen) data first, the user cold then choose to manually refresh the data. It isalso possible to save a workbook as View.

364 © 2011 SAP AG. All rights reserved. 2011

Page 389: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Saving WorkbookThe Save Workbook dialog box offers following places where the workbook couldbe saved.

• Favorites

A workbook saved here could only be opened by the user who saved it there.This is regarded as a personal set of workbooks. A user can add other workbooksto this area by using the menu options 'Add to Favorites' in the open dialog box.

• Roles

A workbook saved here can be opened by others who share the same role.Potentially it could be possible for one person to open the workbook, make somechanges to the results (i.e. change filters) or change formatting, then resave theworkbook affecting all users who use the same workbook. So it is important toprotect the workbook (see under the Workbook Settings.

To save your workbook, choose Save Workbook in the analysis toolbar of BExAnalyzer and use:

• The Text field where you enter a text to describe your view

Figure 87: Save Workbook Dialog

2011 © 2011 SAP AG. All rights reserved. 365

Page 390: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Saving a Query ViewThe Save View function is used to save the current navigational state (view) of the dataprovider assigned to the design item in the currently active cell. When you save thequery view, you can use it as the data provider for BEx Web Application Designer,BEx Report Designer and the Visual Composer, and of course for other workbookswithin the BEx Analyzer.

To save the current navigational state of the query as view, choose Save View in theanalysis toolbar of BEx Analyzer and use following:

• The Technical Name field where you enter a technical name for the view• The Text field where you enter a text to describe your view

Figure 88: Save View Dialog

Refresh / Pause Automatic RefreshThe default action following any change to the navigation state of the result set in aworkbook is that an automatic refresh of the query is performed. If a user wishes toenter a series of filters then it would be inefficient for the query to automaticallyrefresh each time a filter was entered, especially if the refresh took a while tocomplete. It is possible to halt the auto refresh from executing and instead switch to amanual refresh mode. This means that the user can enter a series of filters and whenthey are ready, they simply press the fresh button in the toolbox to trigger the refresh.

366 © 2011 SAP AG. All rights reserved. 2011

Page 391: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

This means the OLAP processor can process all the filters in one step. The refreshicon appears slightly differently depending on whether the workbook is in automaticrefresh mode or manual refresh mode. To switch between the automatic refresh andmanual refresh modes simply press the refresh button in the analysis toolbox.

When a workbook is saved the reporting data can also be saved with the workbook.This means that when the workbook is reopened the user will immediately see theold reporting data, they would have to press the refresh button in order to refresh thedata. You have to consider whether this is the required behavior for the users, theymay prefer to have the workbook automatically refresh on opening. If the latter is thecase then switch the default check box setting to Refresh workbook on opening.

Figure 89: Workbook Refresh Options

Changing Variable ValuesWhen a workbook which contains one or more queries with one or more input-readyvariables is opened, these variables will need to be populated. If the Refresh Workbookon Open indicator is set, the variable dialog will always be displayed.

2011 © 2011 SAP AG. All rights reserved. 367

Page 392: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

If the Refresh Workbook on Open indicator is not set, the system checks whethermandatory variables are involved for which no values are available. If no values areavailable, the variable dialog is displayed; if values are available, the workbook isdisplayed straight away.

Hint: The Process Variables on Refresh indicator has no effect on displayingor not displaying the variable dialogue, but only that the values which werestored with the workbook are taken and applied to the values of the variable.

In an executed workbook, you can, however, manually change the variable values bychoosing Change Variable Values to call the variable dialog.

The variable dialog contains features that are designed to assist the user in selectingthe values.

• Variants

A variant is a collection of variable values which have been previously savedso that they can easily be recalled. A variant can be useful when commoncollections of variable values are needed, this saves the user from having theenter the values each time, they simply select from the Available variants dropdown list to choose an appropriate variant. To save a new variant select thebutton Save Variant and supply a name for the variant.

• Personalize Variables

A user can choose to save the values of variables in a personal list. This meansthat instead of being presented with a huge number of irrelevant variable values,the user simply sees the values which he uses frequently, this should savetime when choosing the values. To save values to the personal list press thePersonalize Variables button, where you can personalize Variables with a specificselection from the Available Variables box to the Personalized Variables box.

368 © 2011 SAP AG. All rights reserved. 2011

Page 393: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Figure 90: Changing Variables Values

2011 © 2011 SAP AG. All rights reserved. 369

Page 394: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

ToolsThe Tools button can be found on the analysis toolbox and provides access to anumber of useful features.

• Create New Query...

Use this function to access the BEx Query Designer to create a new query. Youcan insert multiple queries into a workbook. When you choose Create NewQuery..., BEx Query Designer opens or creates the query in the selected cell. Youmay want to toggle frequently between the Query Designer (to edit the query)and the Analyzer (to design the interface to the query) as you create workbooks.

• Edit Query (Query Name)

Use this function to access the BEx Query Designer to edit the query that hasbeen associated with the current workbook. This function is only displayedif you selected a cell of an analysis grid. A query on which this analysis gridis based is displayed for processing.

• Broadcaster

The Broadcaster allows you to send the workbook results to other users eitherimmediately or at predefined point in time. This link will open up the broadcasterdialog so that you are able to make the settings.

• Planning Modeler

This link opens the Planning Modeler. Here you can design planning applicationsthat are fully integrated with the BEx environment.

• Report Designer

The Report Designer allows you to create reports based on BEx Queries whichrequire a high level of formatting. This link takes you to this tool.

• Web Analyzer

The Web Analyzer is a web-based tool that allows a user to open queries, queryviews from SAP and non-SAP data sources for flexible analysis. This link takesyou to this tool.

• Copy Sheet

Use this function to copy a sheet of a workbook together with all the designitems it contains. A new sheet is created in the workbook with the copy that alsocontains a copy of the data provider as a separate data provider. You can performthe same functions in the copied sheet as in the original.

370 © 2011 SAP AG. All rights reserved. 2011

Page 395: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Figure 91: Tools

Global SettingsThe global settings allow you to define the environment in which all workbooks willbe processed. Some settings of Behavior tab are organized as follow:

• Display System Name in Local History

Sometimes it is helpful to identify the source of the report (and therefore thedata) before opening.

• Log On and Activate SAP GUI Connection

If the user is already logged on to the SAP BW, this setting means that the sameuser id will be used to launch the BEx Analyzer. If you prefer to enter the logondetails each time the Analyzer is launched then do not check this box.

• Launch SAP BW 3.x BEx Analyser from SAP GUI (RRMX)

RRMX is the transaction code used to launch the BEx Analyzer from the SAPGUI. The BEx is supplied with a BW 3.x version of the tools as well as thecurrent SAP NetWeaver BW version. You can choose to launch the older BW3.x version of the BEx Analyzer from RRMX by checking this box.

• Launch BEx Analyzer whenever MS Excel starts

You can choose to launch the BEx Analyzer functions whenever you start Excel.

2011 © 2011 SAP AG. All rights reserved. 371

Page 396: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Figure 92: Global Settings

Connect and System InformationIf you want to remind yourself of some key system information including how you arecurrently logged on then press the System Information button in the analysis toolbox.

Here you also have an opportunity to log off and log on again. Look carefully at thetoolbar icon graphic, when you are logged on the 'plug' icon appears connected, whenyou are not logged on the 'plug' remains unconnected!

Hint: This can be a useful feature when you are testing or developingauthorizations in the Analyzer and need to switch between users withoutleaving the Analyzer.

372 © 2011 SAP AG. All rights reserved. 2011

Page 397: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Figure 93: Connect and System Information

Workbook Settings: General TabThe design toolbox contains a range of tools which help a developer to create aflexible and potentially sophisticated workbook. The toolbox contains options to addnew analysis features such as navigation controls (radio buttons, drop down lists) andtext elements to the workbook. The button Workbook Settings is found in the designtoolbox and offers the developer a number of settings that affect the behavior andpresentation of the workbook.

In this class we take a look at the Workbook Settings button and specifically thesettings on the General tab. These settings are important for any workbook from themost complex to the most simple.

2011 © 2011 SAP AG. All rights reserved. 373

Page 398: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Figure 94: Workbook Settings: General Tab

374 © 2011 SAP AG. All rights reserved. 2011

Page 399: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

The settings available under the General Tab include:

• Refresh Workbook on Open

Causes the workbook to automatically refresh all query results on opening toretrieve the latest data fro the InfoProvider.

• Allow Drag and Drop

If you want the prevent the users from using the drag and drop features thencheck this box. A workbook may be intentionally developed with minimal or noopportunity for navigation, switching off the drag and drop feature ensures thatthe user cannot change the navigational state of the result using this method.

Hint: Don't forget to uncheck the Allow Navigation boxes in the designitems such an analysis grid and filters, otherwise navigation can still becarried out using the menu options.

• Password-Protect Workbook

If you want to protect your workbook from unauthorized changes to the designaspects, i.e. changing cell formatting or using any of the design mode optionsthen simply check this box and supply (and repeat) a password. Whenever adesign toolbox button is pressed the user will be prompted for a password (ofcourse only a developer would need to work in design mode). Entering thecorrect password will put the workbook into unprotected mode. It does notuncheck the Password-Protect Workbook box.

2011 © 2011 SAP AG. All rights reserved. 375

Page 400: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

376 © 2011 SAP AG. All rights reserved. 2011

Page 401: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Exercise 17: Use Analysis Toolbox in theBEx Analyzer

Exercise ObjectivesAfter completing this exercise, you will be able to:• Understand how to create a basic analysis workbook using the BEx Analyzer.

Business ExampleWorkbooks are a key presentation vehicle for the BEx query results. Your businessusers are familiar with the Excel environment and require the query results to be savedin this format. The users would like to ensure the workbooks are always up to datewhen opening and that they are not required to re-enter the variables selection eachtime the workbook is opened.

Task:In this exercise, you will start the BEx Analyzer and use the Open dialog to find anexisting query. You will then execute this query to display the results. You will testthe automatic refresh feature and then you will ensure that the workbook is alwaysrefreshed on opening. You will save your new workbook and then you will reopenyour workbook to confirm that the variables are being reused and that the workbook isautomatically refreshing.

1. Start the BEx Analyzer from the Windows menu and then open the query U00Query Characteristic/Text Variables (U00_QD_VAR001) using the Find button.

When the variables dialog box appears, enter the values:

U00 Month Single Value Variable(*): 01.2006

U00 Month Interval Variable(*): 01.2006 - 12.2006

2. Pause the automatic refresh function in the workbook, then test this is workingby selecting the filter values for materials range 1400-100 to 1400-750. Whenyou are ready, force the query to refresh the results with your new filter values.

3. Now change the variable values as follows :

U00 Month Single Value Variable(*): 06.2006

U00 Month Interval Variable(*): 06.2006 - 12.2006

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 377

Page 402: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

4. Make the appropriate workbook settings to ensure that each time the workbookis opened the data is refreshed automatically. Additionally, the chosen variablevalues from the precedent step should be stored with the workbook.

5. Save your workbook under Roles → Role## (U##_Role) → Workbooks. usingthe description U## Sales Results Workbook 001 then close the workbook. (Itis not necessary to close the BEx Analyzer).

6. Reopen your workbook and confirm, by looking under Information for the LastRefreshed time, that the workbook was refreshed on opening.

378 © 2011 SAP AG. All rights reserved. 2011

Page 403: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

Solution 17: Use Analysis Toolbox in theBEx AnalyzerTask:In this exercise, you will start the BEx Analyzer and use the Open dialog to find anexisting query. You will then execute this query to display the results. You will testthe automatic refresh feature and then you will ensure that the workbook is alwaysrefreshed on opening. You will save your new workbook and then you will reopenyour workbook to confirm that the variables are being reused and that the workbook isautomatically refreshing.

1. Start the BEx Analyzer from the Windows menu and then open the query U00Query Characteristic/Text Variables (U00_QD_VAR001) using the Find button.

When the variables dialog box appears, enter the values:

U00 Month Single Value Variable(*): 01.2006

U00 Month Interval Variable(*): 01.2006 - 12.2006

a) Follow the path Start → Programs → Business Explorer → Analyzer tostart the BEx Analyzer.

b) From Analysis Toolbox click on the Open icon then select the Open Querymenu option.

c) Logon using the details given by your instructor.

d) Click on the Find button to search for the query U00 QueryCharacteristic/Text Variables (U00_QD_VAR001). Click on the Openbutton to execute the query.

e) In the variable dialog box enter the values shown above (you may have touse the selection buttons to access the selections), then press the OK buttonto display the query results.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 379

Page 404: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

2. Pause the automatic refresh function in the workbook, then test this is workingby selecting the filter values for materials range 1400-100 to 1400-750. Whenyou are ready, force the query to refresh the results with your new filter values.

a) From the Analysis Toolbox press the Pause Automatic Refresh button(watch carefully as the button changes appearance).

b) Select the filter values for materials 1400-100 to 1400-750 (notice theresults do not immediately change even though you have chosen somefilters!)

c) Press the Refresh button and watch as the query is now refreshed using thefilter values you previously selected.

3. Now change the variable values as follows :

U00 Month Single Value Variable(*): 06.2006

U00 Month Interval Variable(*): 06.2006 - 12.2006

a) In the Analysis Toolbox press the button Change Variables Values andenter the values above, then press OK to execute the query.

4. Make the appropriate workbook settings to ensure that each time the workbookis opened the data is refreshed automatically. Additionally, the chosen variablevalues from the precedent step should be stored with the workbook.

a) From the Design Toolbox press the Workbook Settings button to reach thesettings dialog.

Under the General tab check the box marked Refresh Workbook on Open.

Under the Variables tab verify if the box marked Process Variables onRefresh is checked.

Press OK when done and then you must press the Exit Design Mode buttonto return the Analysis Mode.

5. Save your workbook under Roles → Role## (U##_Role) → Workbooks. usingthe description U## Sales Results Workbook 001 then close the workbook. (Itis not necessary to close the BEx Analyzer).

a) From the Analysis Toolbox press the Save button then choose the menuoption Save Workbook As.

b) Enter the workbook name U## Sales Results Workbook 001 in theDescription field then press Save button.

c) Close the workbook using the Excel menu option File → Close. (If you areprompted to save your changes, select the No button)

Continued on next page

380 © 2011 SAP AG. All rights reserved. 2011

Page 405: BW305 BW Query Design and Analysis

BW305 Lesson: Handling Workbooks in the BEx Analyzer

6. Reopen your workbook and confirm, by looking under Information for the LastRefreshed time, that the workbook was refreshed on opening.

a) From the Analysis Toolbox press the Open button and then choose themenu option Open Workbook.

b) Your workbook should now be displayed under the History area. Highlightthe required workbook and press the Open button. In the Variable dialoguebox, accept the suggested variable values that have been saved with theworkbook.

2011 © 2011 SAP AG. All rights reserved. 381

Page 406: BW305 BW Query Design and Analysis

Unit 9: Handling Workbooks in the BEx Analyzer BW305

Lesson Summary

You should now be able to:• Describe the role of the BEx workbook• Use the functions of the BEx Analysis Toolbox• Define general Workbook Settings within the BEx Design Toolbox

382 © 2011 SAP AG. All rights reserved. 2011

Page 407: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Describe the role of the BEx workbook• Use the functions of the BEx Analysis Toolbox• Define general Workbook Settings within the BEx Design Toolbox

2011 © 2011 SAP AG. All rights reserved. 383

Page 408: BW305 BW Query Design and Analysis

Unit Summary BW305

384 © 2011 SAP AG. All rights reserved. 2011

Page 409: BW305 BW Query Design and Analysis
Page 410: BW305 BW Query Design and Analysis
Page 411: BW305 BW Query Design and Analysis

Unit Summary BW305

385 © 2011 SAP AG. All rights reserved. 2011

Page 412: BW305 BW Query Design and Analysis

Unit Summary BW305

386 © 2011 SAP AG. All rights reserved. 2011

Page 413: BW305 BW Query Design and Analysis

Unit 10Performing Ad-hoc Analysis with the

BEx Web Analyzer

Unit OverviewThis unit gives an overview of the BEx Web Analyzer and shows you how to performad-hoc analyses with the BEx Analyzer.

Unit ObjectivesAfter completing this unit, you will be able to:

• Explain how the BEx Web Analyzer fits into the overall architecture SAPNetWeaver BW

• Describe the sources of data used for analysis in the BEx Web Analyzer• Perform ad-hoc analyses of data using the functions of the BEx Web Analyzer

Unit ContentsLesson: Performing Ad-hoc Analyses with the BEx Web Analyzer .. . . . . . . . .388

Exercise 18: Perform an Ad-Hoc Analyses with the BEx Web Analyzer 405

2011 © 2011 SAP AG. All rights reserved. 387

Page 414: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Lesson: Performing Ad-hoc Analyses with the BEx WebAnalyzer

Lesson OverviewIn this lesson, you get an overview of the BEx Web Analyzer and learn how to performad-hoc analyses with the BEx Analyzer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Explain how the BEx Web Analyzer fits into the overall architecture SAPNetWeaver BW

• Describe the sources of data used for analysis in the BEx Web Analyzer• Perform ad-hoc analyses of data using the functions of the BEx Web Analyzer

Business ExampleSAP BW users should use the BEx Web Analyzer to perform ad hoc analysis on top ofvarious BW data providers (InfoProviders, BEx Queries and BEx Query Views) aswell as 3rd party BI data providers. Users can save the results of the ad hoc analysis inthe Enterprise Portal or as a new BEx Query View. The results of the ad hoc analysiscan also be printed or can be sent to Information Broadcasting for distribution.

BEx Web AnalyzerThe BEx Web Analyzer is one of several BEx Web tools provided as part of theBusiness Explorer Suite. The analytical options provided by the Web Analyzer areoptimized for business experts. For example, navigation in an analysis is easyand intuitive using drag and drop operations to quickly change the structure of theanalysis. Additionally, the user can quickly create exceptions and conditions with thehelp of built-in wizards.

388 © 2011 SAP AG. All rights reserved. 2011

Page 415: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Figure 95: Web Analyzer in the Business Explorer Suite

Figure 96: Detailed Overview: BEx Web Analyzer

The BEx Web Analyzer is integrated into the SAP NetWeaver Portal and allows youto perform ad hoc analysis on top of various BW data providers. These data providerscan be either third-party BI sources or SAP NetWeaver BW InfoProviders, queriesor query views. Analyses run with the Web Analyzer can be broadcasted or savedfor future use.

2011 © 2011 SAP AG. All rights reserved. 389

Page 416: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Users have two options for saving the results of their ad hoc analyses.

The first option, as shown in the graphic above, permits users to leverage theintegration of BW with the SAP NetWeaver Portal to save their results with theSave button in either the BEx Portfolio or the Favorites portion of the KnowledgeManagement area. When using this option, the complete layout of the ad hoc analysis(whether a chart, table or both) is saved. Results saved to the portal can be readilyaccessed using the Open button from the Web Analyzer.

With the second option, users can save their ad hoc analysis result as a BEx QueryView via the context menu. These BEx Query Views can then be used as dataproviders for BEx Web Applications or BEx Reports. The BEx Query View containsthe navigation status of the analysis, but does not contain information about the layout(e.g. chart layout). This is saved in the BW metadata repository. This procedureallows you to use query views based on third-party BI data, as well as SAP NetWeaverBW data, as data providers for BEx Web Applications or BEx Reports.

The Web Analyzer is able to access data from both SAP BW InfoProviders and thirdparty BI sources. This extends the range of options available to the user to improvethe quality of analysis.

Figure 97: BW Data Provider Access in the Web Analyzer

To access any BW data provider within the Web Analyzer, begin by clicking on theNew Analysis button. From the resulting dialog box, the user can first select anysystem that has been maintained in the portal system landscape. These can be either

390 © 2011 SAP AG. All rights reserved. 2011

Page 417: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

SAP NetWeaver BW systems or third-party BI systems. Once a source system isselected, then the user can choose the data provider type from the drop-down box. Theset of data providers meeting the selection criteria is then displayed for selection.

Navigating and Filtering using Drag&Drop

Figure 98: Ad Hoc Analysis using Drag & Drop and Enhanced Filter Area

In the BEx Web Analyzer, the user can now perform various ad hoc navigation stepseasily using drag and drop operations. Shown above is an example using severalforms of drag and drop navigation. A user can:

• Drag items from one section of the navigation block to another; i.e. from therows to the columns, to immediately alter the structure of the analysis.

• Drag items from the navigation block directly to the rows or columns of theanalysis results.

• Drag characteristics to the filter area to immediately perform the correspondingfiltering of the results.

• Drag Items out of the analysis grid to remove them from the analysis.

In the filter area, it is now very easy to see exactly what filtering actions are beingapplied to the analysis. This is due to the use of pull-down boxes for each of thecharacteristics showing what, if any, filters have been applied to each characteristic.Changes can be made easily with the effects seen immediately in the body of theanalysis.

2011 © 2011 SAP AG. All rights reserved. 391

Page 418: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Figure 99: Chart View

Users can easily switch between table view,chart view, or a combination of both usinga drop-down box. The combination view is a new feature of the BEx Web Analyzer.When the analysis is saved in the portal, the view is saved intact. Any drag and dropnavigation performed on the table view also applies directly to the chart view. In thesettings area, users can choose various display options for both the table view andchart view via selections organized on tab pages.

392 © 2011 SAP AG. All rights reserved. 2011

Page 419: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Defining Exceptions and Conditions using Wizards

Figure 100: Wizards for Defining Exceptions and Conditions

The BEx Web Analyzer provides business users with wizard-based definition ofexceptions and conditions. Exceptions are used to highlight data values in differentcolors to draw attention to important trends or variances. Conditions are used to filterthe data on the analysis to only values that meet specific conditions. For example, thetop five regions based on achievement of revenue targets.

These wizards can be launched from the associated tab pages in the Settings area.Both wizards lead the user through the different steps using guided procedures.

2011 © 2011 SAP AG. All rights reserved. 393

Page 420: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Creating an Exception

Figure 101: Creating a New Exception

To create an exception in the Web Analyzer, first choose the Settings link in thetoolbar. From there, select the Exceptions tab and the choose the Add button. Thisstarts the exception wizard. The user is then guided through the process in a series offive screens.

Hint: The exception created with the exception wizard in the Web Analyzerdoes not become part of the query definition. In order to make an exception apermanent part of the query definition, the exception must be defined usingthe Exception Editor in the BEx Query Designer.

394 © 2011 SAP AG. All rights reserved. 2011

Page 421: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Figure 102: Exception Wizard Step 1: Set Exception Type

In the first step of the wizard, Set exception type, you can choose between Statusexception and Trend exception . A status exception operates on absolute key figures.For example, a status exception might be stated as “Sales > 30000”. New in BW aretrend exceptions. A trend exception operates on relative key figures. For example,a key figure might be considered an exception if the deviation of the key figureis greater than +5% over time. When the exception type is chosen, the subsequentwizard screens adapt to that choice. For example, on the fourth step of the wizard, SetVisualization, the choice for a status exception is a traffic light icon while the choicefor a trend exception is an arrow icon.

Figure 103: Exception Wizard Step 2: Set Threshold Value

2011 © 2011 SAP AG. All rights reserved. 395

Page 422: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

In the second step of the Exception Wizard, the user makes the settings for thekey figure threshold values. A key figure is chosen for the exception definition.Additionally, the timing of the exception evaluation can either be before or afterany local calculations such as formulas in the query. For each alert level used inthe exception definition, a boolean operator and the appropriate threshold value(s)are chosen. Depending on the operator chosen, the user supplies one or two valuesfor each exception.

You can choose from nine different alert levels:

• Good 1-3, rendered as three shades of green in the standard palette• Critical 1-3, rendered as three shades of yellow in the standard palette• Defective 1-3, rendered as three shades of red in the standard palette

The color palette used for the alert levels can be changed in the style sheet assigned tothe analysis.

Figure 104: Exception Wizard Step 3a: Exception affects Data Cells

In step 3 of the Exception Wizard, the user can choose if they want to have the resultof the exception applied to the data cells of an analysis. If this choice is made, the usercan make a subsequent choice of which data cells are affected.

396 © 2011 SAP AG. All rights reserved. 2011

Page 423: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

The choices are:

• Evaluated structure element• Next structure element• All structure elements

The Evaluated structure element refers to the key figure chosen for a specificexception in the prior step of the wizard. This is the most common setting. The Nextstructure element choice allows you to evaluate one key figure, but apply the colorhighlighting to a different key figure. The setting for All structure elements applies thecolor highlighting from an exception to all key figures in the analysis.

Figure 105: Exception Wizard Step 3b: Exception affects Characteristic Cells

Also in step 3 of the Exception Wizard, the user can choose how or if the exceptionaffects certain characteristic cells in an analysis. The choices for this option are:

• Rows• Columns• Rows and columns

2011 © 2011 SAP AG. All rights reserved. 397

Page 424: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Figure 106: Exception Wizard Step 4: Set Visualization

In step 4 of the Exception Wizard, the user makes choices about how the exceptionwill be visualized or rendered in the analysis. For both status and trend exceptions,the exception cells can be rendered using a background color based on the alert levelassigned to the threshold values chosen in step 2 of the Exception Wizard. For statusexceptions, if any of the choices containing symbols are selected, the symbol will berendered as a traffic light based on the alert level assigned to the threshold values. Forexample, all the Good alert levels will be rendered as a green traffic light. For trendexceptions, if any of the choices containing symbols are selected, the symbol will berendered as an arrow showing the direction of the trend.

398 © 2011 SAP AG. All rights reserved. 2011

Page 425: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Figure 107: Exception Wizard Step 5: Set Characteristic Restriction

In step 5 of the Exception Wizard, the user chooses whether to restrict how theexception is evaluated for each of the characteristics in the analysis. For eachcharacteristic, you can choose whether the exception affects:

• Standard• All• Only results• Everything except results• Fixed value• Level

2011 © 2011 SAP AG. All rights reserved. 399

Page 426: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Figure 108: Exception Wizard Step 6: Set Properties

In the sixth and final step of the Exception Wizard, the user chooses whether theexception is active by default, or must be activated within the analysis. Also, thedescription of the exception is entered here. The exception description is important toprovide users of the analysis a good indication of what the exception is measuring.

Figure 109: Sample Exception in an Ad Hoc Analysis

400 © 2011 SAP AG. All rights reserved. 2011

Page 427: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Shown here is an example of an analysis result with a status exception active. Thestatus exception has been defined to render the exception as a symbol followed by thevalue of the key figure. The symbol used for status exceptions is a traffic light.

Creating a Condition

Figure 110: Condition Wizard Step 1: Set Condition Type

In the first step of the condition wizard, the condition type can be set by:

• Ranked list criterion• Threshold value condition• Mixed condition

Each option is explained with an example to help business users find the best optionfor their analysis. Depending on the chosen option, the appropriate parameters will beoffered in the next step of the wizard.

2011 © 2011 SAP AG. All rights reserved. 401

Page 428: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Figure 111: Condition Wizard Step 2: Set Condition Parameters

In the second step of the condition wizard, the parameters for the conditions can bedefined according to the condition type. The offered operators are dependent on thecondition type chosen in the first step.

Figure 112: Condition Wizard Step 3: Set Characteristic Assignment

402 © 2011 SAP AG. All rights reserved. 2011

Page 429: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

The characteristic assignment takes place in the third step of the condition wizard.You can choose to apply the condition to:

• All characteristics in the drilldown independently• Detailed characteristic along the rows or columns• Individual characteristics or characteristic combinations

Figure 113: Condition Wizard Step 4: Set Properties

In the final condition wizard step, the activity status of the condition can be set and aDescription can be entered. The description should provide a clear indication of theuse of the condition. Once all settings are complete, choose the Finish button to savethe condition definition.

Hint: The condition created with the condition wizard in the Web Analyzerdoes not become part of the query definition. In order to make a condition apermanent part of the query definition, the condition must be defined usingthe Condition Editor in the BEx Query Designer.

2011 © 2011 SAP AG. All rights reserved. 403

Page 430: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Printing and Broadcasting the Analysis

Figure 114: Additional Web Analyzer Features

Using the Print Version button, users can generate a PDF file from the ad hoc analysisresult and print it.

Clicking on the Send button, users can access the functions of InformationBroadcasting.

404 © 2011 SAP AG. All rights reserved. 2011

Page 431: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Exercise 18: Perform an Ad-Hoc Analyseswith the BEx Web Analyzer

Exercise ObjectivesAfter completing this exercise, you will be able to:• Use the BEx Web Analyzer to create an ad-hoc analysis and save the result

as a BEx Query View.

Business ExampleYour company decides to use the BEx Web Analyzer to enable their employees toperform ad-hoc analyses.

Task:You will open the BEx Web Analyzer from the Portal and then create a new ad-hocanalysis based on an existing InfoProvider. You will perform various navigationactivities and then create a new exception to highlight interesting sales results. Finallyyou will save the analysis as view.

1. To access the BExWeb Analyzer, logon to the attached Portal by either executingtransaction code ZPORTAL from your assigned BW system or opening your webbrowser and entering the URL http://[server]:[port]/irj/portalwhere [server] is to be replaced by your assigned BW server and [port]by a port, for example 50000.

Enter the user ID and password provided by your instructor.

Go to the Reporting, Analysis and Planning tab page and choose BEx WebAnalyzer.

2. Launch InfoProvider MultiProvider - Customer Sales (P_SALES01) in the BExWeb Analyzer. To find the InfoProvider, choose the New Analysis button in theBExWeb Analyzer. Then choose the Type InfoProvider from the drop-down box.Select the InfoArea tab page. Use the following path to reach the InfoProvider:Reporting Layer (P_REPLAYER) → Sales and Distribution (P_RL_SD).

Choose OK to launch the InfoProvider in the BEx Web Analyzer.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 405

Page 432: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

3. You can now use drag and drop navigation in the display. First drag thecharacteristic Cal. year / month into the Rows and select the values 01.2009 -03.2009. After that you would like to drilldown by Material within each Cal.year / month. Drag the characteristic Material from the Free characteristics tothe right side of the Cal. year / month heading to add that drilldown.

4. Drilldown by Material group between the Cal. year / month and Materialcharacteristics. You can either insert the Material group after the Cal. year /month or before theMaterial. In this case, drag theMaterial group characteristicfrom the Free characteristics and insert it to the left side of the Material heading.

5. Replace Cal. year / month with Distribution Channel in your results using dragand drop. Cal. year / month will become a free characteristic. Drag DistributionChannel from the Free characteristics and drop it on top of the Cal. year / monthheading in the results area.

6. Remove the key figure Incoming Orders by dragging it out of the results to theright of window. Then do the same thing for the key figure Sales Volume.

7. Move the remaining key figures from the Columns to the Rows using drag anddrop. In the navigation area of the BEx Web Analyzer, drag the heading KeyFigures in the Columns section and drop it on the Rows header.

8. After reviewing this alternative, you determine that you prefer having the keyfigures information displayed in the Columns as in the original InfoProvider.Reverse the previous navigation and place the key figures heading back in theColumns.

9. Using the context menu, remove the drilldown on Distribution Channel fromyour results. Right click on Distribution Channel and navigate within the contextmenu via Change Drilldown to the Remove Drilldown option.

10. Add a Filter menu to your results using the Filter hyperlink to facilitate changesto the filter settings for your ad-hoc analysis.

11. Using the Filter drop-down box for Distribution Channel, limit your results toonly the Sold for resale distribution channel.

12. Remove the filter on Key Figures so that all key figures are displayed in theColumns. Do this by selecting Clear from the Key Figures drop-down box.

Edit the filter on Key Figures and choose Order Entry Quantity, Incoming OrdersEUR, Invoiced quantity and Sales Volume EUR.

Continued on next page

406 © 2011 SAP AG. All rights reserved. 2011

Page 433: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

13. In addition to a tabular display, you have the option to display the data as achart or to include both a table and a chart. Choose Chart from the Display Asdrop-down box to view your results in graphical display. After that, return to atabular view to perform further analysis.

14. Clear the Sold for resale filter for Distribution Channel so that the results forall distribution channels will show. Select Clear from the Distribution Channeldrop-down box.

15. In the next step of your analysis, you will use a scaling factor, then create anduse an exception.

Show the key figure Incoming Orders EUR in thousand of EUR using the scalingfactor.

Select the Settings link and choose the Exceptions tab page. There, click on Add.

16. After you chose the Add button, a wizard opens to guide you through defining anexception. In the first step, you define the type of exception. You can choose“Status Exception” for absolute key figures, such as Sales Volume EUR. Or youcan choose “Trend Exception” for relative key figures, such as Sales VolumeEUR versus Sales Volume. In this case, select the radio button for exception type“Status Exception” and then choose Next to continue.

17. The next step is to define the settings for the threshold value(s). Here youwill first choose the key figure structure element(s) for which the exception isdefined. You will be defining exceptions based on Sales Volume EUR. SelectSales Volume EUR from the Exception is defined on drop-down box.

The next setting required on this screen is the threshold value or values that willgenerate an exception. To define the threshold value, you select an exceptionlevel (Good 1 to 3, Critical 1 to 3, and Defective 1 to 3) and an operator. Leavethe first exception row set to “Good 1” and select “>” as the operator fromthe drop-down box. You have determined that you would like all values over1,000,000 EUR to be highlighted as “Good 1”. Enter 1000000 in the field tothe right of the “>” symbol.

Add a second threshold value row for the next exercise step.

18. Create a second threshold value for Sales Volume EUR that are unacceptablylow. You will categorize these as “Defective 1” for reporting purposes. Select“Defective 1” from the exception level drop-down list. Sales Volume EUR lessthan 100,000 EUR are unacceptably low and need to be highlighted on yourresults. Select “<” from the Operator drop-down list. Complete this setting byentering 100000 as your lower threshold. Move to the next step of the ExceptionWizard by choosing Next.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 407

Page 434: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

19. The next screen allows you to determine which data and characteristic cells areaffected by the exception. The default setting is for the exception to affect datacells only, and specifically the “Evaluated structure element”, in other words, theelements on which the exception was defined. In this case, that element is SalesVolume EUR. Select the “Evaluated structure element” radio button and checkthe “Exception affects characteristic cell” box. Click Next to continue.

20. The next step in defining an exception is to set the visualization, or whether theexception will be indicated by a background color or by a symbol. Highlight theexception with a “Background Color”. Then select Next to proceed.

21. Highlight the Material and the Material group that meet the thresholds youpreviously established, without any totals. To do this, select “Everything exceptresults” in the drop-down box next to the Material and the Material groupcharacteristics. Choose Next to proceed to the final screen of the exceptiondefinition

22. On the final Exception Wizard screen, enter the description U## Exception001. Select Finish. The system automatically closes the Exception Wizardand returns to the BEx Web Analyzer. You may now view the analysis resultwith your exception.

23. After reviewing your results, save the result of your ad-hoc analysis as a BExQuery View. Click on Save View from the context menu within the results. EnterU## Ad Hoc Analysis 001 as the description and U##_ADHOC_001 as thetechnical name for your analysis. Finish by choosing OK.

24. Launch view U## Ad Hoc Analysis 001 (U##_ADHOC_001) in the BEx WebAnalyzer. To find the view, choose the New Analysis button in the BEx WebAnalyzer. Then choose the Type View from the drop-down box. Select theHistory tab page.

Select your view and choose OK to launch the view in the BEx Web Analyzer.

408 © 2011 SAP AG. All rights reserved. 2011

Page 435: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Solution 18: Perform an Ad-Hoc Analyseswith the BEx Web AnalyzerTask:You will open the BEx Web Analyzer from the Portal and then create a new ad-hocanalysis based on an existing InfoProvider. You will perform various navigationactivities and then create a new exception to highlight interesting sales results. Finallyyou will save the analysis as view.

1. To access the BExWeb Analyzer, logon to the attached Portal by either executingtransaction code ZPORTAL from your assigned BW system or opening your webbrowser and entering the URL http://[server]:[port]/irj/portalwhere [server] is to be replaced by your assigned BW server and [port]by a port, for example 50000.

Enter the user ID and password provided by your instructor.

Go to the Reporting, Analysis and Planning tab page and choose BEx WebAnalyzer.

a) From your Citrix desktop, choose Start → Programs → Internet Explorer

b) From the browser window, enter the URL ofhttp://[server]:[port]/irj/portal where [server] isto be replaced by your assigned BW server and [port] by a port, forexample 50000.

Note: You can use transaction ZPORTAL to launch the portal fromyour assigned BW system while working with SAP GUI.

c) On the Portal logon screen, enter your assigned user ID and password,and then click on the Log on button.

d) From the Portal, choose the Reporting, Analysis and Planning tab, and thenchoose BEx Web Analyzer.

2. Launch InfoProvider MultiProvider - Customer Sales (P_SALES01) in the BExWeb Analyzer. To find the InfoProvider, choose the New Analysis button in theBExWeb Analyzer. Then choose the Type InfoProvider from the drop-down box.Select the InfoArea tab page. Use the following path to reach the InfoProvider:Reporting Layer (P_REPLAYER) → Sales and Distribution (P_RL_SD).

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 409

Page 436: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Choose OK to launch the InfoProvider in the BEx Web Analyzer.

a) In the BEx Web Analyzer, choose the New Analysis button.

b) In the dialog window that opens, choose Type InfoProvider from thedrop-down box at the top of the window.

c) Select the InfoArea tab.

d) Use the path Reporting Layer (P_REPLAYER) → Sales and Distribution(P_RL_SD) to reach the InfoProvider MultiProvider - Customer Sales(P_SALES01).

e) Select the InfoProvider and choose OK to execute it in the BEx WebAnalyzer.

3. You can now use drag and drop navigation in the display. First drag thecharacteristic Cal. year / month into the Rows and select the values 01.2009 -03.2009. After that you would like to drilldown by Material within each Cal.year / month. Drag the characteristic Material from the Free characteristics tothe right side of the Cal. year / month heading to add that drilldown.

a) Drag Cal. year / month and drop it on top of the Rows heading.

Choose Filter from the context menu of Cal. year / month, then SelectFilter Value and choose Values ranges from the drop-down box of Showtool: to enter the values above.

Choose Add then press OK.

b) In the results, drag Material from the Free characteristics section of thenavigation area and drop it on the right side of the Cal. year / monthheading.

4. Drilldown by Material group between the Cal. year / month and Materialcharacteristics. You can either insert the Material group after the Cal. year /month or before theMaterial. In this case, drag theMaterial group characteristicfrom the Free characteristics and insert it to the left side of the Material heading.

a) In the results, drag Material group from the Free characteristics section ofthe navigation area and drop it on the left side of the Material heading.

Continued on next page

410 © 2011 SAP AG. All rights reserved. 2011

Page 437: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

5. Replace Cal. year / month with Distribution Channel in your results using dragand drop. Cal. year / month will become a free characteristic. Drag DistributionChannel from the Free characteristics and drop it on top of the Cal. year / monthheading in the results area.

a) In the results, drag Distribution Channel from the Free characteristicsportion of the navigation area and drop it on top of the Cal. year / monthheading in the results area.

6. Remove the key figure Incoming Orders by dragging it out of the results to theright of window. Then do the same thing for the key figure Sales Volume.

a) In the results, drag Incoming Orders out of the results to remove it.

b) In the results, drag Sales Volume out of the results to remove it.

7. Move the remaining key figures from the Columns to the Rows using drag anddrop. In the navigation area of the BEx Web Analyzer, drag the heading KeyFigures in the Columns section and drop it on the Rows header.

a) Under the Columns heading, drag Key Figures and drop it on top of theRows heading.

8. After reviewing this alternative, you determine that you prefer having the keyfigures information displayed in the Columns as in the original InfoProvider.Reverse the previous navigation and place the key figures heading back in theColumns.

a) Under the Rows heading, drag Key Figures and drop it on top of theColumns heading.

9. Using the context menu, remove the drilldown on Distribution Channel fromyour results. Right click on Distribution Channel and navigate within the contextmenu via Change Drilldown to the Remove Drilldown option.

a) Right click on Distribution Channel in your results and choose the pathChange Drilldown → Remove Drilldown.

10. Add a Filter menu to your results using the Filter hyperlink to facilitate changesto the filter settings for your ad-hoc analysis.

a) On the right side of the toolbar above the results, choose the Filter link.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 411

Page 438: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

11. Using the Filter drop-down box for Distribution Channel, limit your results toonly the Sold for resale distribution channel.

a) From the drop-down box for Distribution Channel, choose Edit.

b) In the resulting selection screen, choose Sold for resale as the selecteddistribution channel and press the Add button to select it.

c) Select OK when finished.

12. Remove the filter on Key Figures so that all key figures are displayed in theColumns. Do this by selecting Clear from the Key Figures drop-down box.

Edit the filter on Key Figures and choose Order Entry Quantity, Incoming OrdersEUR, Invoiced quantity and Sales Volume EUR.

a) From the drop-down box for Key Figures, choose Clear.

b) From the drop-down box for Key Figures, choose Edit and Add the KeyFigures Order Entry Quantity, Incoming Orders EUR, Invoiced quantityand Sales Volume EUR and choose OK.

c) Rearrange the key figures.

13. In addition to a tabular display, you have the option to display the data as achart or to include both a table and a chart. Choose Chart from the Display Asdrop-down box to view your results in graphical display. After that, return to atabular view to perform further analysis.

a) From the drop-down box for Display As choose Chart.

b) To return to the original table, choose Table from the Display As drop-downbox.

14. Clear the Sold for resale filter for Distribution Channel so that the results forall distribution channels will show. Select Clear from the Distribution Channeldrop-down box.

a) From the drop-down box for Distribution Channel, choose Clear.

15. In the next step of your analysis, you will use a scaling factor, then create anduse an exception.

Show the key figure Incoming Orders EUR in thousand of EUR using the scalingfactor.

Continued on next page

412 © 2011 SAP AG. All rights reserved. 2011

Page 439: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Select the Settings link and choose the Exceptions tab page. There, click on Add.

a) In the results choose Properties → Data cell from the context menu ofIncoming Orders EUR. In the Number format tab choose 1000 from theScaling factor drop-down box and choose Ok.

Note that the scaling factor listed in the heading for Incoming Orders EURis now *1000 EUR.

b) Select the Settings hyperlink on the right side of the toolbar above theresults.

c) In the Settings dialog, choose the Exceptions tab. Once there, choose Add.

16. After you chose the Add button, a wizard opens to guide you through defining anexception. In the first step, you define the type of exception. You can choose“Status Exception” for absolute key figures, such as Sales Volume EUR. Or youcan choose “Trend Exception” for relative key figures, such as Sales VolumeEUR versus Sales Volume. In this case, select the radio button for exception type“Status Exception” and then choose Next to continue.

a) Select the radio button for Status Exception

b) Select Next in the Exception Wizard to continue

17. The next step is to define the settings for the threshold value(s). Here youwill first choose the key figure structure element(s) for which the exception isdefined. You will be defining exceptions based on Sales Volume EUR. SelectSales Volume EUR from the Exception is defined on drop-down box.

The next setting required on this screen is the threshold value or values that willgenerate an exception. To define the threshold value, you select an exceptionlevel (Good 1 to 3, Critical 1 to 3, and Defective 1 to 3) and an operator. Leavethe first exception row set to “Good 1” and select “>” as the operator fromthe drop-down box. You have determined that you would like all values over1,000,000 EUR to be highlighted as “Good 1”. Enter 1000000 in the field tothe right of the “>” symbol.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 413

Page 440: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

Add a second threshold value row for the next exercise step.

a) From the Exception is defined on drop-down box, choose Sales VolumeEUR.

b) Ensure that the first drop-down box for the threshold value has a valueof Good 1.

c) From the drop-down box to the right of “for threshold values”, choose “>”.

d) Enter 1000000 in the field to the right of the “>” symbol.

e) If necessary, select Add Row to add a second threshold value row for thenext step.

18. Create a second threshold value for Sales Volume EUR that are unacceptablylow. You will categorize these as “Defective 1” for reporting purposes. Select“Defective 1” from the exception level drop-down list. Sales Volume EUR lessthan 100,000 EUR are unacceptably low and need to be highlighted on yourresults. Select “<” from the Operator drop-down list. Complete this setting byentering 100000 as your lower threshold. Move to the next step of the ExceptionWizard by choosing Next.

a) Ensure that the first drop-down box for the threshold value has a valueof Defective 1.

b) From the drop-down box to the right of “for threshold values”, choose “<”.

c) Enter 100000 in the field to the right of the symbol “<”.

d) Select Next to proceed to the next step of the Exception Wizard

19. The next screen allows you to determine which data and characteristic cells areaffected by the exception. The default setting is for the exception to affect datacells only, and specifically the “Evaluated structure element”, in other words, theelements on which the exception was defined. In this case, that element is SalesVolume EUR. Select the “Evaluated structure element” radio button and checkthe “Exception affects characteristic cell” box. Click Next to continue.

a) Select the Evaluated structure element radio button.

b) Check the Exception affects characteristic cell box.

c) Select Next to proceed to the next step of the Exception Wizard.

Continued on next page

414 © 2011 SAP AG. All rights reserved. 2011

Page 441: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

20. The next step in defining an exception is to set the visualization, or whether theexception will be indicated by a background color or by a symbol. Highlight theexception with a “Background Color”. Then select Next to proceed.

a) Select the Background Color radio button.

b) Select Next to proceed to the next step of the Exception Wizard.

21. Highlight the Material and the Material group that meet the thresholds youpreviously established, without any totals. To do this, select “Everything exceptresults” in the drop-down box next to the Material and the Material groupcharacteristics. Choose Next to proceed to the final screen of the exceptiondefinition

a) From the drop-down box next to Material, choose Everything exceptresults.

b) From the drop-down box next to Material group, choose Everythingexcept results.

c) Select Next to proceed to the next step of the Exception Wizard

22. On the final Exception Wizard screen, enter the description U## Exception001. Select Finish. The system automatically closes the Exception Wizardand returns to the BEx Web Analyzer. You may now view the analysis resultwith your exception.

a) Enter U## Exception 001 as the description of your exception.

b) Select the Finish button to exit the wizard and return to the BEx WebAnalyzer. Your results should now be displayed as specified in yourexception

23. After reviewing your results, save the result of your ad-hoc analysis as a BExQuery View. Click on Save View from the context menu within the results. EnterU## Ad Hoc Analysis 001 as the description and U##_ADHOC_001 as thetechnical name for your analysis. Finish by choosing OK.

a) From the context menu within results, select Save View.

b) Enter U## Ad Hoc Analysis 001 as the description.

c) Enter U##_ADHOC_001 as the technical name.

d) Select OK to save your ad hoc analysis result as a BEx Query View.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 415

Page 442: BW305 BW Query Design and Analysis

Unit 10: Performing Ad-hoc Analysis with the BEx Web Analyzer BW305

24. Launch view U## Ad Hoc Analysis 001 (U##_ADHOC_001) in the BEx WebAnalyzer. To find the view, choose the New Analysis button in the BEx WebAnalyzer. Then choose the Type View from the drop-down box. Select theHistory tab page.

Select your view and choose OK to launch the view in the BEx Web Analyzer.

a) In the BEx Web Analyzer, choose the New Analysis button.

b) In the dialog window that opens, choose Type View from the drop downbox at the top of the window.

c) Select the History tab.

d) Select the view and choose OK to execute it in the BEx Web Analyzer.

416 © 2011 SAP AG. All rights reserved. 2011

Page 443: BW305 BW Query Design and Analysis

BW305 Lesson: Performing Ad-hoc Analyses with the BEx Web Analyzer

Lesson Summary

You should now be able to:• Explain how the BEx Web Analyzer fits into the overall architecture SAP

NetWeaver BW• Describe the sources of data used for analysis in the BEx Web Analyzer• Perform ad-hoc analyses of data using the functions of the BEx Web Analyzer

2011 © 2011 SAP AG. All rights reserved. 417

Page 444: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Explain how the BEx Web Analyzer fits into the overall architecture SAP

NetWeaver BW• Describe the sources of data used for analysis in the BEx Web Analyzer• Perform ad-hoc analyses of data using the functions of the BEx Web Analyzer

418 © 2011 SAP AG. All rights reserved. 2011

Page 445: BW305 BW Query Design and Analysis
Page 446: BW305 BW Query Design and Analysis
Page 447: BW305 BW Query Design and Analysis

Unit Summary BW305

419 © 2011 SAP AG. All rights reserved. 2011

Page 448: BW305 BW Query Design and Analysis

Unit Summary BW305

420 © 2011 SAP AG. All rights reserved. 2011

Page 449: BW305 BW Query Design and Analysis

Unit 11Information Broadcasting

Unit OverviewThis unit will introduce you to the concepts of a broadcast and outline the BExBroadcaster's key capabilities and functions.

The settings for broadcasting via e-mail will be explained.

Unit ObjectivesAfter completing this unit, you will be able to:

• Acquire the knowledge of the purpose and key features of InformationBroadcasting

• Create a Broadcast setting for e-mails• Use the Broadcast format: MHTML• Execute a Broadcast setting ad hoc and scheduled in background processing• Acquire the knowledge to prepare for workbook precalculation using the BEx

Broadcaster

Unit ContentsLesson: Information Broadcasting Overview... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422Lesson: BEx Broadcaster Settings ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427

Exercise 19: Use the BEx Broadcaster (Optional) . . . . . . . . . . . . . . . . . . . . . . . . .437Lesson: Workbook Precalculation ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443

2011 © 2011 SAP AG. All rights reserved. 421

Page 450: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Lesson: Information Broadcasting Overview

Lesson OverviewThis lesson will introduce you to the concepts of a broadcast and outline the BExBroadcaster's key capabilities and functions.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Acquire the knowledge of the purpose and key features of InformationBroadcasting

Business ExampleYou are responsible for developing reports whose results are used by a large numberof users. To distribute the results of these queries efficiently, you want to learn how touse the key features of the BEx Broadcaster.

Key features of Information BroadcastingInformation Broadcasting is a flexible function of the Business Explorer, whichprovides the facility to distribute reporting results out to various audiences whetherthey are regular SAP NetWeaver BW users or not. Broadcasting is not restricted toone method. You can choose the source of the data, the format of the data, the targetaudience, the broadcast channel and of course the timing of the broadcast. You caneven use a combination of these for a single broadcast. There is also a Wizard to helpyou work through the settings if you are an occasional user. Broadcasts can be definedas a one time distribution or they can be set to distribute result data on a regular basisat predetermined times. The data can be either precalculated or the broadcast can senda link to the online data. Users may decide if they want to subscribe to broadcasts(or perhaps even unsubscribe).

The diagram below illustrates the positioning of the Information Broadcaster withinSAP NetWeaver BW.

422 © 2011 SAP AG. All rights reserved. 2011

Page 451: BW305 BW Query Design and Analysis

BW305 Lesson: Information Broadcasting Overview

Figure 115: Information Broadcasting Architecture

There are many scenarios in which the Broadcaster can play a key role. Broadcastingcan be executed as a one time event, regular scheduled event, or even used just to alertpersonnel of any critical situation, which needs attention. The Broadcaster can alsobe used to improve the performance of the BEx environment by using the tools toprecalculate reports or fill the query cache.

Some examples of Information Broadcasting usage are illustrated in the followinggraphic.

Figure 116: Broadcasting Scenarios

2011 © 2011 SAP AG. All rights reserved. 423

Page 452: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Broadcasting runs across the entire BEx Suite and uses a consistent interface for thecreation of broadcast settings regardless of the tool in which the broadcast is beingdefined. Broadcast data can come from any SAP NetWeaver BW data source, but alsonon-SAP data sources can be used in a broadcast. Source data can be read in realtime at the time of the broadcast as the data does not need to reside in BW to beaccessible by the Broadcaster.

Figure 117: Flexible Broadcasting Options

A key feature of the Broadcaster is the tight integration with the SAP NetWeaverPortal. Broadcasts can be sent to the portal where users can take advantage of a rangeof Knowledge Management tools such as:

• Feedback• Discussion• Rating• Subscription• Search• Subscription• Download• Collaboration

424 © 2011 SAP AG. All rights reserved. 2011

Page 453: BW305 BW Query Design and Analysis

BW305 Lesson: Information Broadcasting Overview

Figure 118: Portal Integration

A role is delivered with SAP NetWeaver BW which provides easy access toBroadcasts via the Portal. Any portal user who is assigned to this role will be able toaccess their broadcasts easily via the Portal.

2011 © 2011 SAP AG. All rights reserved. 425

Page 454: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Lesson Summary

You should now be able to:• Acquire the knowledge of the purpose and key features of Information

Broadcasting

426 © 2011 SAP AG. All rights reserved. 2011

Page 455: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Lesson: BEx Broadcaster Settings

Lesson OverviewThis lessons deals with the detailed settings of the BEx Broadcaster.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Create a Broadcast setting for e-mails• Use the Broadcast format: MHTML• Execute a Broadcast setting ad hoc and scheduled in background processing

Business ExampleYou are responsible for developing reports whose results are used by a large numberof users. To distribute the results of these queries efficiently, you want to learn how touse the key features of the BEx Broadcaster.

BEx BroadcasterThe BEx Information Broadcaster can be accessed from various BEx reporting tools.The Broadcaster can also be accessed via the Portal through the delivered BW Role.Broadcast settings can be created and inserted into BW reports by the report developerduring the development phase. The report user can also create Broadcast settingsduring the runtime as the need arises.

2011 © 2011 SAP AG. All rights reserved. 427

Page 456: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Figure 119: Accessing the Broadcaster

When to Broadcaster settings dialog appears you are able to select the type ofreporting object. Choose from the following options:

• Query• Query View• Report• Workbook• Web Template Name

Press the Open button

and you will be able to select the reporting object from the usual places, that is, Roles,InfoAreas, History, or Favorites. When you have chosen you reporting object andpressed the Transfer button you will now see the Broadcast setting for that object(if any have been created already). You may now use the context menu to performvarious maintenance activities.

428 © 2011 SAP AG. All rights reserved. 2011

Page 457: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Figure 120: Broadcast Settings Dialog

The context menu (right mouse click) on each setting allows you to Execute theBroadcast immediately but Schedule allows you to schedule the run. You can also usethe Edit option to review or change the settings of the Broadcast. The Delete optionwill allow you to remove the Broadcast if it is no longer required.

When you create a new Broadcast you are immediately prompted for the DistributionType. Choose from the following options :

• Broadcast E-mail

Broadcast the results of a report to E-mail addresses or simply Broadcast a linkto the on-line report.

To send E-mails to a distribution list, the distribution list must be recognized witha valid E-mail address (SMTP address) on the SMTP server. The E-mail canbe sent to the distribution list as soon as this E-mail address has been specifiedunder E-Mail Addresses in the broadcast setting. The SMTP server uses thesender’s SMTP address to check whether the sender is authorized to send to thedistribution list. In broadcasting, the Internet mail address that is specified in theuser master data is used as the sender’s SMTP address.

Example for Microsoft Exchange/Microsoft Outlook: Your MicrosoftOutlook address book contains the global distribution list DL EMEAEMPLOYEES. In the properties of the distribution list, the SMTP address is

2011 © 2011 SAP AG. All rights reserved. 429

Page 458: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

[email protected]. If you specify thisSMTP address as the E-mail address in the broadcast setting, the system sendsthe E-mail to all recipients on the distribution list

• Broadcast to the Portal

Broadcast the results of a report to the Portal so these become easily accessible bygroup of people who may also use the collaboration features of the KnowledgeWarehouse.

• Broadcast to the Printer

Broadcast the results of a report to a printer so that hard copies can be made.

• Broadcast E-mail (Bursting)

The Broadcaster retrieves the E-mails of the recipients from the master dataattributes of a reporting characteristic. That is the E-mail address of the costcenter manager could be an attribute of the characteristic Cost Center.

• Broadcast According to Exceptions

Broadcast the results of a report only when the exceptions defined in the queryhave been triggered.

• Broadcast (Multi Channel)

Use this option when you need a combination of the above methods.

• Precalculate Value Set

This option will allow you to schedule a collection of filter values for acharacteristic by running a control query. These collected filter values can thenbe used by a subsequent query as input parameters, thus dramatically improvingonline query performance.

• Fill OLAP cache

Use this type to set up a Broadcast to warm up the OLAP cache so that onlinequery performance will improve.

• Fill MDX cache

Use this type to set up a Broadcast to warm up the MDX cache so that onlinequery performance will improve when using reporting tools (possibly 3rd party)which use this extraction method.

Options for Output Format are dependent on the selection you have made forDistribution Type. The example in the graphic show we have selected Broadcast Emailas the distribution type and so only the relevant output format options are shown.

430 © 2011 SAP AG. All rights reserved. 2011

Page 459: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

HTML: Use this option whenever you want to send the report results as a separate filein an E-mail. This could then be saved separately by the user.

MHTML: (multipart HTML). Multipart HTML combines all the objects required forthe report together in one single file. Use this option when you want to embed the BExreport within the body of the E-mail (rather than as a separate file)

Online Links to Current Data: The “Online Link” e-mails the url for the query, whichcan then be conveniently launched and navigated on as usual.

PDF: Use this option to create a PDF file containing the report results. This will beattached to the E-mail.

Figure 121: Detailed Settings

Recipients Tab

There are three options to determine who receives E-mails: On the recipients tab, oneor more SAP users separated by semicolons can be selected. Or, “User in Role” sendsfiles to the SAP users associated with the role or roles selected. Or, E-mail addressescan be entered directly.

For SAP users and “Users in Roles”, their E-mail addresses and the communicationtype “E-Mail” are required in SU01 if you would like to use external E-mail addresses.Otherwise the Broadcast is made to the user's SAP Office Inbox.

2011 © 2011 SAP AG. All rights reserved. 431

Page 460: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

For background processing, the “Authorization User” setting can be used to assessdate format and OLAP authorizations. Leave the field “Authorization Users” empty ifthe user name is irrelevant to the generation of the document. In this case, the systemuses the current user and their authorizations in the execution of the settings.

If the document is created in the foreground, the logon language is used unless youspecify differently. If background processing is used, the language in the setting isused.

User Specific: Select this setting if you want to generate the document to be userspecific. The system generates the document for each of the specified recipients withtheir personal settings (date format, language) and data authorizations. Recipients thatare only specified with E-Mail addresses are excluded from this.

Note: There is quick text help for each of the settings, which is available when you“hover” the mouse over the setting.

Figure 122: Recipient Tab

Text Tab

Subject: Enter a subject line for the E-mail manually or use a text variable from“Attach Text Variable”. The text can be up to 50 characters long.

Importance: Select the desired importance of the E-mail (low, medium, high).

432 © 2011 SAP AG. All rights reserved. 2011

Page 461: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Contents: Enter text for the contents of the E-mail manually or use a text variable fromAttach Text Variable. When sending online links, the system automatically adds a linkto the text of the E-mail if it is not part of the text via the variable PR_ONLINE_LINK.

Figure 123: Text Tab

General Precalculation Tab

For Broadcasting via E-mail there are only two option under this tab. The themedrop-down allows you to choose a preferred “look” for the report results. If you checkthe box Only Upon Data Change then the Broadcast will only be sent if the data haschanged since the last Broadcast sent with this setting. An important prerequisite isthat this Broadcast setting has not been modified since the first Broadcast. This featureis useful as is means you can avoid resending the same Broadcast data to individuals.

2011 © 2011 SAP AG. All rights reserved. 433

Page 462: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Figure 124: General Precalculation

Filter Navigation Tab

For workbooks there is no filtering option.

The only “Output Format”, which supports filtering is “HTML” and youmust use theZip option. Filtering a query which, has sales for six different Divisions for example,would result in six separate files by Division within the zipped file.

Any characteristics in the query but not in the filter can be “filtered on”.

If Add Unfiltered View is selected, a view will be precalculated which does contain theselected characteristic.

Characteristics are either filtered individually or with a control query. For eachcharacteristic combination that occurs in the control query, a filtered document iscalculated.

Caution: You should evaluate the number of possible combinations thecontrol query may generate as this could cause a very large number of viewsto be created.

434 © 2011 SAP AG. All rights reserved. 2011

Page 463: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Figure 125: Filter Navigation Tab

Scheduling a Broadcast

There are four main options, which determine when a Broadcast will be sent.

• Immediately

Simply use the Execute button to send the Broadcast off immediately. Immediateexecution works for settings, which were saved and also for settings, whichwere not saved (an ad hoc Broadcast).

• Execution with Data Change in the InfoProvider

If you want to send a Broadcast only when there has been a change of data in theInfoProvider, which supplies the Broadcast data then choose this option.

• Execution at Predefined Time

A Broadcast setting can be assigned to a time point so that the results are sentat predefined times. The system administrator should set up the time points inadvance so that they show up in the dialog box.

• Direct Scheduling in the Background Processing

Here you can specify your own time points and also determine how manyBroadcasts should be sent (that is, I am monitoring a new store for the next 8weeks only)

2011 © 2011 SAP AG. All rights reserved. 435

Page 464: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Figure 126: Scheduling Broadcast

Broadcast WizardAs well as report developers defining the Broadcast settings at design time, users canalso create their own Broadcast settings at runtime. To help the user, particularlythe casual user, the Broadcast Wizard is available. The Broadcast Wizard takes youthrough a series of prompts where you supply the key information required to developa Broadcast. At any time you can leave the Wizard and use the standard settingsdialogs, which offer more settings.

Settings created with the Wizard can be maintained with the Broadcaster.

436 © 2011 SAP AG. All rights reserved. 2011

Page 465: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Exercise 19: Use the BEx Broadcaster(Optional)

Exercise ObjectivesAfter completing this exercise, you will be able to:• Create a BEx Broadcaster setting to distribute query results

Business ExampleYou are responsible for developing reports whose results are used by a large numberof users. To distribute the results of these queries efficiently, you want to learn how touse the key features of the BEx Broadcaster.

Task:You need to create a new query and distribute it to your own SAP NetWeaver BusinessWarehouse-user ID (User##) and to the SAP NetWeaver BW-user ID of any neighborclass participant.

1. Create a new query using the MultiProvider - Customer Orders / Billing(P_SALES02) InfoProvider within the Reporting Layer → Sales and DistributionInfoArea. Place the navigation attribute Country (T_SOLD_TO__0COUNTRY)in the Free Characteristics and the characteristic Sold-to Party (T_SOLD_TO)in the Rows.

In the Columns, include the Sales Volume EUR (0T_INVCD_V) key figure.

Save the query definition in the folder under your Training role Roles → Role##→ Queries with the description:

Description: U## Query Broadcast Setting

Technical name: U##_QD_BROADCAST001.

2. Distribute, via the BEx Broadcaster, the new query immediately to your ownSAP NetWeaver BW-user and to the SAP NetWeaver BW-user of your neighborclass participant.

Create a new Broadcast-setting by using the values:

Recipient(s) tab page:

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 437

Page 466: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Field Value

Description U## Broadcast-Email

Distribution Type Broadcast E-Mail

Output Format MHTML File, as Zip File

User Your own SAP NetWeaver BW-user;Your neighbor's SAP NetWeaverBW-user

Authorization User Your own SAP NetWeaver BW-user

Language English

Texts tab page:

Field Value

Subject U## Broadcast-Email

Importance High

Finally, execute the setting. For immediate execution you do not have to saveit first. Check the in-box of your SAP Business Workplace for a mail with thegenerated report as attachment.

3. To precalculate and distribute the report regularly, the broadcast settings canbe scheduled. This report has to be distributed today and then once every weekstarting today. As time choose the current date and the current time plus oneminute. In the Subject field enter once a week after the existing text.

Before scheduling the broadcast setting, you have to save it. Take theexisting Description U## Broadcast-Email and the Technical NameU##_BC_EMAIL.

438 © 2011 SAP AG. All rights reserved. 2011

Page 467: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Solution 19: Use the BEx Broadcaster(Optional)Task:You need to create a new query and distribute it to your own SAP NetWeaver BusinessWarehouse-user ID (User##) and to the SAP NetWeaver BW-user ID of any neighborclass participant.

1. Create a new query using the MultiProvider - Customer Orders / Billing(P_SALES02) InfoProvider within the Reporting Layer → Sales and DistributionInfoArea. Place the navigation attribute Country (T_SOLD_TO__0COUNTRY)in the Free Characteristics and the characteristic Sold-to Party (T_SOLD_TO)in the Rows.

In the Columns, include the Sales Volume EUR (0T_INVCD_V) key figure.

Save the query definition in the folder under your Training role Roles → Role##→ Queries with the description:

Description: U## Query Broadcast Setting

Technical name: U##_QD_BROADCAST001.

a) Create and save the query definition as described above.

2. Distribute, via the BEx Broadcaster, the new query immediately to your ownSAP NetWeaver BW-user and to the SAP NetWeaver BW-user of your neighborclass participant.

Create a new Broadcast-setting by using the values:

Recipient(s) tab page:

Field Value

Description U## Broadcast-Email

Distribution Type Broadcast E-Mail

Output Format MHTML File, as Zip File

User Your own SAP NetWeaver BW-user;Your neighbor's SAP NetWeaverBW-user

Authorization User Your own SAP NetWeaver BW-user

Language English

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 439

Page 468: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Texts tab page:

Field Value

Subject U## Broadcast-Email

Importance High

Finally, execute the setting. For immediate execution you do not have to saveit first. Check the in-box of your SAP Business Workplace for a mail with thegenerated report as attachment.

a) In the menu bar of the BEx Query Designer: Query → Publish → BExBroadcaster.

b) Logon to the portal with your SAP NetWeaver BW credentials.

c) Choose Create New Setting and complete the fields as described above.

Do not save the Broadcast setting.

d) Finally, Execute the setting.

e) You can then reach the in-box of your SAP Business Workplace via SAPMenu → Office → Folders → Inbox → Workplace → Inbox → UnreadDocuments.

Double-click the message in the in-box on the right-hand side to open themessage and view its contents.

3. To precalculate and distribute the report regularly, the broadcast settings canbe scheduled. This report has to be distributed today and then once every weekstarting today. As time choose the current date and the current time plus oneminute. In the Subject field enter once a week after the existing text.

Continued on next page

440 © 2011 SAP AG. All rights reserved. 2011

Page 469: BW305 BW Query Design and Analysis

BW305 Lesson: BEx Broadcaster Settings

Before scheduling the broadcast setting, you have to save it. Take theexisting Description U## Broadcast-Email and the Technical NameU##_BC_EMAIL.

a) Save the broadcast-setting.

b) Then press the Schedule button, and under Direct Scheduling in theBackground Processing, check the boxes Create New Scheduling, Periodicall 1 Week, and enter the current date and the current time plus one minute.

Finally, choose Transfer to schedule the setting.

c) If your Business Workplace is not already open, you can reach the in-boxof your SAP Business Workplace via SAP Menu → Office → Folders →Inbox → Workplace → Inbox → Unread Documents.

If it is still open, refresh the in-box view by clicking on the Refresh icon.

Double-click the message in the in-box on the right-hand side to open themessage and view its contents.

Hint: It may last a few minutes until the scheduled E-mail arrives.

2011 © 2011 SAP AG. All rights reserved. 441

Page 470: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Lesson Summary

You should now be able to:• Create a Broadcast setting for e-mails• Use the Broadcast format: MHTML• Execute a Broadcast setting ad hoc and scheduled in background processing

442 © 2011 SAP AG. All rights reserved. 2011

Page 471: BW305 BW Query Design and Analysis

BW305 Lesson: Workbook Precalculation

Lesson: Workbook Precalculation

Lesson OverviewIn this lesson you learn how to perform workbook precalculation using theBroadcasting functionality.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Acquire the knowledge to prepare for workbook precalculation using the BExBroadcaster

Business ExampleSome of your reporting users want to publish from workbooks so your project teamhas requested a review of the required setup.

Workbook PrecalculationYou can precalculate workbooks and distribute them via E-mail or publish them inthe Enterprise Portal. Before you can broadcast workbook results you must first setup the workbook precalculation service.

• Install Microsoft .Net Framework 2.0 (installed with the SAP Frontend)• Install the SAP GUI 7.20• Install the new Business Explorer Front End 7.x available with the latest SAP

GUI 7.20 version• Install Microsoft Excel 2000 or higher

Several administrative activities are necessary in the SAP NetWeaver BusinessWarehouse system for precalculation and distribution of workbooks

2011 © 2011 SAP AG. All rights reserved. 443

Page 472: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

Here are the main steps for setup:

1. Install the precalculation software that is part of the SAP NetWeaver BW add-on.2. After finishing the installation go to the Services Window of your operating

system3. Search for Service called SAP NetWeaver Business Warehouse

PRECALCULATION SERVICE 7.0. Double-click the service4. Enable Automatic as Startup type5. In the Logon tab mark the checkbox 'Allow service to interact with desktop'6. Log on to the SAP NetWeaver BW system from the PC where you created the

settings above, and enter transaction RSPRECADMIN to Create PrecalculationServer.

7. Enter the technical name of the server (max. 10 characters) and a description.The description is language dependent and appears in the BEx Broadcasterduring selection of a special precalculation server. The precalculation server,which from a technical viewpoint is an RFC server, appears in the list.

8. Start the Windows service SAP NetWeaver BW Precalculation Service. Theprecalculation server is ready and the status display of the precalculation servershows a green light. You can now see the server in the broadcaster setting dialogfor a workbook precalculation distribution type.

There is a log available to do trouble shooting. From Customizing (transaction SPRO):SAP Reference IMG > SAP NetWeaver > SAP Business Information Warehouse >Reporting-relevant Settings > General Reporting Settings in Business Explorer >Administer Precalculation Server > Select the ‘Documentation for the Server’ icon> Display the Front End Log.

444 © 2011 SAP AG. All rights reserved. 2011

Page 473: BW305 BW Query Design and Analysis

BW305 Lesson: Workbook Precalculation

Figure 127: Workbook Precalculation

To create a broadcast setting from a saved workbook (Not a temporary workbook)from the Tools option in the menu bar.

This button launches the Broadcaster. Then, the user selects a workbook and createsa new setting. Choose whether you want to send the precalculated workbook as anE-mail or whether it should be published in the Enterprise Portal. If you wish todistribute the workbook as a ZIP file, select ZIP file.

Select the Workbook precalculation tab page.

If the workbook contains variables, you can enter the desired variant, the data ofwhich is used to precalculate the workbook, in the Variants field.

Specify which precalculation server should be used. If the system should use the firstavailable pre-calculation server from the precalculation servers set in Customizing,then highlight Select Automatically.

If the system should use a special precalculation server, then highlight Special Serverand specify the server.

If this special server is not available, then the system terminates.

If required, check your settings using the Check button and choose Save. Enter atechnical name for the broadcast setting and select Transfer. The new setting appearsin the overview in the upper area of the BEx Broadcaster.

2011 © 2011 SAP AG. All rights reserved. 445

Page 474: BW305 BW Query Design and Analysis

Unit 11: Information Broadcasting BW305

If you would like to immediately distribute the workbook broadcast setting, selectExecute. A new browser window appears that displays the processing status of thebroadcast setting. If you would like to close the window, choose Cancel. If youwould like to distribute the workbook broadcast setting at a specific time or with datachange, select Schedule.

446 © 2011 SAP AG. All rights reserved. 2011

Page 475: BW305 BW Query Design and Analysis

BW305 Lesson: Workbook Precalculation

Lesson Summary

You should now be able to:• Acquire the knowledge to prepare for workbook precalculation using the BEx

Broadcaster

2011 © 2011 SAP AG. All rights reserved. 447

Page 476: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Acquire the knowledge of the purpose and key features of Information

Broadcasting• Create a Broadcast setting for e-mails• Use the Broadcast format: MHTML• Execute a Broadcast setting ad hoc and scheduled in background processing• Acquire the knowledge to prepare for workbook precalculation using the BEx

Broadcaster

448 © 2011 SAP AG. All rights reserved. 2011

Page 477: BW305 BW Query Design and Analysis
Page 478: BW305 BW Query Design and Analysis
Page 479: BW305 BW Query Design and Analysis

Unit Summary BW305

449 © 2011 SAP AG. All rights reserved. 2011

Page 480: BW305 BW Query Design and Analysis

Unit Summary BW305

450 © 2011 SAP AG. All rights reserved. 2011

Page 481: BW305 BW Query Design and Analysis

Unit 12Integrating Documents into Reports

Unit OverviewThis unit describes how to define and retrieve documents for metadata, master data,and InfoProvider data. In addition, the architecture of document integration betweenBW and the KM services of the portal is examined.

Unit ObjectivesAfter completing this unit, you will be able to:

• Describe the different document classes for metadata, master data, andtransaction data

• Define documents for these document classes• Assign and upload documents• Explain the integration between Enterprise Portal KM services and BWI

Unit ContentsLesson: Integrating Documents into Reports .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .452

Procedure: Creating a Metadata Document in the Data WarehousingWorkbench ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .459Procedure: Creating Metadata Documents in the BEx Query Designer 462Procedure: Creating a Master Data Document in the Data WarehousingWorkbench ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464Procedure: Creating an InfoProvider Data Document in the DataWarehousing Workbench... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467Exercise 20: Integrate Documents into Reports.. . . . . . . . . . . . . . . . . . . . . . . . . . .471

2011 © 2011 SAP AG. All rights reserved. 451

Page 482: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Lesson: Integrating Documents into Reports

Lesson OverviewThis lesson describes how to define and retrieve documents for metadata, master dataand InfoProvider data. In addition, the architecture of document integration betweenBW and the KM services of the portal is examined.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Describe the different document classes for metadata, master data, andtransaction data

• Define documents for these document classes• Assign and upload documents• Explain the integration between Enterprise Portal KM services and BWI

Business ExampleIn view of the meaningful value of analytical reports, it is of an enormous advantageto be able to access additional documentation within a report. Additional informationabout a query as a whole, about components in a query, individual characteristicvalues, as well as key figure values for combinations of characteristic values isextremely useful. When defining characteristic values, it is often desirable to linktechnical drawings, detailed pictures or other files as documentation.

452 © 2011 SAP AG. All rights reserved. 2011

Page 483: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Using the Document Browser

Figure 128: Accessing the Document Browser

In SAP NetWeaver BW, you can add unstructured information to data and objects.Unstructured information is documents in various formats (such as screen or textformats), versions and languages. The documents help to describe data and objects inBW in addition to the existing structured information. This allows you for example toadd images of employees to their personnel numbers or to describe the meaning ofcharacteristics or key figures in a text document.

From SAP NetWeaver BW 7.0 on, the concept of document integration has beenupgraded significantly over prior versions. Because of the close integration of BWand Knowledge Management (KM), users have more choices of where and howdocuments can be accessed. Enterprise Knowledge Management provides centraland role-based access to the information in your company and creates a connectionbetween structured business data and unstructured documents. The DocumentBrowser used in the past has also undergone changes to provide several new servicesto the user. Now, documents of all types can be created and edited from the DocumentBrowser. In addition, all the common services provided by KM can be assigned tothese documents. This can enhance the degree of collaboration around importantdocuments in your organization.

From a report displayed on the web, it is a simple task to create a new documentby uploading an existing file. From the context menu of the web report, chooseDocuments → Upload to start the dialog to name and upload the file. Once the filehas been uploaded to the CM Repository on the portal, a confirmation message willbe issued.

2011 © 2011 SAP AG. All rights reserved. 453

Page 484: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Figure 129: Document Browser Web Dialog

In the new Document Browser and in the List of Documents web item, you candisplay the columns “Name”, “Content”, “Assignment (to the BW Data)” and“Author/Change Date”. The columns can be switched on and off online or in theconfiguration. This means it is possible to display the contents of the documents in thelist of documents only. The latter is especially useful for comments.

If configured, the user can edit the document directly in the Document Browser. Theuser can also:

• Upload new documents• Add Links to documents (only for documents in the CM Repository)• Add Comments about the documents

These comments are not embedded in the document but simply are references tothe document.

454 © 2011 SAP AG. All rights reserved. 2011

Page 485: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Figure 130: KM and Collaboration Services

KM integration makes all of the KM services available for BW documents (forexample, text search, text mining, subscription, rating, personal documents,discussions). These services allow efficient collaboration in your corporate portal andallow individual users and teams to communicate within their business processesand access shared data in virtual rooms.

This collaboration provides the following benefits:

• Increases user productivity by enabling more efficient project work for teams• Encourages innovation by optimizing collaboration in teams• Reduces costs by shortening the collaboration cycle• Optimizes decisions by increasing the quantity of information that the decisions

are based on• Accelerates problem solving processes.

Within SAP NetWeaver, you can integrate third-party services, for example, e-mailand calendar functions from Microsoft Exchange or Lotus Domino and WebEx foronline sessions. You can integrate SAP NetWeaver applications (for example, BWanalyses) and third-party applications in rooms. Users can use the CollaborationLaunch Pad in the portal and the member list in rooms to launch collaboration services.

2011 © 2011 SAP AG. All rights reserved. 455

Page 486: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Figure 131: Example: Feedback Service

For each document shown in the Document Browser, you can configure the feedbackservice to be available to the user. This allows for the quick entry and distribution offeedback from the user back to the author of the document.

Integrating DocumentsFor metadata, master data and transaction data, you can define and even link one ormore documents in various formats, versions and languages.

SAP distinguishes between logical documents, which are linked to BW objects usingattributes (for example, object type and object name), and physical documents whichbelong to a specific logical document as individual characteristic values (versions) andwhich present meta-descriptions for individual files using their attributes (for example,language and format). You can store the individual files either on an SAP database oron an external content server using an HTTP interface.

In the Data Warehousing Workbench, you choose Documents to reach the navigationwindow for the three document classes Metadata, Master Data, and InfoProviderData.

Hint: To link one document from any document class to another document,without actually linking to this document physically, you have to save bothdocuments in a format that supports hyperlinks: such as HTML, MicrosoftWORD, or Microsoft EXCEL.

456 © 2011 SAP AG. All rights reserved. 2011

Page 487: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Integrating Metadata DocumentsMetadata describes the technical and semantic structure of objects. It describes allobjects in an SAP NetWeaver BW system, including InfoObjects, InfoProviders, andall objects for analyzing and planning, such as Queries and Web applications. You canuse the Metadata Repository to access information about these objects centrally and toview their properties and the relationships between the various objects.

You can also add unstructured SAP NetWeaver BW information to the objects.Unstructured information is documents in various formats (such as screen or textformats), versions and languages.

You can define documents for metadata, for example, for the following BW objects:

• InfoObjects• InfoProviders• other objects of the Data Warehousing Workbench• Queries• Reusable Query components

You can define additional explanations for individual structural components,for changes that have been made and the reasons for the changes, for historicaldevelopments and so on here.

Figure 132: Metadata Document Integration I.

2011 © 2011 SAP AG. All rights reserved. 457

Page 488: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Figure 133: Metadata Document Integration II.

458 © 2011 SAP AG. All rights reserved. 2011

Page 489: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Creating a Metadata Document in the Data WarehousingWorkbench

1. From the SAP Menu, choose Modeling → Data Warehousing Workbench:Modeling → Documents → Metadata.

2. In the upper window, define the technical name of the Object Type for example,Query Element (ELEM) if you want to create a document for a query. Use thevalue help to find the Object Name.

3. Use the Create symbol in the middle window to reach the Create New Documentdialog box. Alternatively, you can use the Import... symbol to integrate adocument for the characteristic value.

4. On the Shared tab page, the document class is automatically given; therefore,you only need to define a Name and Description and select the MIME Type thatyou want to use to create your document.

Caution:

• The name has to be unique among all documents in a documentclass.

• The description appears later as a hyperlink text in the accessbrowser window.

Hint: Multipurpose Internet Mail Extensions: MIME is an enhancementof the original Internet Email Protocol, which enables different types ofdata to be exchanged on the Internet. It contains, among other things,audio, video, graphical, and application programs as well as ASCII files(originally only ASCII files).

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 459

Page 490: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

5. On the Log. Doc. Properties tab page, you can decide whether the documentis created as Online Documentation.

Hint: Online Documentation

The logical document properties for metadata include Object Name,Object Type, and Online Documentation (yes/no). If you defineseveral documents for a metadata object with the property OnlineDocumentation, only the last created document displays as an onlinelink, all previous documents display as link references. The OnlineDocumentation displays by default as F1 help for the object to which itis assigned.

6. Choose Start Editor to reach an application that corresponds to the MIME typethat you selected. You can define a text there.

7. Save your entries and close the application.

8. You can then display the documents you defined from the report itself viathe Document Browser by choosing the document icon, or from the contextmenu, Goto → Documents (BEx Analyzer) respectively Documents → DisplayDocuments (BEx Web Analyzer).

9. You can also edit and view the documents within the Data WarehousingWorkbench from the maintenance of the BW object via Goto → Documents.

10. Or you can access the documents in the Metadata Repository for the relevantBW object.

Creating Metadata Documents in the BEx Query DesignerFor queries and reusable query components such as Restricted Key Figures,Calculated Key Figures, Filters, Structures, and Variables you can edit documentsalso directly in the BEx Query Designer.

460 © 2011 SAP AG. All rights reserved. 2011

Page 491: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Figure 134: Creating a Metadata Document for the query in the Query Designer

Figure 135: Creating a Metadata Document for a Calculated Key Figure in theQuery Designer

2011 © 2011 SAP AG. All rights reserved. 461

Page 492: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Creating Metadata Documents in the BEx Query Designer

1. To edit or view a document for the query definition: from the menubar choose

Query → Documents or choose the button from the Query Designer toolbar.

2. To edit or view a document for a reusable query component e.g. calculated keyfigure: from the InfoProvider area: Key Figures → Calculated Key Figures →the desired key figure → Context menu → Documents.

3. In the Query Designer, the Document Browser within the Documents tab opens.There you can edit or view documents.

4. When you select New you can choose either to create a Comment or a Formattedtext, or you can Upload .

In each case, you have to insert a technical name and a description for the newdocument.

Integrating Master Data DocumentsYou can define documents for single characteristic values for master data.

Here, you can define pictures for personnel numbers, descriptions, and technicalspecifications of materials, original documents and so on.

Figure 136: Master Data Document Integration I.

462 © 2011 SAP AG. All rights reserved. 2011

Page 493: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Figure 137: Master Data Document Integration II.

2011 © 2011 SAP AG. All rights reserved. 463

Page 494: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Creating a Master Data Document in the DataWarehousing Workbench

1. From the SAP Menu, choose Modeling → Data Warehousing Workbench:Modeling → Documents → Master Data.

2. Define a characteristic (for example, Material with the technical name:0MATERIAL) and a characteristic value (for example, pump with the technicalname: P-104) in the upper right window.

3. Use the Create symbol in the lower right window to reach the Create NewDocument dialog box. Alternatively, you can use the Import... symbol tointegrate a document for the characteristic value.

4. On the Shared tab page, the document class is automatically given; therefore,you only need to define a Name and Description and select the MIME Type thatyou want to use to create your document.

5. Choose Start Editor to reach the application that corresponds to the MIME typethat you selected. You can define a text there.

6. Save your entries and close the application.

Hint: Alternatives

• For master data, you can select an object from Data WarehousingWorkbench: Modeling → InfoObjects and, using the context menu,Maintain Master Data → Selection → then Execute, you reachthe Maintain Master Data: List dialog box. You can select acharacteristic value here and choose Goto → Documents to definea document.

Hint: You can then display the documents you defined from the reportitself via the Document Browser by choosing the document icon, or fromthe context menu, Goto → Documents (BEx Analyzer) respectivelyDocuments → Display Documents (BEx Web Analyzer).

You can also use the context menu Documents → Create New Commentor Documents → Create New Formatted Text or Documents → Uploadto create a new document.

464 © 2011 SAP AG. All rights reserved. 2011

Page 495: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Integrating InfoProvider Data DocumentsYou can assign one or more documents to the transaction data of an InfoProvider (aquery, for example). You also have the option of assigning any number of documentsto a combination of characteristic values and key figures. The documents are thendisplayed in the report in a context-sensitive fashion, which means that access to thedocuments adjusts according to the navigational state of the report.

Hint: Characteristic is Document Property.

In characteristic InfoObject maintenance on the General tab page, you determinewhether the characteristic is permitted as a document attribute. You can annotatetransaction data with relation to a characteristic in SAP BW in this way. Example: Youdefine the following as a text document for the sales key figure, the month January2006 and the country US: The sales for the US in January 2006 were extremelylow due to a weak exchange rate. The characteristics month and country must havethese properties activated.

Figure 138: InfoProvider Data Document Integration I.

2011 © 2011 SAP AG. All rights reserved. 465

Page 496: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Figure 139: InfoProvider Data Document Integration II.

466 © 2011 SAP AG. All rights reserved. 2011

Page 497: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Creating an InfoProvider Data Document in the DataWarehousing Workbench

1. From the SAP Menu, choose Modeling → Data Warehousing Workbench:Modeling → Documents → InfoProvider Data.

2. Either define a combination of InfoProvider, Query, Key Figure, andcharacteristic values in the upper window, OR

3. Use Create icon on the toolbar in the middle window to define a name and adescription (document class is given, as is the MIME type) on the Shared tabpage. Then, on the Log. Doc. Properties tab page for the current attributes,define a Characteristic Value to create a document using the objects listed above.

4. Choose Start Editor to reach the application that corresponds to the MIME typethat you selected. You can define a text there.

5. Save your entries and close the application.

6. You can display the documents defined from the report itself using the contextmenu, Documents → Display Documents.

Hint: General

Generally, you can use the context menu in the report and then Goto→ Documents (BEx Analyzer) respectively Documents → DisplayDocuments (BEx Web Analyzer) to reach the Document Browserwindow and create a new document using New → Comment (orFormatted text or Upload).

2011 © 2011 SAP AG. All rights reserved. 467

Page 498: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

BW and KM Document Integration Architecture

Figure 140: BW and KM Document Integration Architecture

The graphic above shows the relationships of the various components used indocument integration. Users in any BEx query, view or web application can access theDocument Browser. The Document Browser can also be invoked via the icons for thedocuments attached to the query, view or web application.

The BEx Portfolio or any KM iView that gives access to BW metadata, master data,and transactional documents can also be used to call up the new Document Browser.Within the Document Browser, a number of different services can be used, dependingon which ones have been made available to the user through configuration activities.

The Repository Framework includes repository managers for documents stored onBW and in the Content Management (CM) repository on the portal. This allows theuser access to documents stored on either system.

468 © 2011 SAP AG. All rights reserved. 2011

Page 499: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

The BW documents for Metadata, Master Data and InfoProvider Data can beintegrated into the portal-based KM in different ways:

• With the Repository Manager for BW Documents. In this case the documentsare physically stored on the BW server in the SKWF framework. The RepositoryManager for BW Documents is available in the portal as of Release SAPNetWeaver '04.

• With a migration of documents into a CM repository. In this case, the documentsare physically stored in the portal. The CM Repository Manager gives access tothese documents. This allows the documents for master data and InfoProviderdata to be assigned on the hierarchy node level as well (in addition to thecharacteristic values).

• With the Repository Manager for BW Metadata. In contrast to manuallycreated documentation for metadata, the HTML-based documentation for theBW metadata will continue to be generated automatically from the metadatarepository as needed. The Repository Manager for BW Metadata is available inthe portal as of Release SAP NetWeaver 2004 (with SAP BW 3.5).

2011 © 2011 SAP AG. All rights reserved. 469

Page 500: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

470 © 2011 SAP AG. All rights reserved. 2011

Page 501: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Exercise 20: Integrate Documents intoReports

Exercise ObjectivesAfter completing this exercise, you will be able to:• Integrate and show different documents for metadata, master data and

InfoProvider data in reports

Business ExampleSo that users can assess analyses in a report more effectively, you have been askedto provide access to documents in the report. Moreover, you are expected to getin touch with the relevant departments so that you can create images, constructiondiagrams, provide explanations and so on for individual characteristic values throughdocument access. You also have to define your own comments for your query andquery components and for a key figure value.

Task 1:In the first step, you want to define documents for a characteristic value (MasterdataDocument).

1. To define a text for a characteristic value, go to the SAP Menu → Modeling→ Data Warehousing Workbench: Modeling → Documents → Master Data.For the characteristic Material (0MATERIAL) value P-102 define a new textdocument as follows:

Name: U##_DOC_MA001

Description: U## Masterdata Document 001

Open the editor and define the following text:

Note: This pump is a discontinued model.

Save your entries and close the editor. A document link displays in the middleright window for further access. Using the Details icon, you can view thedocument in the lower right window.

2. Now define an image document for the same characteristic value. To do this,you have to choose SAP Menu → Office → Folders → Shared Folders → BWTraining: Graphical Material and find the Santa Fe Stucco bitmap file.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 471

Page 502: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Export the attachment to the My Documents folder of your disk drive usingExport and Save under the File Name: SantaFeStucco##.bmp.

Return to the document maintenance in the Data Warehousing Workbench andtheMaster Data, in order to define the picture for the characteristic 0MATERIALand the characteristic value P-102.

In the bar in the middle of the window, choose Import.... The Open dialog boxappears. From the My Documents folder, choose SantaFeStucco##.bmp, andchoose Open. In the Create New Document dialog box, enter:

Name: U##_DOC_MA002

Description: U## Masterdata Document 002

and save your entries.

Using the Display icon or the Details icon, you can view the image in the lowerright window.

Task 2:In the second step, you need to create a query definition that allows analysis of salesvolume for some pumps.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01) inthe Reporting Layer → Sales and Distribution InfoArea.

Include the characteristic Material (0MATERIAL) in the Rows, and thecharacteristic Cal. year / month (0CALMONTH) and the key figure Sales VolumeEUR (T_INVCD_V) in the Columns.

Restrict Material (0MATERIAL) to the values P-101 ......P-105 and Cal. year/ month (0CALMONTH) to the values 10/2006 .......12/2006 in the DefaultValues area.

2. In order to deliver additional information for the users of the query create adocument for the query definition.

Document for the query: “This query is for training purposesonly.”

Name: U##_DOC_ME001

Description: U## Metadata Document 001

3. In the executed report there should appear Document Links to indicate the BWobjects for which documents are existing.

Continued on next page

472 © 2011 SAP AG. All rights reserved. 2011

Page 503: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

4. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U## Query Document Integration 001

Technical name: U##_QD_DOC001

Execute the query in the BEx Analyzer or in the BEx Web Analyzer.

5. You see a new symbol in the report Display Documents for some BW objects.

Hint: When executing your report on the web you have to check theDocument Icons boxes under Settings → Table to view the documentsymbols . The properties defined in the query do not take effect here, butthe settings within the Web Item are relevant.

Access the Document Browser Dialog to view the different documents byclicking the document link or via the context menu and evaluate the furtherpossibilities within the Document Browser Dialog by clicking New and View.

6. You want to comment a specific key figure value: the Sales Volume EURfor the Material value P-102 and the Cal. year / month value 11/2006. Thecomment is: “No sales possible for P-102 in Nov.2006 dueto technical problems.”

Technical Name: U##_DOC_IP001

Description: U## InfoProvider Data Document 001

Create this InfoProvider Data document directly from the executed report.

2011 © 2011 SAP AG. All rights reserved. 473

Page 504: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Solution 20: Integrate Documents intoReportsTask 1:In the first step, you want to define documents for a characteristic value (MasterdataDocument).

1. To define a text for a characteristic value, go to the SAP Menu → Modeling→ Data Warehousing Workbench: Modeling → Documents → Master Data.For the characteristic Material (0MATERIAL) value P-102 define a new textdocument as follows:

Name: U##_DOC_MA001

Description: U## Masterdata Document 001

Open the editor and define the following text:

Note: This pump is a discontinued model.

Save your entries and close the editor. A document link displays in the middleright window for further access. Using the Details icon, you can view thedocument in the lower right window.

a) Choose SAP Menu → Modeling → Data Warehousing Workbench:Modeling → Documents → Master Data.

b) In the upper right window, enter characteristic 0MATERIAL andcharacteristic value P-102.

c) From the bar in the middle of the window, choose Create. In the tab Shareddefine the name and description given above.

d) Choose Start Editor and enter the text given above.

e) To save your work and leave the editor, choose File → Save → File → Exit.

f) Choose the Display icon or the Details icon to view the created document.

2. Now define an image document for the same characteristic value. To do this,you have to choose SAP Menu → Office → Folders → Shared Folders → BWTraining: Graphical Material and find the Santa Fe Stucco bitmap file.

Export the attachment to the My Documents folder of your disk drive usingExport and Save under the File Name: SantaFeStucco##.bmp.

Continued on next page

474 © 2011 SAP AG. All rights reserved. 2011

Page 505: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Return to the document maintenance in the Data Warehousing Workbench andtheMaster Data, in order to define the picture for the characteristic 0MATERIALand the characteristic value P-102.

In the bar in the middle of the window, choose Import.... The Open dialog boxappears. From the My Documents folder, choose SantaFeStucco##.bmp, andchoose Open. In the Create New Document dialog box, enter:

Name: U##_DOC_MA002

Description: U## Masterdata Document 002

and save your entries.

Using the Display icon or the Details icon, you can view the image in the lowerright window.

a) Fulfill the steps as described above.

Task 2:In the second step, you need to create a query definition that allows analysis of salesvolume for some pumps.

1. Create a new query using the MultiProvider - Customer Sales (P_SALES01) inthe Reporting Layer → Sales and Distribution InfoArea.

Include the characteristic Material (0MATERIAL) in the Rows, and thecharacteristic Cal. year / month (0CALMONTH) and the key figure Sales VolumeEUR (T_INVCD_V) in the Columns.

Restrict Material (0MATERIAL) to the values P-101 ......P-105 and Cal. year/ month (0CALMONTH) to the values 10/2006 .......12/2006 in the DefaultValues area.

a) Include the characteristic Material (0MATERIAL) in the Rows, and thecharacteristic Cal. year / month (0CALMONTH) and the key figure SalesVolume EUR (T_INVCD_V) in the Columns.

b) RestrictMaterial (0MATERIAL) to the values P-101 ......P-105 and Calyear/ month (0CALMONTH) to the values 10/2006 .......12/2006 in the DefaultValues area.

2. In order to deliver additional information for the users of the query create adocument for the query definition.

Document for the query: “This query is for training purposesonly.”

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 475

Page 506: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Name: U##_DOC_ME001

Description: U## Metadata Document 001

a) To edit the document for the query definition: from the menubar Query →

Documents or choose the button from the query designer toolbar.

Enter your credentials (User## and Password), the Document Browserappears.

Then select New → Comment, insert the document text from above and usedescription and name from above.

3. In the executed report there should appear Document Links to indicate the BWobjects for which documents are existing.

a) For the query, choose Properties → Display → Document Links and checkall the 3 boxes.

4. Save the query in your role Role## (U##_ROLE) → Queries:

Description: U## Query Document Integration 001

Technical name: U##_QD_DOC001

Execute the query in the BEx Analyzer or in the BEx Web Analyzer.

a) To save the query, choose Save Query

b) Choose Roles → Role## (U##_ROLE) → Queries and enter the followingdescription and technical name:

Description: U## Query Document Integration 001

Technical name: U##_QD_DOC001

c) Choose Save.

d) Execute the query in the BEx Analyzer by choosing the button Exit and usethe Query or in the BEx Web Analyzer by choosing the button Execute.

5. You see a new symbol in the report Display Documents for some BW objects.

Hint: When executing your report on the web you have to check theDocument Icons boxes under Settings → Table to view the documentsymbols . The properties defined in the query do not take effect here, butthe settings within the Web Item are relevant.

Continued on next page

476 © 2011 SAP AG. All rights reserved. 2011

Page 507: BW305 BW Query Design and Analysis

BW305 Lesson: Integrating Documents into Reports

Access the Document Browser Dialog to view the different documents byclicking the document link or via the context menu and evaluate the furtherpossibilities within the Document Browser Dialog by clicking New and View.

a) BEx Analyzer: choose Context Menu → Goto → Documents .

BEx Web Analyzer: choose Context Menu → Documents → DisplayDocuments.

b) To view the document for the query:

BEx Analyzer: choose Context Menu → Goto → Query Documents .

BEx Web Analyzer: choose Info Button → Query Documentation.

6. You want to comment a specific key figure value: the Sales Volume EURfor the Material value P-102 and the Cal. year / month value 11/2006. Thecomment is: “No sales possible for P-102 in Nov.2006 dueto technical problems.”

Technical Name: U##_DOC_IP001

Description: U## InfoProvider Data Document 001

Create this InfoProvider Data document directly from the executed report.

a) For the key figure value Sales Volume EUR , for the Material value P-102:and the Cal. year / month value 11/2006:

in the BEx Analyzer: choose Context Menu → Goto → Documents →New → Comment ,

in the BEx Web Analyzer: choose to access the Context Menu → CreateNew Comment,

and insert the document text from above by using description and technicalname from above.

2011 © 2011 SAP AG. All rights reserved. 477

Page 508: BW305 BW Query Design and Analysis

Unit 12: Integrating Documents into Reports BW305

Lesson Summary

You should now be able to:• Describe the different document classes for metadata, master data, and

transaction data• Define documents for these document classes• Assign and upload documents• Explain the integration between Enterprise Portal KM services and BWI

478 © 2011 SAP AG. All rights reserved. 2011

Page 509: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Describe the different document classes for metadata, master data, and

transaction data• Define documents for these document classes• Assign and upload documents• Explain the integration between Enterprise Portal KM services and BWI

2011 © 2011 SAP AG. All rights reserved. 479

Page 510: BW305 BW Query Design and Analysis

Unit Summary BW305

480 © 2011 SAP AG. All rights reserved. 2011

Page 511: BW305 BW Query Design and Analysis
Page 512: BW305 BW Query Design and Analysis
Page 513: BW305 BW Query Design and Analysis

Unit Summary BW305

481 © 2011 SAP AG. All rights reserved. 2011

Page 514: BW305 BW Query Design and Analysis

Unit Summary BW305

482 © 2011 SAP AG. All rights reserved. 2011

Page 515: BW305 BW Query Design and Analysis

Unit 13Using Report-Report-Interface

Unit OverviewIn this unit you will become acquainted with the functionality of theReport-Report-Interface (RRI). With the help of the RRI, the user can jump from areport into another report to drill down into more detail.

Unit ObjectivesAfter completing this unit, you will be able to:

• Use the report/report interface (RRI) for navigating within SAP NetWeaver BWand for jumping into other attached systems

• Define a jump that sends a parameter to a URL

Unit ContentsLesson: Using Report-Report-Interface... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484

Exercise 21: Use Report-Report-Interface ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493

2011 © 2011 SAP AG. All rights reserved. 483

Page 516: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

Lesson: Using Report-Report-Interface

Lesson OverviewIn this lesson, you will become acquainted with the functionality of the report/reportinterface (RRI). With the help of the RRI, the user can jump from a report into anotherreport in order to drill down into more detail.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Use the report/report interface (RRI) for navigating within SAP NetWeaver BWand for jumping into other attached systems

• Define a jump that sends a parameter to a URL

Business ExampleWhen executing queries written against aggregated data (e.g. InfoCube), there aretimes you might like to see more detailed information. If that detailed information isfound in a DataStore Object query or a report or transaction in other attached systems,you can drill through to those other sources of detailed information using the reportto report interface.

484 © 2011 SAP AG. All rights reserved. 2011

Page 517: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Report/Report Interface

Figure 141: Report/Report Interface

The report/report interface (RRI) makes the parameterized call of programs possiblefrom other programs. It gives the user the ability to jump from one report intoanother report that supplies further information. In SAP BW, you can arrive at branchdestinations within and outside of the BW system.

With the report/report interface, you can create several individual reports, each with alimited number of characteristics. These can be linked one to another to make veryflexible data evaluations possible online.

With the report/report interface you can:

• Link reports containing different characteristics of an application. This makes itpossible to report on more objects than you could with any individual report

• Connect reports that were created in different application classes

2011 © 2011 SAP AG. All rights reserved. 485

Page 518: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

Jump Targets (RRI Receivers)

Figure 142: Jump Targets

From a query, the destination to which you branch is called a Jump Target.Depending on the report types you have selected for a query in the sender/receiverassignment, you can leave the query and:

• Start another query where the entry variants are filled by the selection conditionsand element definitions of the selected cells of the sender query

• Start reports, functions, and transactions inside and outside of SAP BW

Hint: You need to have defined the sender/receiver assignment for the systemto be able to offer jump targets.

486 © 2011 SAP AG. All rights reserved. 2011

Page 519: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Figure 143: Choosing a Jump Target

In order to start a jump, highlight a characteristic value and then use the context menuto launch the Goto option. The menu will open up to show the assigned jump targets.With a single click you can go to the desired jump target. The selections made in thequery definition are transferred into the jump target, this means that you can continueyour navigation where you left off. You can link a whole sequence of reports so thatyou can drill down and reach increasingly deeper levels of information.

When jumping to a jump target outside of SAP BW, you need to select a sourcesystem and log on if necessary. You only need to log on once for each Excel session,even if several workbooks are opened.

2011 © 2011 SAP AG. All rights reserved. 487

Page 520: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

Working with the RRI

Figure 144: Working with the RRI

You use the sender/receiver assignment to make the necessary settings for connectingan SAP BW query to the report/report interface (RRI) in the BEx Analyzer. You canassign receiver reports to a sender report within SAP BW as well as in SAP ECC.

Creating Sender/Receiver Assignments

Tab Page What You Should Know

Query Specify the technical name of the sender query. You can alsochoose a query using input help.

InfoCube If you want to assign the same jump target to all queries in anInfoCube, enter the technical name of the required InfoCube.You can also choose the InfoCube using input help (F4)

488 © 2011 SAP AG. All rights reserved. 2011

Page 521: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

After completing this initial information, you can select the type of report for thereceiver report. The following types are available:

• BW BEx Query• BW Web Application (SAP NetWeaver 7.0)• BW Web Application (SAP BW 3.x)• Crystal Report• Xcelsius dashboard• InfoSet Query (queries on Classic InfoSets)• SAP Transaction• ABAP/4 Report• Web Address

Then select the source system containing the query jump target:

• Local: The jump target is within SAP BW.• Source system: The jump target is outside of SAP BW.

– One source system as a target system:

Specify the name of the source system. You can also choose the sourcesystem using F4 input help.

– All source systems as target systems:

Set the indicator in the All Source Systems checkbox. Specify the sourcesystem in which you first want to choose the required report.

For the receiver report, you can also assign another name.

Hint: The name provides orientation for the final user. Pay attention tochoosing a clear and informative designation.

Hint: If an InfoCube is filled from several InfoSources, you should specifyfrom which InfoSource the data is to be extracted when allocating the receiverreport. Select the desired InfoSource in the InfoSource column using theF4 help.

Caution: If, during the load process (source system → BW), fields areconverted into this InfoSource, then you must create a conversion routine forthe read process in the InfoSource.

2011 © 2011 SAP AG. All rights reserved. 489

Page 522: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

Example: Within an RRI, if the InfoObject 0FISCPER (2002.003) is handedover as parameter to the source system, then this must be divided again intotwo individual fields (YEAR 2002 and PERIOD 003). The source systemdoes not have a data field with the compound information and could nototherwise interpret the parameters transferred.

Sometimes it is desirable to maintain the field assignments individually for theparameter transfer of the transmitter to the receiver. For this, you can use BAdISMOD_RSR00004 to define the mapping logic.

Caution: Calling up specific reports takes a long time if selections aremissing. When jumping in SAP BW, you can stop a report from beingstarted if it does not fill certain conditions that you determined previously asmandatory entries. In the following, the conditions you can set are described.

1. Select the relevant target entry in the Receiver table.2. Choose Assignment Details. The Field Assignments dialog box appears.3. To make changes for the individual fields, choose the required settings from the

drop down list for the respective cell.

GroupDe-scription

Default Setting Alternative

Type Generic• V Variable• I InfoObject• 3 Table field• P URL Parameters• X Delete

SelectionType

*• P Parameter• E Individual Values• I Interval• S Select option• H Hierarchy nodes

Mandatoryentry

No (emptycheckbox)

Yes (indicator set)

490 © 2011 SAP AG. All rights reserved. 2011

Page 523: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

When the system calls up the receiver, the settings made in the Field Assignmentsdialog box are set. The system proposes all other field assignments generically.

External URL as Jump Target

Figure 145: Using a URL as a Jump Target

You can also indicate an URL address as a jump target. In the Assignment Detailsfunction in the Query Jump Targets, you define the parameter to be passed to the URL.To jump to the search term on the Web page, you need the Web address of the page towhich the input field for the search term refers as well as the name of the input field.To do this, the Internet source code must be interpreted. You have two options:

1. You look at the HTML code of the Web page and look for the tag labeled inputtype and within this tag you will find the name of the input field.

2. Execute the action on the Web page with a search term and in the URL of thenew window, the query string appears after the question mark and there youwill find the parameter.

In the example ((http://quote.money.cnn.com/quote/quote?symbols=SAP), theweb page field to be supplied with the parameter is symbols.

So, for example, the stock symbol of a customer can be passed to a receiver URL andthe current share quotation can be returned.

2011 © 2011 SAP AG. All rights reserved. 491

Page 524: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

492 © 2011 SAP AG. All rights reserved. 2011

Page 525: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Exercise 21: Use Report-Report-Interface

Exercise ObjectivesAfter completing this exercise, you will be able to:• Use the Report-Report-Interface (RRI) for drilling from SAP NetWeaver

Business Warehouse into other queries and for jumping into other attachedsystems

• Define a jump to a URL with a parameter transfer

Business ExampleYou are responsible for creating reports allowing users to find increasingly moredetailed data. To accomplish this, you want to design reports that have the capabilityto call jump targets, which are other reports or transactions and even a URL on theweb. Certain parameters, such as filter values, are to be passed to the jump targets.

Task 1:Define two reports. The first report is based on the MultiProvider - Customer Salesand should show the incoming orders on the customer level. On the customer-level,you want to be able to display the associated order items.

Define a second report on the Order Details DSO object. This DSO stores theindividual line items of the sales orders that are reported in the MultiProvider. Thematerial number is contained in the order items.

1. Starting from the BEx Analyzer, create a query, based on the MultiProvider -Customer Sales (P_SALES01) in the Reporting Layer → Sales and DistributionInfoArea. Select the Sold to party and Postal Code as the characteristics andIncoming orders EUR as the key figure. Use the calendar month as a freecharacteristic and restrict it to the time frame of December 2009.

Use a condition to filter out all zero values for Incoming orders EUR.

Save the query definition in your Training role Roles → Role## → Querieswith the description:

Description: U## Query RRI Orders

Technical name: U##_QD_JUMP001

2. Create another query using the Order Details (P_SD01) DSO in the Reportinglayer → Sales and Distribution InfoArea. Include the sales document number,item and material number in the rows, as well as key figures for net weight in kg,

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 493

Page 526: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

net price, and net value in the columns. Include the customer number as a freecharacteristic and restrict it with filter variable T_SOLDTO. Otherwise there is adanger that when executing the query separately, the entire DSO with all singleitems would be selected. Include calendar month in the free characteristics aswell.

Save the query definition under Roles → Role## → Queries with the description:

Description: U## Query RRI Order Details

Technical name: U##_QD_JUMP002

3. Create an RRI setting to link the second query as a jump target for the first query.Test your settings when finished.

4. Demonstrate the RRI link between the two queries by using the BEx Analyzerto execute the query U## Query RRI Orders (U##_QD_JUMP001)and then by selecting a customer value, jump to the query U## Query RRIOrder Details (U##_QD_JUMP002).

Task 2:From the second report on the Order Details DSO object, based on the order number,allow the user to branch to the original order in the source system using transactionVA03. Create for these connections the appropriate jump targets in the RRI.

1. Create a second RRI jump target, this time from the second queryU## Query RRIOrder Details to transaction VA03 in the source system. With this transaction,you can display the original order in the source system.

To access the source system, you have to identify the InfoSource that is supplyingthe data to the DSO object. In the InfoSource field, enter 2LIS_11_VAITM.You may enter the value directly into the field or use the F4 Help function.

Test your settings when finished. To sign on to the source system enter the user:BWDISPLAY and the password: welcome.

Task 3:Define for the first report a further jump target to pass the customer's location to theURL www.wetter.net to see the weather for their location.

1. Create another RRI setting for the first query U## Query RRI Orders to executethe Web site www.wetter.net, using T_SOLD_TO__0POSTAL_CD and the fieldname of NAME to pass to the Web site. You call German customers, and now it isnice to know the local forecast, with which you can start the conversation.

494 © 2011 SAP AG. All rights reserved. 2011

Page 527: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Solution 21: Use Report-Report-InterfaceTask 1:Define two reports. The first report is based on the MultiProvider - Customer Salesand should show the incoming orders on the customer level. On the customer-level,you want to be able to display the associated order items.

Define a second report on the Order Details DSO object. This DSO stores theindividual line items of the sales orders that are reported in the MultiProvider. Thematerial number is contained in the order items.

1. Starting from the BEx Analyzer, create a query, based on the MultiProvider -Customer Sales (P_SALES01) in the Reporting Layer → Sales and DistributionInfoArea. Select the Sold to party and Postal Code as the characteristics andIncoming orders EUR as the key figure. Use the calendar month as a freecharacteristic and restrict it to the time frame of December 2009.

Use a condition to filter out all zero values for Incoming orders EUR.

Save the query definition in your Training role Roles → Role## → Querieswith the description:

Description: U## Query RRI Orders

Technical name: U##_QD_JUMP001

a) Start the BEx Analyzer and choose Tools → Create New Query → NewQuery → InfoAreas → Reporting layer → Sales and Distribution →MultiProvider - Customer Sales (P_SALES01) → Open.

b) Place the key figure Incoming Orders EUR (T_INCORDV) in the Columnsarea and the characteristics Sold-to party T_SOLD_TO) and Postal Code(T_SOLD_TO__0POSTAL_CD) in the Rows.

c) In the Free Characteristics area, place the characteristic Cal. year/month(0CALMONTH) from the Time dimension and restrict it to the single valueDecember 2009.

d) Press the Conditions button in the BEx Query Designer toolbar. TheConditions area opens. Right-mouse-click within this area, and chooseNew Condition. Double-click or Right-mouse-click → Edit on the newCondition 1.

Note: Since you drill down on a customer number to see salesorders, it would be best to filter out all customers who have zerovalues with a condition.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 495

Page 528: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

e) On the General tab page:

Description: Non Zero Values

Fill in the Condition parameters by pressing the New button.

Key Figures Operator Values

Incoming Orders EUR(T_INVCDV)

Greater Than 0

Select Transfer to add it to the condition.

Confirm with OK.

f) Save the query definition under Roles → Role## → Queries with thedescription:

Description: U## Query RRI Orders

Technical name: U##_QD_JUMP001

2. Create another query using the Order Details (P_SD01) DSO in the Reportinglayer → Sales and Distribution InfoArea. Include the sales document number,item and material number in the rows, as well as key figures for net weight in kg,net price, and net value in the columns. Include the customer number as a freecharacteristic and restrict it with filter variable T_SOLDTO. Otherwise there is adanger that when executing the query separately, the entire DSO with all singleitems would be selected. Include calendar month in the free characteristics aswell.

Save the query definition under Roles → Role## → Queries with the description:

Description: U## Query RRI Order Details

Technical name: U##_QD_JUMP002

a) From the BEx Analyzer and choose Tools → Create New Query → NewQuery → InfoAreas → Reporting Layer → Sales and Distribution →Order Details (P_SD01) → Open.

b) Place the key figures Net weight in kg, Net price, and Net value in theColumns area.

c) Place the characteristics Sales document, Item, and Material fromDimensions → Key Part in the Rows.

Continued on next page

496 © 2011 SAP AG. All rights reserved. 2011

Page 529: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

d) In the Free Characteristics area, place the characteristic Sold to party(T_SOLD_TO). Place the characteristic Sold to party (T_SOLD_TO) alsoin the Characteristic Restrictions area on the Filter tab. There, assign thevariable Sold-to Party (T_SOLDTO). This ensures that all single items ofthe DSO are not selected by mistake.

Caution: Always select a certain customer number or small rangeof customer numbers from a DataStore Object. Do not select allsingle items to avoid query performance problems.

e) Save the query definition in your Training role under Roles → Role## →Queries with the description:

Description: U## Query RRI Order Details

Technical name: U##_QD_JUMP002

3. Create an RRI setting to link the second query as a jump target for the first query.Test your settings when finished.

a) In SAP NetWeaver BW, choose SAP Menu → Business Explorer → Query→ Maintain Sender-Recipient Mapping (Transaction Code: RSBBS) toaccess the Report to Report Interface settings.

b) On the Query tab, enter your sender query, U## Query RRI Orders(U##_QD_JUMP001), in the Sender field using the F4 Help function toselect your query from the list. Choose Create.

c) Make the settings:

Field Value

Report Type BW Query

Target System Local

Receiver Object U## Query RRIOrder Details(U##_QD_JUMP002) selectedusing F4 Help and the Find button.

Description Order Details Query

Choose Apply and save your assignment settings.

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 497

Page 530: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

4. Demonstrate the RRI link between the two queries by using the BEx Analyzerto execute the query U## Query RRI Orders (U##_QD_JUMP001)and then by selecting a customer value, jump to the query U## Query RRIOrder Details (U##_QD_JUMP002).

a) In the BEx Analyzer, choose the option BEx Analyzer → Open Query andselect the query U## Query RRI Orders (U##_QD_JUMP001) and thenselect OK.

b) Select a value for Sold to party (T_SOLD_TO), right click it to choose theoption Goto → Order Details Query.

To see that the RRI link passed the customer number from the sender queryas a parameter, select the Filter button.

Task 2:From the second report on the Order Details DSO object, based on the order number,allow the user to branch to the original order in the source system using transactionVA03. Create for these connections the appropriate jump targets in the RRI.

1. Create a second RRI jump target, this time from the second queryU## Query RRIOrder Details to transaction VA03 in the source system. With this transaction,you can display the original order in the source system.

To access the source system, you have to identify the InfoSource that is supplyingthe data to the DSO object. In the InfoSource field, enter 2LIS_11_VAITM.You may enter the value directly into the field or use the F4 Help function.

Test your settings when finished. To sign on to the source system enter the user:BWDISPLAY and the password: welcome.

a) In SAP NetWeaver BW, choose SAP Menu → Business Explorer → Query→ Maintain Sender-Recipient Mapping (Transaction Code: RSBBS) toaccess the RRI settings.

b) On the One Query tab, enter your sender query, U## Query RRIOrder Details, in the Sender field using the F4 Help function to selectyour query from the list. Choose Create.

c) Make the settings:

Field Value

Target System Source system, RK3Client 800

Continued on next page

498 © 2011 SAP AG. All rights reserved. 2011

Page 531: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Report Type Transaction

Receiver Object VA03

Report Description Display Sales Order

Transformation/InfoSource 2LIS_11_VAITM

Choose Apply.

d) Save your settings.

e) Test your settings. From the query U## Query RRI Order Details, selectan order number, then jump to the display of the order from the sourcesystem, by right clicking on the order number and choosing the option,Goto → Display Sales Order. To sign on to the source system enter theuser: BWDISPLAY and the password welcome.

f) Select the icon to acknowledge any system messages.

You should see the order you have selected in ECC.

Task 3:Define for the first report a further jump target to pass the customer's location to theURL www.wetter.net to see the weather for their location.

1. Create another RRI setting for the first query U## Query RRI Orders to executethe Web site www.wetter.net, using T_SOLD_TO__0POSTAL_CD and the fieldname of NAME to pass to the Web site. You call German customers, and now it isnice to know the local forecast, with which you can start the conversation.

a) In SAP NetWeaver BW, choose again SAP Menu → Business Explorer →Query → Maintain Sender-Recipient Mapping (Transaction Code: RSBBS)to access the Report to Report Interface settings.

b) On the Query tab, enter your sender query, UR## Query RRI Orders,in the Sender field using the F4 Help function to select your query from thelist. Choose Create.

c) Make the settings:

Field Value

Target System Local

Continued on next page

2011 © 2011 SAP AG. All rights reserved. 499

Page 532: BW305 BW Query Design and Analysis

Unit 13: Using Report-Report-Interface BW305

Report Type Web address

Receiver Object Using the F4 Help, en-ter http://www.wet-ter.net/cgi-bin/wet-ter-net3/wetter-stadt.pl?

Description City Weather

d) Now you must make additional settings for the URL using the AssignmentDetails button. On the Field Assignments screen, on the InfoObject linePostal Code, enter the field name of NAME. The field name is the inputfield on the Internet side. The field name was determined by looking at thesource code of the Web page and must be entered using capital letters.

e) Choose Apply and then choose Apply again.

f) Save your settings.

g) Test your settings by executing the U## Query RRI Orders query, selectinga customer based in Germany by right clicking on the customer's postalcode and choosing the option Goto → City Weather to jump to the URLjump target.

Ignore any warnings you may receive.

Note: This Web site only provides weather for German cities.

500 © 2011 SAP AG. All rights reserved. 2011

Page 533: BW305 BW Query Design and Analysis

BW305 Lesson: Using Report-Report-Interface

Lesson Summary

You should now be able to:• Use the report/report interface (RRI) for navigating within SAP NetWeaver BW

and for jumping into other attached systems• Define a jump that sends a parameter to a URL

2011 © 2011 SAP AG. All rights reserved. 501

Page 534: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Use the report/report interface (RRI) for navigating within SAP NetWeaver BW

and for jumping into other attached systems• Define a jump that sends a parameter to a URL

502 © 2011 SAP AG. All rights reserved. 2011

Page 535: BW305 BW Query Design and Analysis
Page 536: BW305 BW Query Design and Analysis
Page 537: BW305 BW Query Design and Analysis

Unit Summary BW305

503 © 2011 SAP AG. All rights reserved. 2011

Page 538: BW305 BW Query Design and Analysis

Unit Summary BW305

504 © 2011 SAP AG. All rights reserved. 2011

Page 539: BW305 BW Query Design and Analysis

Unit 14Managing Queries and Overview of

Authorizations

Unit OverviewThis unit deals with the functions relating to the general housekeeping, languagetranslation and performance of query objects.

This unit also explains the differentiation between the two authorization conceptsin SAP NetWeaver Business Warehouse: Standard Authorizations and AnalysisAuthorizations.

Unit ObjectivesAfter completing this unit, you will be able to:

• Displaying a where-used list for the query definition in workbooks, views, webtemplates and formatted reports

• Explain how to delete query objects• Explain how to copy queries between InfoProviders• Explain how to support multi language of query objects• Identify basic techniques to improve query performance• Outline the basic differences between Standard Authorizations for queries and

query components and the Analysis Authorizations• Repeat the function of a variable with processing type Authorization

Unit ContentsLesson: Managing Query Objects .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506

Procedure: Deleting Query Objects.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508Procedure: Copying Queries between InfoProviders .. . . . . . . . . . . . . . . . . . . . .510

Lesson: Getting an Overview of Authorizations in SAP NetWeaver BW ....517

2011 © 2011 SAP AG. All rights reserved. 505

Page 540: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Lesson: Managing Query Objects

Lesson OverviewThis lesson deals with the functions relating to the general housekeeping, languagetranslation and performance of query objects.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Displaying a where-used list for the query definition in workbooks, views, webtemplates and formatted reports

• Explain how to delete query objects• Explain how to copy queries between InfoProviders• Explain how to support multi language of query objects• Identify basic techniques to improve query performance

Business ExampleIn order to manage a huge amount and diversity of query objects some usefulfunctionality is available. Eventually the defined query objects have to be translated tosupport multi language. Furthermore some aspects concerning performance have tobe considered within the query definition.

Where-Used List

Figure 146: Where Used List

506 © 2011 SAP AG. All rights reserved. 2011

Page 541: BW305 BW Query Design and Analysis

BW305 Lesson: Managing Query Objects

You have the option in the Query Designer of displaying a where-used list for thequery definition in Workbooks, Views, Web Templates, BEx Reports (created with theBEx Report Designer), and Crystal Reports. To do this, choose the Where-Used Listsymbol from the Query Designer toolbar.

Deleting Query ObjectsWithin the Query Designer, by choosing the menu option Delete, you can removethe query definition. You can also delete various other global query objects suchas restricted key figures, calculated key figures, filters, structures, and variables bychoosing the context menu entry Delete.

The same also can be done from the SAP Menu via SAP GUI, using the path BusinessExplorer → Query → Delete Objects (RSZDELETE).

Figure 147: Deleting Query Objects

2011 © 2011 SAP AG. All rights reserved. 507

Page 542: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Deleting Query Objects

1. Choose SAP Menu → Business Explorer → Query → Delete Objects. TheDeletion of queries with selection conditions dialog box appears.

2. Select the type of object that you want to delete (Query, Filter, Structure,Restricted Key Figure, Calculated Key Figure, Variable).

3. You can restrict your search further, if necessary, by specifying the InfoProviderarea under InfoProvider or using the options Technical Name, Last Changed by,Last Changed on/at, Object Version, Element UID or Last Used to obtain a listthat matches these selection criteria.

You can use selection options to find and delete specific query objects.

4. Choose the Execute symbol. In the Selection of Query Elements to be Deleteddialog box, you can select the objects to be deleted by checking the relevantboxes.

5. Finally, choose Execute symbol again to delete the selected objects. If you aresure you want to delete the selected components from the database then pressYes. If dependent workbooks, Crystal Reports, and views still exist for theobjects, the system gives you the option of deleting the objects from the favoritesand roles of all users.

Copying Queries between InfoProvidersIn the SAP Menu under Business Explorer, you find a Copy function that enables youto copy queries and their subobjects (filter, structures, calculated key figures, restrictedkey figures) between different InfoProviders.

Caution: The target InfoProvider must contain all of the InfoObjects in thesource InfoProvider.

508 © 2011 SAP AG. All rights reserved. 2011

Page 543: BW305 BW Query Design and Analysis

BW305 Lesson: Managing Query Objects

Figure 148: Copying Queries Between InfoProviders

2011 © 2011 SAP AG. All rights reserved. 509

Page 544: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Copying Queries between InfoProviders

1. Choose SAP Menu → Business Explorer → Query → Copy (RSZC). TheCopying Queries Between InfoProviders dialog box appears.

2. Specify a source InfoProvider that will be used by the query that you want tocopy and specify a target InfoProvider. Choose Execute. The Select Queriesdialog box appears.

3. Select the queries that you want to copy and choose Transfer Selections. TheInfoCube Compatibility Check dialog box appears.

Hint: You have the following options for selecting multiple queries:

• Selecting several single queries from the list: Select the requiredqueries by holding down the CTRL key and clicking with themouse.

• Selecting several queries below one another in the list: Selecting ablock by holding down the SHIFT key and selecting the first andlast queries in the block.

4. The dialog box that follows confirms that the query has been successfullytransferred into the selected InfoProvider . Choose Continue to end the process.

Hint: Note the following if you are working with reusable subobjectssuch as variables, structures, filters, calculated key figures and restrictedkey figures:

• Variables are not dependent on InfoCubes so they are not copied.• If you select more than one query to be copied and these queries

reference reusable subobjects that are next to each other in the list,the system only makes one copy of the subobject. The referencesof the copied queries are retained.

• If you copy queries again at a later time, the system creates newsubobjects. The references to queries that have already been copiedare lost.

Continued on next page

510 © 2011 SAP AG. All rights reserved. 2011

Page 545: BW305 BW Query Design and Analysis

BW305 Lesson: Managing Query Objects

ResultThe copied queries and subobjects have a modified technical name that is acombination of the technical name of the original object and the added elements_<number>

Example:

The queries weekly report, monthly report and annual report use company code as avariable and the calculated key figure contribution margin. If you copy the queriesweekly report and monthly report into another InfoCube, the queries weekly report_1and monthly report_1 are created along with the calculated key figure contributionmargin_1. The new queries refer to the new key figure contribution margin_1 and thevariable company code.

If you copy queries quarterly report and annual report, a new calculated key figure,contribution margin_2, has to be created as a copy of contribution margin. Quarterlyreport_1 and annual report_1 then refer to contribution margin_2 and not contributionmargin_1. Company code is still used as a variable.

Translating Query ObjectsIn the Translation function area in the Data Warehousing Workbench, you cantranslate short and long texts for BW objects, this includes query objects. Once aquery is selected for translation the worklist automatically includes the subobjects fortranslation, for example restricted key figures, variables. Also the worklist includesany connected objects such as workbooks.

2011 © 2011 SAP AG. All rights reserved. 511

Page 546: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Figure 149: Translating Query Objects

Getting an overview of Performance Aspects of QueryDefinitionAlthough the performance of your query is heavily dependent on the overall designand maintenance of your data model (i.e. thoughtful dimensioning of the InfoCube,use of indexes, frequent compression), there are also a number of things you shouldbear in mind when designing and running a query which may help to avoid runninginto performance issues.

512 © 2011 SAP AG. All rights reserved. 2011

Page 547: BW305 BW Query Design and Analysis

BW305 Lesson: Managing Query Objects

Figure 150: Performance Aspects of Query Definition

• Overlapping filters

It is important to ensure you avoid this common query design error. For example,if your query contains the characteristic Cal. year / month filtered to the value12.2006 (perhaps using a user input variable but the query also contains thecharacteristic Calendar year filtered to the fixed value 2006, then you have afilter overlap for the year 2006. This means the OLAP processor is performingunnecessary steps to retrieve the data and this can harm performance.

• Too many drill-down characteristics in the initial view

Keep the number of characteristics in the rows or columns to a minimum. Makeuse of the free characteristics. Too many characteristics in the rows or columnsmeans the processor has to work hard to retrieve (and format) the extra data forall levels of drill down.

• Over-use of exclude function

The exclude function (within characteristic filtering) is useful when you want toinstruct the query to eliminate certain values from a range of values. Howeveryou should take care to use this function sparingly as too many exclusioninstructions can start to slow down the query run time. Consider using inclusionswherever possible even if this means that the initial setup of the filters is morecomplex.

2011 © 2011 SAP AG. All rights reserved. 513

Page 548: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

• Design aggregates aligned to common filter requirements.

Accessing prefilled aggregates is one of the most significant ways of improvingquery performance. However aggregates are only efficient if you can safelypredict the users common filtering requirements.

• Make use of value sets via Broadcaster

A Value Set contains a generated set of values for a characteristic and is generatedfrom a scheduled query. For example, you can schedule a query to run each nightto calculate the top ten customers by profit. This list of customers can be storedpersistently as a value set so that you can use this list as a ready made input foranother query. This means you have a starting point for any query from a list ofstatic filters, which could help to improve the overall BEx reporting performance.

• Warm up OLAP-Cache via Broadcaster

The OLAP-Cache stored recently used results sets in main memory. Whenevera query is refreshed the OLAP processor checks to see if the required resultshave already been collected in the OLAP-Cache. If they have already beencollected then this cached data is used instead of the processor having to readthe results from the database.

It is also possible, since SAP NetWeaver BW 7.0, to schedule the filling of theOLAP-cache from the broadcaster so that the cache is 'warmed up' perhapsovernight ready for use the next day. This has a significant impact on queryperformance.

• Switch BEx Analyzer workbook refresh mode to manual

The default refresh mode for any workbook is automatic which means thatwhenever you select a filter value the query is immediately refreshed with around trip to the InfoProvider. Refreshes can take some time if the result set isparticularly large. If your users want to select a number of filter values at onetime then switch the refresh mode tomanual so that the user can choose the filtervalues first without the automatic refresh taking place. When the user is readyto refresh the query they simply press the Refresh button in the BEx Analyzertoolbar so that the workbook 'catches up' with the filters set by the user. Thismeans only one round trip to the InfoProvider is necessary to process all filtersselected.

• Use query performance monitoring tools

There are many tools available in Netweaver BW to assist in the detection ofquery performance problems. It is possible to analyze all aspect of the query runtime and all levels of detail.

• Ensure the query read mode is set appropriately.

514 © 2011 SAP AG. All rights reserved. 2011

Page 549: BW305 BW Query Design and Analysis

BW305 Lesson: Managing Query Objects

The query read mode allows the query developer/administrator to determine themode in which the OLAP process operates with regard to extracting reportingdata. For example, you may set the query to read all free characteristics orhierarchy node levels when the query first runs. This, of course, will mean theinitial refresh of the query may be slower but the subsequent changes to thefilters will be much quicker as all the data has already been read in memory. Ifyou are looking for the initial execution of the query to be quick then considersetting the read mode so that the free characteristics are only processed whenthey are required by the user.

• Implement SAP NetWeaver BW Accelerator

If you really want to ensure your queries run at the fastest possible speedthen implement the BW Accelerator (BWA). BWA radically changes the wayin which query data is retrieved using a sophisticated indexing concept inconjunction with modern hardware architecture. You can expect dramaticimprovements with query performance once this feature is implemented.

2011 © 2011 SAP AG. All rights reserved. 515

Page 550: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Lesson Summary

You should now be able to:• Displaying a where-used list for the query definition in workbooks, views, web

templates and formatted reports• Explain how to delete query objects• Explain how to copy queries between InfoProviders• Explain how to support multi language of query objects• Identify basic techniques to improve query performance

516 © 2011 SAP AG. All rights reserved. 2011

Page 551: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Authorizations in SAP NetWeaver BW

Lesson: Getting an Overview of Authorizations in SAPNetWeaver BW

Lesson OverviewTo ensure that the data warehousing solution maps the structure of your company andmeets your company requirements, you have to define who is allowed to performwhich activities on which objects (Standard Authorizations) and who has access towhich data (Analysis Authorizations).

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Outline the basic differences between Standard Authorizations for queries andquery components and the Analysis Authorizations

• Repeat the function of a variable with processing type Authorization

Business ExampleYou are responsible for developing and executing queries in SAP Business Explorerand you have to be aware of the authorization aspects.

AuthorizationsTo ensure that the data warehousing solution maps the structure of your company andmeets your company requirements, you have to define who is allowed to performwhich activities on which objects (Standard Authorizations) and who has access towhich data (Analysis Authorizations).

Standard AuthorizationsThese authorizations are required by all users who work in the Data WarehousingWorkbench to model or load data, by users who work in the planning workbenchor Analysis Process Designer, by users who work with BEx Broadcaster, or definequeries in the Query Designer.

2011 © 2011 SAP AG. All rights reserved. 517

Page 552: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Each authorization refers to an Authorization Object and defines one or more valuesfor each field in the Authorization Object. Individual authorizations are combined intoroles by system administration. You can copy the roles delivered by SAP and adjustthem as necessary. The system administrator creates these authorizations and entersthem into individual users’ master records in the form of profiles.

These authorizations are based on the SAP standard authorization concept.

Figure 151: Example for an Authorization Object for Working in the DataWarehousing Workbench

Users who have to work with queries and query components need authorizationswithin the Authorization Objects S_RS_COMP and S_RS_COMP1.

518 © 2011 SAP AG. All rights reserved. 2011

Page 553: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Authorizations in SAP NetWeaver BW

Figure 152: Authorization Object S_RS_COMP

In addition to the fields in authorization object S_RS_COMP, the Authorization ObjectS_RS_COMP1 contains the field “Owner of the reporting component”.

In the role maintenance (transaction PFCG) the Authorization Objects are assigned tothe authorization profile of the role, the role again is assigned to the users.

But these authorizations are not yet sufficient if users want to display data fromauthorization-relevant characteristics!

Authorization-relevant means: the data for such a characteristic is protected.

2011 © 2011 SAP AG. All rights reserved. 519

Page 554: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Figure 153: Authorization-Relevant Characteristic

Analysis AuthorizationsAll users who want to display data from authorization-relevant characteristicswhen executing a query require Analysis Authorizations for these characteristics.Authorizations of this type are not based on the standard SAP authorizationconcept using Authorization Objects. They use their own concept based on the BWreporting and analysis features instead.

Using transaction RSECADMIN you create Analysis Authorizations that include agroup of characteristics instead. You restrict the values for these characteristics.

You can then assign this authorization to one or more users or via the AuthorizationObject S_RS_AUTH to one or more profiles/roles and thus indirectly to users.

Since the authorizations are TLOGO objects (analytics security objects), they can alsobe transported to other systems.

520 © 2011 SAP AG. All rights reserved. 2011

Page 555: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Authorizations in SAP NetWeaver BW

Figure 154: Analysis Authorization

When a query is executed all authorization-relevant characteristics which arecontained by the InfoProvider on which the query is based on are checked.

A query always selects a set of data from the database. If authorization-relevantcharacteristics are part of this data, you have to make sure that the user who isexecuting the query has sufficient authorization for the complete selection. Otherwise,an error message is displayed indicating that the user does not have the requiredauthorization.

2011 © 2011 SAP AG. All rights reserved. 521

Page 556: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Figure 155: Authorization Check in Queries

You either get the complete result or nothing at all.

Before SAP NetWeaver 7.0, the SAP standard authorization concept was also usedfor authorizations for analysis, where they were known as Reporting Authorizations.If you are still using the Reporting Authorizations concept and upgrade to SAPNetWeaver 7.3, you now have to migrate these authorizations to the new AnalysisAuthorization concept.

Variable with processing type AuthorizationVia the Authorization processing type a variable (Characteristic Value Variable orHierarchy Node Variable) is automatically filled with the values from the authorizationof the executing user.

The data selection is then automatically carried out according to his or herauthorizations.

522 © 2011 SAP AG. All rights reserved. 2011

Page 557: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Authorizations in SAP NetWeaver BW

Figure 156: Recommended definition of an “Authorization Variable”

The variable needs to be set up to have the Processing by parameter set toAuthorization. Additionally, the Ready for Input checkbox should NOT be selectedif the query user should automatically receive data for all values for which they areauthorized. If the Input Ready checkbox is selected, the user gets a dialog box forentering the desired characteristic values. With F4 help or the down arrow, however,only the values for which the user is authorized are called and he can select all or apart of them.

2011 © 2011 SAP AG. All rights reserved. 523

Page 558: BW305 BW Query Design and Analysis

Unit 14: Managing Queries and Overview of Authorizations BW305

Lesson Summary

You should now be able to:• Outline the basic differences between Standard Authorizations for queries and

query components and the Analysis Authorizations• Repeat the function of a variable with processing type Authorization

524 © 2011 SAP AG. All rights reserved. 2011

Page 559: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Displaying a where-used list for the query definition in workbooks, views, web

templates and formatted reports• Explain how to delete query objects• Explain how to copy queries between InfoProviders• Explain how to support multi language of query objects• Identify basic techniques to improve query performance• Outline the basic differences between Standard Authorizations for queries and

query components and the Analysis Authorizations• Repeat the function of a variable with processing type Authorization

2011 © 2011 SAP AG. All rights reserved. 525

Page 560: BW305 BW Query Design and Analysis

Unit Summary BW305

526 © 2011 SAP AG. All rights reserved. 2011

Page 561: BW305 BW Query Design and Analysis
Page 562: BW305 BW Query Design and Analysis
Page 563: BW305 BW Query Design and Analysis

Unit Summary BW305

527 © 2011 SAP AG. All rights reserved. 2011

Page 564: BW305 BW Query Design and Analysis

Unit Summary BW305

528 © 2011 SAP AG. All rights reserved. 2011

Page 565: BW305 BW Query Design and Analysis

Unit 15Using Business Content

Unit OverviewThis lesson deals with the Business Content and the metadata repository. You obtainan overview of the delivered objects and the Business Content information models. Inthe metadata repository, you can display the definition of all active objects that aredelivered in Business Content, as well as links to other objects. You can activate aquery in Business Content and then go on to work with it in the Business Explorer.

Unit ObjectivesAfter completing this unit, you will be able to:

• Explain the advantages of Business Content• Use the Metadata Repository• Transferring a query from the Business Content

Unit ContentsLesson: Using Business Content .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530

2011 © 2011 SAP AG. All rights reserved. 529

Page 566: BW305 BW Query Design and Analysis

Unit 15: Using Business Content BW305

Lesson: Using Business Content

Lesson OverviewThis lesson deals with the Business Content and the metadata repository. You obtainan overview of the delivered objects and the Business Content information models. Inthe metadata repository, you can display the definition of all active objects that aredelivered in Business Content, as well as links to other objects. You can activate aquery in Business Content and then go on to work with it in the Business Explorer.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Explain the advantages of Business Content• Use the Metadata Repository• Transferring a query from the Business Content

Business ExampleA large number of reports are needed in your company. You can use the SAPNetWeaver BW system to check whether there are report definitions delivered bySAP in Business Content that meet, or partially meet, your requirements. You use,within the Data Warehousing Workbench, the Metadata Repository and the installationarea of the Business Content as an information source that allows you to obtain anoverview of delivered and used objects.

Getting an overview of Business ContentIf you need a specific analysis, you should first check whether Business Contentcontains the query definition you need or a similar query definition.

Business Content contains all objects that enable you to structure your reportingquickly, from data extraction from SAP source systems, to roles that supply employeesin a company with information they need to complete their work. These informationmodels include:

• Roles• Queries and workbooks (BW reports, and particular views of them)• InfoProviders that the reports are based on• InfoObjects that provide the characteristics and key figures used in your reports• Update rules and extractors for SAP business applications, and other selected

applications

530 © 2011 SAP AG. All rights reserved. 2011

Page 567: BW305 BW Query Design and Analysis

BW305 Lesson: Using Business Content

Business Content has the advantage that all necessary and related objects can beactivated at the same time. Afterwards, all relevant data from the SAP source systemscan be loaded into the SAP BW system and analyzed immediately with BusinessContent queries.

Figure 157: Business Content

RolesThe objects are grouped together into roles for optimum use.

A role corresponds to a specific function in a company, for example, purchasingmanager. A role is linked to particular tasks, areas of responsibility, and theinformation requirements that result from them.

There are roles for the different areas within your company. Targeted reports andapplications are available for these roles, according to what employees assigned to thevarious roles need to do their job.

IndustriesIn the case of many industries, for example, Retail, Pharmaceuticals, Banking, andso on, roles and the objects that belong to them in Business Content are delivered tomeet the needs of the individual areas.

2011 © 2011 SAP AG. All rights reserved. 531

Page 568: BW305 BW Query Design and Analysis

Unit 15: Using Business Content BW305

Analytical ApplicationsIn conjunction with SAP Enterprise Portal, the BW release delivers cross-componentapplications such as analytical applications in the form of business packages.

These business packages deliver targeted access to information for a process. Theyenable the analysis of this process, as well as the actions and reactions to it in thesystems that deliver the data.

The functions are independent of the operative, transactional systems. However,the analytical application can read the data from the operative systems and writeback to them.

The areas for analytical applications include Sales Analysis, Campaign Management,Market Exploration, Procurement Analysis, Production Analysis, Inventory Analysis,Customer Credit Management, and Packages for E-Analytics.

Each business package consists of an overview page, the cockpit, and additionaltarget-oriented user interfaces known as worksets.

SAP DemoContentYou can also use SAP DemoContent with delivered examples. The data is stored asflat files during installation on the BW server.

Working with the Metadata RepositoryThe metadata repository can be found in the Data Warehousing Workbench of theSAP BW system. It contains definitions of all active objects delivered in BusinessContent, as well as their links to other objects. The metadata repository is particularlysuited to comparing your reporting requirements with objects and informationavailable in Business Content, and to identifying objects that fully or partially meetyour requirements.

You can find the following information on all objects in your SAP BW system inthe metadata repository:

Technical dataTechnical name, object version, content release, and description

Graphical displayFor example, the data flow and star schema (the latter available only forInfoCubes)

532 © 2011 SAP AG. All rights reserved. 2011

Page 569: BW305 BW Query Design and Analysis

BW305 Lesson: Using Business Content

Additional objectsFor example, required objects, objects to which data is forwarded, and objectsthat supply data

Transferring a Query from the Business ContentBusiness Content can be found in the Data WarehousingWorkbench of the BW system.

Figure 158: Business Content

You can use the bar on the left (indicated by A in the graphic) to choose how objectsdelivered in Business Content are to be listed in the middle section of the screen (B).The objects that you transfer are then listed in the right hand window (C).

You can subdivide the objects into InfoProviders by InfoArea , for example.

Under the InfoAreas , the various assigned InfoProviders, such as InfoCubes ,are listed.

You can also sort by role or object type .

The drilldown by object type option is especially useful to compare an analysisdemand with Business Content content.

2011 © 2011 SAP AG. All rights reserved. 533

Page 570: BW305 BW Query Design and Analysis

Unit 15: Using Business Content BW305

The query definitions delivered by SAP can be found in the middle section of thescreen in the BW menu by object types, with a sub-entry of query elements .

• Query Definitions• Structures• Restricted Key Figures• Calculated Key Figures• Variables• Filters

You can find the Select Objects option beneath the Query sub-node.

Clicking on Select Objects brings you immediately to a selection menu with all thequeries in Business Content. They are listed under the corresponding InfoAreas andInfoProviders. An integrated search function makes it easier to find queries fromspecific areas.

Figure 159: Transferring Objects from Business Content

534 © 2011 SAP AG. All rights reserved. 2011

Page 571: BW305 BW Query Design and Analysis

BW305 Lesson: Using Business Content

When you have found the query definition you need, select it with the mouse andchoose Transfer. The system then gathers together all the objects related to the query.This takes place as a background job.

Note: You can also copy several queries at the same time by choosing thecontrol key when you select the definitions.

After objects have been gathered, the selected query displays in the right-handwindow (C). If a green circle appears in the Active version available column next tothe selected object, the object is already actively available in the system.

If the object is only available in the system as the delivered version, the icon does notappear and the object can be transferred from Business Content in the active version.

If an active version of the transferred object is already available in the system, a checkmark appears in the Comparison column after the object has been gathered.

Figure 160: Query Gathered for Activation

You can make the following settings in Business Content for gathering and activatingobjects:

1. Grouping

Under Grouping, you can determine what is to be gathered.

2011 © 2011 SAP AG. All rights reserved. 535

Page 572: BW305 BW Query Design and Analysis

Unit 15: Using Business Content BW305

You can choose between:

• Only Necessary Objects:

Only objects that are needed to transfer the selected object from BusinessContent are gathered. This is the minimal variant of Business Contenttransfer.

• In Data Flow Before:

All objects that give data to the object being activated are gathered.

• In Data Flow Afterwards:

All objects that receive data from the object being activated are gathered.

• In Data Flow Before and Afterwards:

All objects that give data to, or receive data from the object being activatedare gathered. This is the maximal variant of Business Content transfer.

2. Collection Mode

Under Collection Mode, you can choose between:

• Collect Automatically:

The objects are collected automatically after the object has been selected.This is the default setting.

• Start Manual Collection:

The objects to be activated are only collected if you choose the GatherDependent Objects function.

3. Type of Transfer

You can choose the type of transfer:

• Simulate Installation:

The system tests whether errors would occur if the most importantobjects were transferred. The simulation serves as orientation help beforeactivation. The result of the activation is shown by a green or red iconbeneath the Simulation result header.

• Install:

The selected objects are activated directly.

• Install in Background:

The selected objects are activated in the background as a batch job. Thissetting is useful if you want to activate a large number of objects.

536 © 2011 SAP AG. All rights reserved. 2011

Page 573: BW305 BW Query Design and Analysis

BW305 Lesson: Using Business Content

• Installation and Transport:

The selected objects are activated and written to a transport request.

4. Display

Under Display, you can choose between:

• Hierarchy:

The gathered objects display hierarchically according to their dependencies.

• List:

The gathered objects display in a normal list.

In the Gathered Objects window (C), there are the following columns:

• In the Install column, the following Business Content objects are indicated bydefault:

– Objects transferred for the first time– Objects that have been redelivered by Business Content in a more recent

version• In the Match (X) or Copy column, a checkbox displays if it is possible to

compare the SAP delivery version with the active version.

This indicator is set by default. If this is the case, your version is matched to thenew SAP delivery version and enhanced. If you remove this indicator, the newSAP delivery version is copied in its entirety.

2011 © 2011 SAP AG. All rights reserved. 537

Page 574: BW305 BW Query Design and Analysis

Unit 15: Using Business Content BW305

Lesson Summary

You should now be able to:• Explain the advantages of Business Content• Use the Metadata Repository• Transferring a query from the Business Content

538 © 2011 SAP AG. All rights reserved. 2011

Page 575: BW305 BW Query Design and Analysis

BW305 Unit Summary

Unit SummaryYou should now be able to:• Explain the advantages of Business Content• Use the Metadata Repository• Transferring a query from the Business Content

2011 © 2011 SAP AG. All rights reserved. 539

Page 576: BW305 BW Query Design and Analysis

Unit Summary BW305

540 © 2011 SAP AG. All rights reserved. 2011

Page 577: BW305 BW Query Design and Analysis

BW305 Test Your Knowledge

Test Your Knowledge

1. What are the advantages of Business Content?

2. Why are the objects in Business Content organized in roles?

3. What does the metadata repository contain?

2011 © 2011 SAP AG. All rights reserved. 541

Page 578: BW305 BW Query Design and Analysis

Test Your Knowledge BW305

Answers

1. What are the advantages of Business Content?

Answer: Business Content contains all SAP-supplied objects (informationmodels) that ensure the fast extraction of data from SAP source systemsand allow you to carry out comprehensive analyses. You can activate allnecessary/related objects at the same time.

2. Why are the objects in Business Content organized in roles?

Answer: There are roles for all the areas within your company. Targeted reportsand applications are available for these roles, according to what employeesassigned to the various roles need to do their job.In the case of many industries, roles and the objects that belong to them inBusiness Content are delivered to meet the needs of the individual areas.

3. What does the metadata repository contain?

Answer: The metadata repository contains definitions for all active objectsthat are delivered in Business Content, as well as their links to other objects.The metadata repository is particularly suited to comparing your reportingrequirements with objects and information models in Business Content, and toidentifying objects that fully or partially meet your requirements.

542 © 2011 SAP AG. All rights reserved. 2011

Page 579: BW305 BW Query Design and Analysis
Page 580: BW305 BW Query Design and Analysis
Page 581: BW305 BW Query Design and Analysis

Unit Summary BW305

543 © 2011 SAP AG. All rights reserved. 2011

Page 582: BW305 BW Query Design and Analysis

Unit Summary BW305

544 © 2011 SAP AG. All rights reserved. 2011

Page 583: BW305 BW Query Design and Analysis

Unit 16Getting an Overview of further SAPNetWeaver BW and SAP Business

Objects Reporting Tools

Unit OverviewIn this short unit, we will take a look at some other reporting possibilities, whichare related to SAP NetWeaver Business Warehouse and the SAP BusinessObjectsBusiness Intelligence suite client tools.

Unit ObjectivesAfter completing this unit, you will be able to:

• Give an overview of SAP Business Explorer (BEx) and SAP BusinessObjectsreporting tools

• Describe the purpose and the results of SAP BEx Analyzer (Design Mode,Formatting and Formulas)

• Describe the purpose and the results of SAP BEx Web Application Designer• Describe the purpose and the results of SAP BEx Report Designer• Describe the purpose and the results of SAP BusinessObjects Analysis• Describe the purpose and the results of SAP Crystal Reports• Describe the purpose and the results of SAP BusinessObjects Web Intelligence• Describe the purpose and the results of SAP BusinessObjects Dashboards• Describe the purpose and the results of SAP NetWeaver Visual Composer

Unit ContentsLesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546

2011 © 2011 SAP AG. All rights reserved. 545

Page 584: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

Lesson: Getting an Overview of Further SAP NetWeaverBW and SAP BusinessObjects Reporting Tools

Lesson OverviewIn this short lesson, we will take a look at some other reporting possibilities thatare related to SAP NetWeaver Business Warehouse and the SAP BusinessObjectsBusiness Intelligence suite client tools.

Lesson ObjectivesAfter completing this lesson, you will be able to:

• Give an overview of SAP Business Explorer (BEx) and SAP BusinessObjectsreporting tools

• Describe the purpose and the results of SAP BEx Analyzer (Design Mode,Formatting and Formulas)

• Describe the purpose and the results of SAP BEx Web Application Designer• Describe the purpose and the results of SAP BEx Report Designer• Describe the purpose and the results of SAP BusinessObjects Analysis• Describe the purpose and the results of SAP Crystal Reports• Describe the purpose and the results of SAP BusinessObjects Web Intelligence• Describe the purpose and the results of SAP BusinessObjects Dashboards• Describe the purpose and the results of SAP NetWeaver Visual Composer

Business ExampleIn order to enhance and to adapt layouts to individual needs further reporting tools areavailable within SAP BEx and SAP BusinessObjects reporting tools.

546 © 2011 SAP AG. All rights reserved. 2011

Page 585: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

SAP BusinessObjects reporting tools and SAPNetWeaver BW Query

Figure 161: Overview Reporting Tools

Note: All Reporting Tools that extend or replace BEx Reporting Tools aremarked as “New”. BEx tools will still be maintained within the standardmaintenance period.

SAP NetWeaver BW Queries can be a Data Provider for the following reporting tools:

1. SAP BusinessObjects Analysis, edition for Microsoft Office2. SAP BusinessObjects Analysis, edition for OLAP3. SAP Crystal Reports4. SAP BusinessObjects Web Intelligence5. SAP BusinessObjects Dashboards (former name Xcelsius)

SAP BEx Analyzer: Advanced design optionsThe SAP BEx Analyzer is an add-in for Microsoft Excel and enables users to performOLAP analysis within spreadsheets. Besides the standard navigation options such asdrill down or filtering BEx Analyzer possesses a Design Mode that provides a rangeof tools to allow an experienced SAP NetWeaver BW developer to create highly

2011 © 2011 SAP AG. All rights reserved. 547

Page 586: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

customized and sophisticated workbooks. There are also a number of advanced designitems such as radio button groups or drop-down elements available to the developerincluding the ability to interpret the BEx results as native Excel formulas.

Note: SAP BusinessObjects Analysis, edition for Microsoft Office is thesuccessor of BEx Analyzer.

Figure 162: Design Mode in BEx Analyzer

SAP BEx Web Application DesignerBEx Web Application Designer enables users to design advanced web templates. TheBEx Web Application Designer provides a wide range of web items which representvarious useful features of a web report, e.g. drop down lists, buttons, charts, filters.Although it certainly helps to understand web technology when using the BEx WebApplication Designer, the tool contains wizards and auto-prompts to assist in complexareas of development. The template can be enhanced with native web languages suchas HTML and Java Script. The templates created with the BEx Web ApplicationDesigner can be directly published to an SAP NetWeaver Portal.

Note: Web Application Designer is a not intended as an end user tool. Theidea is that a designer creates web templates with the required web itemsand custom coding and provides them for reporting users within the SAPNetWeaver Portal.

548 © 2011 SAP AG. All rights reserved. 2011

Page 587: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

Figure 163: BEx Web Application Designer

SAP BEx Report DesignerSometimes reports results are easier to interpret if the output is highly formatted. Forexample using color, repositioning result cells, re-sizing values, adding spaces. TheBEx Report Designer takes the output from a query or query view and allows youcontrol the precise positioning and formatting of the output. The result can be viewedon the web, broadcast or generated as a PDF to save or print.

Note: The Report Designer is a tool that is not continued. It is in maintenanceand still available for customers who want to continue working with theirreports. However for new customers or projects that require formatted reportsit is now recommended to use SAP Crystal Reports.

2011 © 2011 SAP AG. All rights reserved. 549

Page 588: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

Figure 164: BEx Report Designer

SAP BusinessObjects AnalysisSAP BusinessObjects Analysis is available in the following editions:

• SAP BusinessObjects Analysis, edition for Microsoft Office• SAP BusinessObjects Analysis, edition for OLAP

SAP BusinessObjects Analysis, edition for Microsoft Office is a plug-in thatintegrates into Microsoft Excel and Microsoft PowerPoint to be used as an onlineanalytical processing (OLAP) tool. It provides access to a range of OLAP datasources, and also allows users to combine information from different systems within asingle worksheet.

SAP BusinessObjects Analysis, edition for OLAP is an online analytical processing(OLAP) tool for working with multidimensional data. It provides access to a rangeof OLAP data sources, and can also combine information from different OLAP datasources within a single Workspace.

550 © 2011 SAP AG. All rights reserved. 2011

Page 589: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

Figure 165: Analysis, Edition for Microsoft Office

SAP Crystal ReportsSAP Crystal Reports offers end users easy to consume, pixel-perfect reports, bygiving them the power to make decisions instantly. The intuitive interface offers nextgeneration design experience to report authors to quickly create compelling reportswith guided interactivity and deliver personalized reports securely to their end users.The following SAP Crystal Reports flavors are available:

• SAP Crystal Reports 2011• SAP Crystal Reports for Enterprise

SAP Crystal Reports 2011 helps you design, explore, visualize, and deliver reportsvia the web or embedded in enterprise applications. It is designed to use virtually anydata source to help you produce the report that you want, whether you want to create asimple report or to use SAP Crystal Reports' comprehensive tools to produce complexor specialized reports. SAP Crystal Reports 2011 is a Windows-based report designtool used to create powerful reports that can be published in the SAP BusinessObjectsBusiness Intelligence platform.

SAP Crystal Reports for Enterprise is a newly designed version of the SAP CrystalReports designer. It streamlines the report creation process, provides significantlybetter support for the SAP BusinessObjects Semantic Layer, and allows users to take

2011 © 2011 SAP AG. All rights reserved. 551

Page 590: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

advantage of better connectivity to SAP NetWeaver BW. SAP Crystal Reports forEnterprise is a Java-based report design tool used to create and integrate powerfulreports in the SAP BusinessObjects Business Intelligence platform.

Figure 166: SAP Crystal Reports 2011 and SAP Crystal Reports for Enterprise

SAP BusinessObjects Web IntelligenceSAP BusinessObjects Web Intelligence is a reporting tool focusing on the concept ofself service reporting. It provides the user the ability to create ad hoc new reports orchange existing reports based on new business requirements. SAP BusinessObjectsWeb Intelligence is an ad hoc analysis and reporting tool for business users with accessto the SAP BusinessObjects Business Intelligence platform. It allows business usersto access and combine data from relational, online analytical processing (OLAP),spreadsheet, or text file sources, using familiar business terms in a drag-and-dropinterface. Workflows allow very broad or very narrow questions to be analyzed, andfor further questions to be asked at any point in the analysis workflow.

552 © 2011 SAP AG. All rights reserved. 2011

Page 591: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

The main use cases for Web Intelligence are:

• Create self-service reporting – Web Intelligence allows you to reduce your ITdepartment’s workload of creating or changing reports and provide your userswith a real self-service reporting environment.

• Answer business questions – Web Intelligence empowers the user to answerbusiness questions using a simple and intuitive user interface and typicallyproviding access to a broader range or data.

• Create dynamic queries – Web Intelligence allows business users to dynamicallycreate data-relevant queries; apply filters to the data; sort, slice, and dice throughdata; drill down; find exceptions; and create calculations.

Figure 167: SAP BusinessObjects Web Intelligence

SAP BusinessObjects DashboardsSAP BusinessObjects Dashboards (formerly Xcelsius) is a tool for data visualizationand the creation of dynamic, interactive dashboards. Data can be updated dynamicallyfrom the SAP BusinessObjects Business Intelligence platform, and exported to avariety of different formats that can be viewed by data consumers in standard formats,such as PowerPoint, PDF, or Flash..

2011 © 2011 SAP AG. All rights reserved. 553

Page 592: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

The main use cases for Dashboards are:

• Create consolidated views on key metrics – Use visual components on highlyaggregated BI content to make it possible to retrieve essential businessinformation very easily. You can extend the power of business intelligence tomore users by offering visual simplicity in analysis.

• Create What-If Scenarios – Dashboards allow users to change parameters andreceive immediate answers. The dashboard example above displays how acertain amount of bookings affects revenues in the next quarter.

• Use a variety of data sources to create your visualization – With Dashboardsyou can access trusted and up to date Business Intelligence data from SAPNetweaver BW and from SAP BusinessObjects BI Platform. You can also useseveral different data connections in a single Dashboard.

• Share Dashboards and export them to familiar formats – Security, connectivity,and interactivity are maintained whether the SAP BusinessObjects Dashboardsvisualization is deployed to BI Launchpad,, SAP NetWeaver Portal, or embeddedinside Microsoft Office and Adobe PDF.

Figure 168: SAP BusinessObjects Dashbords

554 © 2011 SAP AG. All rights reserved. 2011

Page 593: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

Figure 169: Dashboard Example

SAP NetWeaver Visual ComposerSAP NetWeaver Visual Composer is not actually part of the BEx Suite, it is part ofSAP Analytics. It is mentioned briefly here simply to provide a basic understandingof this powerful tool and to help you to understand how it works in conjunction withSAP NetWeaver BW. SAP NetWeaver Visual Composer is used to build interactiveAnalytical Applications, SAP NetWeaver BW can provide content to the VisualComposer via the BW Integration Wizard. An example of an Analytical Application isshown in the graphic below. Here you can see that a list of blocked orders is producedat the top of the screen (assume this detailed information comes from the SAP ECCsystem). We need to make a decision to remove the orders or release them. On thesame screen you can see we are also showing some statistics from the ECC systemand also from SAP NetWeaver BW together with key customer master data relating tocredit class etc. This is an example of a closed loop analytical application which bringtogether all the key information required (from transactional and analytical sources)in one place to support my decision making. SAP NetWeaver Visual Composerprovides the tools to help us build these types of applications. SAP NetWeaver BWdata providers (queries, views, InfoProviders) can easily be integrated into the VisualComposer using a special Wizard.

2011 © 2011 SAP AG. All rights reserved. 555

Page 594: BW305 BW Query Design and Analysis

Unit 16: Getting an Overview of further SAP NetWeaver BW and SAP BusinessObjects Reporting Tools BW305

Figure 170: Visual Composer: Example Analytical Application

Figure 171: Visual Composer: Model Drive Design

556 © 2011 SAP AG. All rights reserved. 2011

Page 595: BW305 BW Query Design and Analysis

BW305 Lesson: Getting an Overview of Further SAP NetWeaver BW and SAPBusinessObjects Reporting Tools

Lesson Summary

You should now be able to:• Give an overview of SAP Business Explorer (BEx) and SAP BusinessObjects

reporting tools• Describe the purpose and the results of SAP BEx Analyzer (Design Mode,

Formatting and Formulas)• Describe the purpose and the results of SAP BEx Web Application Designer• Describe the purpose and the results of SAP BEx Report Designer• Describe the purpose and the results of SAP BusinessObjects Analysis• Describe the purpose and the results of SAP Crystal Reports• Describe the purpose and the results of SAP BusinessObjects Web Intelligence• Describe the purpose and the results of SAP BusinessObjects Dashboards• Describe the purpose and the results of SAP NetWeaver Visual Composer

2011 © 2011 SAP AG. All rights reserved. 557

Page 596: BW305 BW Query Design and Analysis

Unit Summary BW305

Unit SummaryYou should now be able to:• Give an overview of SAP Business Explorer (BEx) and SAP BusinessObjects

reporting tools• Describe the purpose and the results of SAP BEx Analyzer (Design Mode,

Formatting and Formulas)• Describe the purpose and the results of SAP BEx Web Application Designer• Describe the purpose and the results of SAP BEx Report Designer• Describe the purpose and the results of SAP BusinessObjects Analysis• Describe the purpose and the results of SAP Crystal Reports• Describe the purpose and the results of SAP BusinessObjects Web Intelligence• Describe the purpose and the results of SAP BusinessObjects Dashboards• Describe the purpose and the results of SAP NetWeaver Visual Composer

558 © 2011 SAP AG. All rights reserved. 2011

Page 597: BW305 BW Query Design and Analysis
Page 598: BW305 BW Query Design and Analysis
Page 599: BW305 BW Query Design and Analysis

Test Your Knowledge BW305

559 © 2011 SAP AG. All rights reserved. 2011

Page 600: BW305 BW Query Design and Analysis

Course Summary BW305

Course SummaryYou should now be able to:

• Outline the architecture and reporting structure in SAP NetWeaver BW• Analyze reports in the Business Explorer Analyzer (BEx Analyzer) and the BEx

Web Analyzer using navigation functions• Evaluate the data set in SAP NetWeaver BW by defining queries using the

BEx Query Designer or the BEx Web Analyzer and executing them in the BExAnalyzer and in the BEx Web Analyzer

• Perform Ad-hoc Analysis• Use Information Broadcaster to distribute reports• Integrate documents in reports• Configure the Report-Report-Interface for navigating within SAP NetWeaver BW

and for jumping into other attached systems• Evaluate reports in the Business Content by using the Metadata Repository and

the Business Content Browser

560 © 2011 SAP AG. All rights reserved. 2011

Page 601: BW305 BW Query Design and Analysis

GlossaryAttribute

InfoObjects that are logically assigned or subordinated to a characteristic and thatcannot be selected in a query.

BEx AnalyzerAnalytical and reporting tool in the Business Explorer that is embedded inMicrosoft Excel. In the Business Explorer Analyzer, you can analyze selectedInfoProvider data by navigation to queries created in the BEx Query Designerand can create different query views for the data.

BEx Query DesignerTool for defining queries that are based on a selection of characteristics and keyfigures (InfoObjects) or on reusable InfoProvider structures. In the BEx QueryDesigner, you can parameterize queries by defining variables for characteristicvalues, hierarchies, hierarchy nodes, texts, or formulas. You can specify theselection of InfoObjects more precisely by: Restricting characteristics and keyfigures by characteristic values, characteristic value intervals and hierarchy nodesDefining calculated and restricted key figures for reuse Defining structures forreuse Defining exceptions Defining conditions Defining exception cells. You canuse all queries that you define in the BEx Query Designer for OLAP reporting,and also for flat reporting.

BEx Web Application DesignerDesktop application for creating Websites with BW contents. With the BEx WebApplication Designer, you can create an HTML page that contains BW-specificcontents, such as different tables, charts, or maps. This HTML page serves as thebasis for Web applications with complex interactions like BI Cockpits. You cansave the Web applications as a URL and access them by using the intranet or byusing mobile terminals. Additionally, you can save the Web applications as aniView and integrate them into an enterprise portal.

Business ContentPredefined role and task-related information models that can be suited toenterprise-specific requirements. Business Content makes the supply ofinformation available to roles in an enterprise that require this to complete tasks.Business Content essentially consists of roles, workbooks, queries, InfoCubes,InfoObjects, InfoSources and update rules, as well as extractors, for SAP ERP,SAP New Dimension Applications and for additional selected applications.

2011 © 2011 SAP AG. All rights reserved. 561

Page 602: BW305 BW Query Design and Analysis

Glossary BW305

CharacteristicType of InfoObject. An evaluation group such as company code, product,customer group, fiscal year, period, or region. Characteristics provideclassification possibilities for the dataset. An InfoCube generally contains only apartial quantity of the characteristic values from the master data table at a time.The master data includes the permitted values for a characteristic, also calledcharacteristic values. Characteristic values are discrete names.

ChartWeb item that retrieves data from a query view to create a diagram for a Webapplication. You can choose from a range of display options for the diagram. Youcan also navigate within interactive charts and analyze the displayed data.

Context MenuA list of functions displayed next to the mouse pointer when you click theright-hand mouse button. The context menu displays the currently availablefunctions. To select a function from the list, you either click the function or pressthe corresponding function key on the keyboard.

Data Store ObjectObject that stores consolidated and cleaned transaction data on a documentlevel. A DataStore object describes a consolidated dataset from one or severalInfoSources. This dataset can be evaluated using a BEx query. A DataStoreobject contains a key (for example, document number, position) as well asdata fields that, as key figures, can also contain character fields (for example,customer). You can update DataStore object data into InfoCubes or otherDataStore objects in the same system or a different system using a delta update.In contrast to multidimensional data stores for InfoCubes, data in DataStoreobjects is stored in transparent, flat database tables.

Drag and RelateA function that enhances browser-based navigation. Drag and Relate allowsyou to execute transactions across different systems by linking data from oneapplication to data in another application. You simply select a business object(for example, a purchase order) by clicking and drag it onto another object (forexample, a link to an external Web page) on the Launch Pad and the systemperforms an activity (for example, the delivery status of the purchase orderis displayed).

Dropdown boxWeb item that places characteristic values for filtering in a Web application ina dropdown box.

ExceptionA deviation from a defined threshold value. Exceptions are defined in the QueryDesigner and can be evaluated either online (in BEx Web Applications, BExMobile Applications, or in the BEx Analyzer), or in the background, using the

562 © 2011 SAP AG. All rights reserved. 2011

Page 603: BW305 BW Query Design and Analysis

BW305 Glossary

Reporting Agent. Exceptions are defined by setting the threshold values orintervals, which are given a priority (bad, critical, good), and by determining theareas of the query for which the exception is valid. In the evaluation, the areas ofthe query lying above or below the threshold are marked in different colors. Upto nine shades of the red, yellow, and green traffic light colors are used here.

FilterWeb item that displays those filter values for a query view in a Web applicationthat you created when navigating. Also allows you to select single values

InfoCubeObjects that can function both as data targets as well as InfoProviders. AnInfoCube describes a self-contained dataset (from the reporting view), forexample, for a business-oriented area. This dataset can be evaluated with the BExquery. An InfoCube is a quantity of relational tables that are created according tothe star schema: a large fact table in the center, with several dimension tablessurrounding it.

InfoObjectBusiness evaluation objects (for example, customers or sales) are calledInfoObjects in BI. InfoObjects are subdivided into characteristics, key figures,units, time characteristics, and technical characteristics (such as request numbers).

InfoProviderObjects for which the queries in SAP NetWeaver BW can be created or executed.There are two types of InfoProviders. One type includes objects that containphysical data. These are known as data targets, such as InfoCubes, DataStoreobjects, and InfoObjects (characteristics with attributes, texts, or hierarchies).The other type includes objects that display no physical data storage, such asInfoSets, Virtual Providers, and MultiProviders. InfoProviders are the objects orviews that are relevant for reporting.

InfoSetA semantic view of DataStore objects, InfoCubes, and InfoObjects(characteristics with master data) that allows you to create reports on theseobjects, particularly on joins between these objects. Unlike the classic InfoSet,this view of data is BI-specific. In the InfoSet builder, InfoSets are created andchanged. InfoSets allow you to use the Query Designer to define reports.

Key FiguresA quantifiable measure of the technical, commercial, and personal performancein a company. Key figures can be used to assess performance, profitability,productivity, and liquidity both within an organization and between oneorganization and another.

MapWeb item containing all the information needed to display a geographical mapin a Web application.

2011 © 2011 SAP AG. All rights reserved. 563

Page 604: BW305 BW Query Design and Analysis

Glossary BW305

MetadataData about data. Metadata describes the origin, history, and other aspects of data.

Metadata RepositoryProvides central access to information about metadata objects in SAP NetWeaverBW: Information about active objects in the system (activated objects)Information about SAP delivery objects in the system (Business Content) Themetadata repository provides the following functions: Metadata search Metdataexchange HTML page exports Graphical object display

MultiProvidersType of InfoProvider that combines data from several InfoProviders and makes itavailable for reporting. The MultiProvider itself contains no data; its data comesexclusively from the InfoProviders on which it is based (collated using a unionoperation). You can assemble a MultiProvider from different combinations ofInfoProviders. MultiProviders, like InfoProviders, are objects or views that arerelevant for reporting.

Multipurpose Internet Mail Extensions (MIME)Standard that enables you to send sound, video and binary files over the Internetwithout first converting them to ASCII format. Multipurpose Internet MailExtensions (MIME) are organized into MIME types and subtypes that areable to interpret the contents of different documents. For example, the MIMEtype/subtype text/html refers to a text in HTML format. Web browsers and Webservers use MIME to interpret the files they send and receive.

NavigationAnalysis of the InfoProvider data by displaying different views on the data of aquery or a Web application. With the aid of the various navigational functions,such as: 'Fix as Filter Value' 'Insert Drilldown According to' You can generatedifferent views of the data (query views) that are presented in the results area ofthe query or Web application. Changing views is considered to be navigation.

Navigation AreaAn object in the displayed query results that includes the characteristics,navigation attributes and structures available for navigation.

Navigation AttributesAttributes that you can select in the query.

NodeObjects that create a hierarchy. A node can have subnodes. We differentiatebetween two types of nodes: Postable nodes Unpostable nodes "

QueryCollection of a selection of characteristics and key figures (InfoObjects) forthe analysis of the data of an InfoProvider. A query always refers exactly toone InfoProvider, whereas you can define as many queries as you like for eachInfoProvider. You define a query in the BEx Query Designer, in which you select

564 © 2011 SAP AG. All rights reserved. 2011

Page 605: BW305 BW Query Design and Analysis

BW305 Glossary

InfoObjects or reusable structures for an InfoProvider and specify the view ofthe data (query view) by distributing them to filters, rows, columns, and freecharacteristics. You used this saved query view as a basis for data analysisand reporting in the BEx Analyzer, in BEx Web applications, in BEx MobileIntelligence, or in formatted reporting.

Radio button groupWeb item that allows you to filter characteristic values using a group of radiobuttons.

RemoteCubeInfoCube whose transaction data is not managed in SAP NetWeaver BW, butrather externally. Only the structure of the RemoteCube is defined in BI. The datafor reporting is read from another system using a BAPI.

RoleCombination of similar positions. Example: The role “Purchasing Manager”covers the responsibility for orders in the framework of providing basic material,goods and business methods. The task area of the Purchasing Manager entailsoptimizing the relationship between price and value. Included in the task area ofthe Purchasing Manager are managing the order process, determining purchasingpolicies, and procurement market research (process tasks). The PurchasingManager also plays the role of a superior, that is, he/she supervises the efficiencyof the order process, controls the cost center data and is responsible for personneladministration in his/her area (administrative activity functions).

SAP NetWeaver BWA set of solutions providing a comprehensive toolset for data warehousing,knowledge management, and data analysis delivered through an enterprise portal.

Text ElementsWeb item that displays query information on which the query view, andconsequently the Web application, are based. You can select individual textelements to be displayed in the Web application. The 'text element' Web itemcan contain variables, static filter values, and general text elements (for example,technical name of the query, the query key date, or query author).

Text VariablesVariable for creating language-specific texts.

Web Application DesignerDesktop application for creating web sites with BI contents. With the BEx WebApplication Designer, you can create an HTML page that contains BI-specificcontents, such as different tables, charts, or maps. This HTML page serves as thebasis for Web applications with complex interactions like BI Cockpits. You cansave the Web applications as a URL and access them by using the intranet or byusing mobile terminals. Additionally, you can save the Web applications as aniView and integrate them into an enterprise portal.

2011 © 2011 SAP AG. All rights reserved. 565

Page 606: BW305 BW Query Design and Analysis

Glossary BW305

Web itemAn object that retrieves data from a data provider and presents it as HTML in aWeb application.

Web templatesAn HTML document that determines the structure of a Web application. Itcontains placeholders for Web items, data providers, and BW URLs.

WorkbookA file containing several worksheets (an expression from Microsoft Excelterminology). You insert one or more queries in the workbook in order to be ableto display them in the Business Explorer Analyzer. You can save the workbookin your favorites or in your roles.

566 © 2011 SAP AG. All rights reserved. 2011

Page 607: BW305 BW Query Design and Analysis

IndexAAnalytical Applications

Business Packages, 532Attribute, 179BBEx Query Designer

BEx Query DesignerFunctions, 55

Boolean Operators, 116Business Content, 530, 533BW InfoSets, 343CCalculated Key Figures, 110Cells

Cell editor, 152Change Data, 134Characteristic hierarchy, 191Characteristic Value Variables,238

CharacteristicsProperties of, 177

Collection Mode, 536Conditions, 315

Condition Row, 318In a Report, 322

Constant Selection, 96, 133Copying Queries, 508Currency Translation, 134Customer Exit, 230DData Functions, 115Data Targets, 341Data warehouse system, 2

Data Warehousing Workbench,14

DataStore Objects, 342master data, 342transaction data, 342

Decimal Places, 132Default Value, 229, 235Display, 537Display Attribute, 179Display of Results, 178Document Integration, 456EException

Threshold Values, 299Values, 300

Exception Aggregation, 135Exceptions, 299External hierarchy, 191FFormula collision, 133, 150GGrouping, 535HHide, 132Hierarchies and Structures, 194Hierarchy, 190

Create hierarchy, 212Properties of the DisplayHierarchy, 192

Hierarchy Attributes, 217Hierarchy Levels, 211Hierarchy Maintenance, 217

2011 © 2011 SAP AG. All rights reserved. 567

Page 608: BW305 BW Query Design and Analysis

Index BW305

IIndustries, 531InfoCube

Global Objects, 347InfoCube Elements, 347VirtualProvider, 342

InfoCubes, 341Copying Queries, 508

InfoObject, 11InfoObjects

Characteristic InfoObjects,342

InfoProvider, 11InfoProvider Data DocumentClass, 465

InfoProvidersCompositeProvider, 344HybridProvider, 343MultiProvider, 344TransientProvider, 343

InfroProviders, 340Interim Result, 115–116Interval, 235Intervals, 211JJump target, 484KKey Figures

Calculated Key Figures, 114Properties of, 131Restricted Key Figures, 93

LLeaves, 211Level Maintenance, 217Link Nodes, 213MMaster Data, 456Master Data Document Class,462

Mathematical Functions, 116

Metadata, 456Metadata Repository, 532NNavigation Attribute, 180Nodes

Not postable Nodes, 210Postable Nodes, 210

OOverall Result, 115–116PPercentage Functions, 114Pre-Query, 233, 277Processing Type, 229QQueries

Deleting, 507Query

Changing a Query, 66Creating a Query, 58Search for Queries, 65

Query Result, 115RRanked List Functions, 320Ready-for-input

Variable, 235Replacement Path, 229Report Result, 116Report/Report Interface (RRI),484

Restricted Key Figures, 93Restricting to Hierarchy Nodes,193

Result, 115Overall Result, 116Report Result, 116

Results Rows, 178ResultSet Query, 233, 277Reverse Sign, 132Role, 531

568 © 2011 SAP AG. All rights reserved. 2011

Page 609: BW305 BW Query Design and Analysis

BW305 Index

RRI, Report/Report Interface,484

SSAP Demo Content, 532SAP Exit, 230Scaling Factor, 132Selection Condition, 69Selection option, 235Single Value, 235Sorting, 177Status of Node, 132Structures

Local, 145Reusable, 145

Swapping Interval Limits, 240TThreshold Value Conditions,319

Time-dependentHierarchy Structure, 213

Totals Functions, 115Totals Rows, 178Transaction Data, 456Transfer, 536

UUnit Conversion, 134User Entry, 229VVariable

Currencies and Units, 235Replacement Path, 231

see also Replacement PathVariable Editor, 236Variable Types, 228Variables, 228

Business Content Variable,271see also Business ContentVariables

Formula, 240, 262Hierarchy, 251Hierarchy Node, 252Single Value Variables, 240Using variables, 227

WWhere-Used List, 507

2011 © 2011 SAP AG. All rights reserved. 569

Page 610: BW305 BW Query Design and Analysis

Index BW305

570 © 2011 SAP AG. All rights reserved. 2011

Page 611: BW305 BW Query Design and Analysis

FeedbackSAP AG has made every effort in the preparation of this course to ensure the accuracyand completeness of the materials. If you have any corrections or suggestions forimprovement, please record them in the appropriate place in the course evaluation.

2011 © 2011 SAP AG. All rights reserved. 571