How can a Reference Query Applies to SAP NetWeaver Business Warehouse 7.30 (BW7.30) SP05 with SAP NetWeaver Business Warehouse Accelerator 7.20 (BWA7.20) or HANA 1.0 running as a database for SAP NetWeaver BW 7.3 SP05. For more information, visit the EDW homepage Summary This article describes what a Reference Query is and how it can be created in a BW Workspace. It addresses the Business Analyst in the line of business. As a prerequisite we recommend reading the article What is a BW Workspace? and How can Central and Local Provider easily be combined? from this article series. Authors: Silvia Bratz, Klaus Nagel Company: SAP AG Created on: 9 September, 2011 Author Bio Silvia Bratz: Development Project Manager, TIP In-Memory Platform BW (SAP AG). Silvia Bratz joined SAP 12 years ago and began working as a technical SAP consultant for Business Intelligence. Today, she is a member of the BWA and Data Management team. Klaus Nagel: Development Manager, TIP In-Memory Platform BW (SAP AG). Klaus Nagel joined SAP 10 years ago and started as a Developer in the BW team. He now holds the position of a Development Manager and leads the BWA and Data Management team. 2011 SAP AG 1
Table of Contents Introduction... 3 Scenario... 3 Description... 3 New Data Model (CompositeProvider)... 4 Scenario Data... 4 MultiProvider... 4 InfoObjects Customer and Product... 5 Local Flat Files... 6 Referenced Query... 7 Query Types... 8 Prerequisite... 8 Reference Query... 8 Standard Query... 8 Query Creation... 9 Creation in the Wizard... 9 Creation in My Workspace... 10 Query Execution... 11 Related Content... 13 Copyright... 14 2011 SAP AG 2
Introduction A BW Workspace is a kind of small sandbox which IT defines. IT sets the boundaries, IT sets the amount of resources that a BW Workspace can consume and exposes some of the central data models to the BW Workspace (data of the models and their related semantics). The BW Workspace exposes the central data in a logical fashion only. The data is not copied into the BW Workspace, which means that no data replication is needed. The goal is to enable the Key Business Users to use this functionality in a dedicated and separated environment, which is deeply embedded and integrated in the existing BW landscape. The BW Workspaces bridge the gap between the architected and the departmental data marts. Therefore, Workspaces are integrated, independent and, as the usage of the SAP Business Warehouse Accelerator or HANA is mandatory, they are completely in-memory. Scenario Description Let us assume that you are working as a global sales account manager for a company, selling computer hardware and corresponding accessories. In the central enterprise data warehouse the SAP NetWeaver BW sales data for 2010 and 2011 is provided in InfoCubes with a MultiProvider on top. Additionally, the central SAP NetWeaver BW provides the company s central ABC Rating information of customers worldwide in an InfoProvider, but you have an own ABC Rating available in a file. You would like to use this file to enrich the central sales data with your local information and report on the merged data. Moreover, your company has not yet completely integrated the inventory management system and therefore the SAP NetWeaver BW is not yet supplied with inventory data. The colleagues from the inventory department provide you with the corresponding information (in stock, out of stock, ordered) per product via flat file which you additionally want to merge with the BW sales data. In order to keep the scenario simple and focus on the key aspects of the functionality we do not consider details like time criteria or joins of key figures, but stick to an easy master data attribute enrichment example. The data model (CompositeProvider) of this scenario can be found in chapter 2.2. A BW Workspace has been created for your team by the IT department using the BW Workspace maintenance application in the SAP NetWeaver Business Warehouse. Furthermore the IT department provided the SAP NetWeaver Business Client and corresponding roles for access to the BW Workspace Designer. 2011 SAP AG 3
New Data Model (CompositeProvider) BW Workspace Scenario Content: Different Providers and Relationships Scenario Data MultiProvider The MultiProvider Sales Total [ZTE11WSOA] consists of two PartProvider containing sales data for the years 2010 and 2011. The important InfoObjects which we use to join our local file information are Product and Customer. 2011 SAP AG 4
InfoObjects Customer and Product The InfoObjects Customer and Product contain the following data. InfoObject Customer (ZTE11CUST) InfoObject Product (ZTE11PR) 2011 SAP AG 5
Local Flat Files The local flat file Customer_ABC contains the technical key Customer as well as the customer ABC Rating information. The local flat file Inventory_Data contains the technical key Product as well as the product availability information. 2011 SAP AG 6
Referenced Query The Referenced Query Sales Margin [ZTE11SALES_MARGIN] is defined on top of the MultiProvider. It contains a calculated key figure (margin). The characteristics calendar month and customer are in the row drill-down and data content has been restricted to the selection of 09.2011 to 10.2011. 2011 SAP AG 7
Query Types Prerequisite The following information is based on the scenario which has been created in the article How can Central and Local Provider easily be combined? from this article series. In the BW Workspace Designer you can create Reference Queries and a Standard Query. Furthermore you can create queries on top of a CompositeProvider like on any other InfoProvider. Reference Query In a BW Workspace you can use a query which has been created on top of a MultiProvider as a Referenced Query to create a Reference Query on top of the CompositeProvider. As precondition the relevant MultiProvider must have been assigned to the Workspace in the Workspace Maintenance under Settings. What does this mean? o o o o Any query which has been designed in the Query Designer on the MultiProvider is available for selection in the BW Workspace Designer. When created in the relevant BW Workspace Designer step and the CompositeProvider has been activated the query is ready to be executed. Changes to the Referenced query and/or CompositeProvider have an immediate effect on the Reference Query. This means that the Reference Query is automatically adjusted when the CompositeProvider is changed and activated. The Referenced query can only be used if all fields in the drill-down are also available in the CompositeProvider. Otherwise the query is rejected. However, if the Referenced query contains other characteristics in the free characteristics, these are removed in the Reference Query. First benefit is that restrictions, drill-downs and restricted/calculated key figures can be reused on top of the CompositeProvider without having to redesign a new query. Second benefit is that after changes no adjustments to the query are necessary. o o A proposal for the technical name and description is derived from the CompositeProvider, which can be changed except for the $ sign in front and the prefix (in case this has been maintained in the Workspace settings). The Reference Query cannot be changed in the SAP Query Designer. Standard Query In addition to the Reference Query it is also possible to define a Standard Query (once per CompositeProvider). In a Standard Query all fields of the CompositeProvider are added to the query as free characteristics or key figures. This query cannot be changed in the SAP Query Designer. It changes automatically when the CompositeProvider is changed. When no MultiProvider has been used in the CompositeProvider there is just the option to create a Standard Query. 2011 SAP AG 8
Query Creation In the following chapter we are going to describe the methods, how a Standard and a Reference Query can be created in the BW Workspace Designer. Furthermore we show the results in SAP BusinessObjects Analysis for MS Office. Creation in the Wizard In the BW Workspace Designer in Wizard Step 4 we created a Standard and a Reference Query (see chapter 6.5 in article How can Central and Local Provider easily be combined? from this article series.). We chose type Standard and accepted the proposed names. Then we chose type Reference, selected the relevant Referenced Query and changed the technical name (as the Standard Query with technical name $T00WSPE3 has already been chosen). 2011 SAP AG 9
Creation in My Workspace In My Workspace you can also create a Standard Query or Reference Queries for the CompositeProvider. When choosing Change Queries on a CompositeProvider, you can create (and activate) new queries or delete the ones that are not needed anymore. When choosing Change Queries on a CompositeProvider with status Draft, you can create new queries or delete the ones that are not needed anymore. For newly created queries it is only possible to save a draft. 2011 SAP AG 10
Query Execution In SAP BusinessObjects Analysis for MS Office Client e.g. we can execute the queries created in the BW Workspace Designer as well as any other query which has been defined on top of the CompositeProvider. Standard Query Reference Query Referenced Query Calculated key figure Drill-down to: Calendar Year/Month and Customer Available dimensions for drill-down Referenced query Sales Margin [ZTE11SALES_MARGIN] 2011 SAP AG 11
Reference Query Calculated key figure Drill-down to: Calendar Year/Month, Customer and ABC Ranking Available dimensions for drill-down with characteristic ABC Ranking in addition Reference Query My First CompositeProvider Reference 3 [$T00WSPE3_REF3] Available dimensions for drill-down with characteristic ABC Ranking in addition Standard Query Standard Query My First CompositeProvider[$T00WSPE3] 2011 SAP AG 12
Related Content http://www.sdn.sap.com/irj/sdn/bwa For more information, visit the EDW homepage 2011 SAP AG 13
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 the express 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 software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iseries, pseries, xseries, zseries, eserver, z/vm, z/os, i5/os, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Oracle Corporation. JavaScript is a registered trademark of Oracle Corporation, used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. 2011 SAP AG 14