141
SAP Business Explorer PDF download from SAP Help Portal: http://help.sap.com/saphelp_nw73/helpdata/en/5b/30d43b0527a17be10000000a114084/content.htm Created on January 14, 2015 The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal. Note This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included. The selected structure has more than 150 subtopics. This download contains only the first 150 subtopics. You can manually download the missing subtopics. © 2015 SAP SE or an SAP affiliate company. 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 SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE 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. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices. Table of content PUBLIC © 2014 SAP SE or an SAP affiliate company. All rights reserved. Page 1 of 141

Sap Help Bex Query

Embed Size (px)

DESCRIPTION

Sap Help Bex Query

Citation preview

  • SAP Business ExplorerPDF download from SAP Help Portal:http://help.sap.com/saphelp_nw73/helpdata/en/5b/30d43b0527a17be10000000a114084/content.htm

    Created on January 14, 2015

    The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal.

    NoteThis PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.The selected structure has more than 150 subtopics. This download contains only the first 150 subtopics. You can manually download the missing subtopics.

    2015 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purposewithout the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SEand its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided bySAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not beliable 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 expresswarranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and otherSAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and othercountries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

    Table of content

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 1 of 141

  • Table of content1 SAP Business Explorer2 BEx Query Designer2.1 BEx Query Designer2.2 Working with BEx Query Designer2.3 Functions of the Menu Bar in the Query Designer2.3.1 Functions in the Query Menu2.3.2 Functions in the Edit Menu2.3.3 Functions in the View Menu2.3.4 Functions in the Tools Menu2.3.5 Functions in the Help Menu2.4 Defining New Queries2.4.1 Restricting Characteristics2.4.1.1 Restricting Characteristics: Hierarchies2.4.1.2 Selecting Hierarchies2.4.2 Defining Selections2.4.3 Defining Formulas2.4.3.1 Percentage Functions2.4.3.2 Data Functions2.4.3.3 Boolean Operators2.4.3.4 Technical Notes about the Formula Operators2.4.4 Defining Exception Cells2.4.5 Defining Conditions2.4.6 Defining Exceptions2.5 Saving Queries2.6 Displaying and Changing Existing Queries in the Query Designer2.7 Reusable Query Components2.7.1 Structures2.7.1.1 Creating Reusable Structures2.7.1.2 Structure Element Texts and Their Language-Dependency2.7.2 Filters2.7.3 Variables2.7.3.1 Variable Types2.7.3.1.1 Using Text Variables2.7.3.2 Variable Processing Types2.7.3.2.1 Manual Entry/Default Value2.7.3.2.2 Replacement Path2.7.3.2.3 Customer Exits2.7.3.2.3.1 Dependencies for Variables of Type Customer Exit2.7.3.2.4 SAP Exit (Delivered Variables)2.7.3.2.5 Authorization2.7.3.3 Overview of Variable Types and Processing Types2.7.3.4 Calling the Variable Editor2.7.3.5 Defining Variables2.7.3.5.1 Details2.7.3.5.2 Replacement Path2.7.3.5.2.1 Replacement Path: Replacement with a Characteristic Value2.7.3.5.2.1.1 Calculating Variables for Processing Type "Replacement Path"2.7.3.5.2.1.2 Variable Replacement Example2.7.3.5.2.2 Replacement Path: Replacement with Query2.7.3.5.2.3 Replacement Path: Replacement from Variable2.7.3.5.3 Currencies and Units2.7.3.5.4 Default Values2.7.3.6 Defining Default Values for Variables to Allow Overwriting2.7.4 Defining Restricted Key Figures2.7.5 Defining Calculated Key Figures2.8 Query Properties2.8.1 Specifying Data Integrity2.9 Properties of Query Components2.9.1 Characteristic Properties2.9.2 Properties of Characteristic Restrictions and Default Values

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 2 of 141

  • 2.9.3 Attribute Properties2.9.4 Selection/Formula/Cell Properties2.9.5 Structure Properties2.9.6 Filter Properties2.9.7 Variable Properties2.9.8 Condition Properties2.9.9 Exception Properties2.9.10 Row/Column Properties2.9.11 Properties and How They Are Derived2.9.12 Switchable Query Components in the Switch Framework2.10 Examples2.10.1 Example: Defining a Query with Key Figures2.10.1.1 Example: Defining Filters, Free Characteristics, Columns and Rows2.10.1.2 Example: Defining Cells for Changes to Key Figures2.10.2 Examples for Using Variables2.10.3 Example: List of Slow-Moving Items2.11 Managing Queries3 BEx Web3.1 BEx Web Application Designer3.2 Enterprise Reporting3.3 Tasks for System Administration3.3.1 Mass Maintenance and Conversion of Web Templates and Reusable Web Items3.3.2 Reorganization of Bookmarks3.3.3 Displaying BI Query Runtime Statistics on the Web3.3.4 Setting the Size Restriction for Result Sets3.3.5 Activating the Export Library for SAP Business Explorer3.4 Analysis and Reporting: BEx Web Applications3.4.1 Analyzing Data in an Analysis Grid (with Navigation and Filter Panes)3.4.1.1 Example: Swapping Axes in the Navigation Pane Using Drag and Drop3.4.1.2 Example: Moving a Characteristic in the Navigation Pane Using Drag and Drop3.4.1.3 Example: Moving a Characteristic in the Rows Using Drag and Drop3.4.1.4 Example: Dragging and Dropping Structural Components in the Columns3.4.1.5 Example: Dragging a Characteristic to the Columns Using Drag and Drop3.4.1.6 Example: Dragging a Characteristic to the Rows Using Drag and Drop3.4.1.7 Example: Dragging a Characteristic to a Data Cell Using Drag and Drop3.4.1.8 Example: Dragging a Characteristic to a Characteristic Value of Another Characteristic3.4.1.9 Example: Dragging a Characteristic Value to a Characteristic Using Drag and Drop3.4.1.10 Example: Dragging a Characteristic Value to Another Characteristic Value Using Drag and Drop3.4.2 Planning Business Data Manually3.4.3 Context Menu Functions3.4.3.1 Goto3.4.3.2 Making Currency Translations3.4.3.3 Exporting as a CSV File/Excel File3.4.3.4 Setting Bookmarks3.4.3.5 Characteristic Properties3.4.3.6 Properties of Structure Elements and Data Cells3.4.3.7 Data Provider Properties3.4.3.8 Axis Properties3.4.3.9 Properties of the Web Item3.4.4 Restricting Data Using Filter Values3.4.4.1 Selecting Filter Values3.4.4.2 Changing Filter Values3.4.4.3 Searching for Values3.4.4.4 Maintaining User Settings for the Input Help Dialog Box3.4.4.5 Syntax for Directly Entering Values3.4.5 Defining Formulas Ad Hoc3.4.6 List of Conditions3.4.6.1 Defining and Changing Conditions3.4.7 List of Exceptions3.4.7.1 Defining and Changing Exceptions3.4.8 Web Items for Setting Filter Values and Hierarchical Filter Selection Web Item3.4.9 Query View Selection with a Dropdown Box

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 3 of 141

  • 3.4.10 Web Template3.4.11 Working with Documents in Web Applications3.4.12 Navigating in Maps3.4.12.1 Functions in the Geo Function Bar3.4.13 Displaying Exceptions in Maps and Charts3.4.14 Using Variables in Web Applications3.4.14.1 Working with the Variables Screen3.4.14.2 Creating Query Variants3.4.14.3 Personalizing Variables in Web Applications3.4.15 Creating Print Versions of BEx Applications3.4.16 Personalizing the Start Views of Web Applications3.4.17 Web Browser Dependencies3.5 Planning in BEx Web Applications3.5.1 Cell Locks3.5.1.1 Local Cell Locks in a Query (Front End)3.5.1.2 Global Cell Locks in a Planning Application (Back End)3.6 BEx Web Analyzer3.6.1 Pushbutton Functions, Navigation Pane, and Context Menu3.6.2 Function Links3.6.3 Standard Web Template for Ad Hoc Analysis3.7 BEx Patterns3.7.1 Information Consumer Pattern3.8 Integration of BEx and BW Objects in the Portal3.9 BEx Mobile Intelligence4 BEx Analyzer4.1 Analysis Mode4.1.1 Analysis Functions4.1.1.1 Open

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 4 of 141

  • 1 SAP Business Explorer

    PurposeThe SAP NetWeaver Business Intelligence Suite, SAP Business Explorer (SAP BEx), provides flexible reporting and analysis tools for strategic analyses anddecision-making support within a business. These tools include query, reporting and analysis functions. As an employee with access authorization, you canevaluate historical or current data at various levels of detail and from different perspectives; both on the Web, in the portal and in Microsoft Excel.You can also use the SAP Business Explorer tools to create planning applications, and for planning and data entry in BW Integrated Planning. More information:Planning Business Data with BW Integrated Planning .You can use BEx Information Broadcasting to distribute objects created with Business Explorer by e-mail, either as precalculated documents with historical data,or as links with live data. You can also publish this content to the portal (in Knowledge Management folders or collaboration rooms).

    Information about supported Microsoft operating systems and Microsoft Office versions (with maintenance periods) is available in the SAP Developer Network(SDN) under Information Management Business Intelligence Reporting, Analysis, and Planning Maintenance Information BEx Compatibility of MSOperating Systems and Office Products or in the Product Availability Matrix (login to SAP Service Marketplace (SMP) required).

    FeaturesThe graphic below outlines the functional areas of the Business Explorer and how they relate to SAP NetWeaver Portal and SAP NetWeaver Visual Composer.

    BEx applications are created using the various tools from the Business Explorer Suite or SAP NetWeaver Visual Composer; the applications can then bepublished to SAP NetWeaver Portal.Query, Reporting and AnalysisThe data in SAP NetWeaver BW is divided into self-contained business data areas (InfoProviders). You analyze the data from the BW system by defining queriesfor InfoProviders in BEx Query Designer . By selecting and combining InfoObjects (characteristics and key figures) or reusable structures in a query, you definehow you will evaluate the data in the selected InfoProvider.Analyzing data based on multidimensional data sources (OLAP reporting) makes it possible to analyze multiple dimensions simultaneously (like time, location,and product). You can implement any number of variance analyses (such as plan-actual comparison, fiscal year comparison). The data is displayed in a tableand acts as the starting point for detailed analyses that can be used to provide answers to a large variety of questions. A range of interaction options, such assorting, filtering, swapping characteristics, and local calculations allow flexible navigation through the data at runtime. You can also display data graphically (suchas bar charts or pie charts). You can also evaluate geographical data (for example, characteristics such as Customer, Sales Region, and Country) on a map. Youcan also use exception reporting to determine deviating and critical objects, to broadcast messages on deviating values by e-mail, or to distribute the messagesto the universal worklist in the portal.You can perform a detailed analysis of BI information on the Web and in Microsoft Excel.BEx WebWeb Application DesignWeb Application Design allows you to use the generic OLAP navigation in Web applications for simple or highly individual scenarios.You can use standard

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 5 of 141

  • markup languages and Web Design API to implement highly individual scenarios with user-defined interface elements. Web application design comprises abroad spectrum of interactive Web-based business intelligence scenarios that you can adjust to meet your requirements by using standard Web technologies.BEx Web Application DesignerBEx Web Application Designer is a desktop application for creating Web applications. You can use it to generate HTML pages containing BW-specific contentssuch as tables, charts or maps. Web applications are based on Web templates that you create and edit in Web Application Designer. You can save the Webtemplates and access them from the Web browser or the portal. Once they are executed on the Web, Web templates are referred to as Web applications.BEx Web AnalyzerBEx Web Analyzer is a standalone easy-to-use Web application for data analysis that you can call using a URL or as an iView in the portal. In Web Analyzer, youcan open a data provider (query, query view, InfoProvider, or external data source) and use ad hoc analysis to create views of BW data (query views) that you canthen use as data providers for other BEx applications. You can also distribute and save the results of your ad hoc analysis as required.Report DesignerReport Designer is an easy-to-use design tool that you can use to create formatted reports that are optimized for presentation and printing. Report Designerprovides extensive formatting and layout functions that you can use to create corporate balance sheets or HR master data sheets to suit your needs, for example.PDF GenerationThe integrated PDF generation function allows you to print Web applications and reports in various formats. More information: Creating Print Versions of BExApplications .BEx PatternsBEx patterns are Web applications that are tailored to the requirements of particular user groups. BEx patterns are used to provide a uniform display of BW data.You can configure BEx patterns to a certain extent using the Pattern Wizard from the Web Application Designer.BEx AnalyzerBEx Analyzer is an analysis, reporting, and design tool in Business Explorer, which is integrated into Microsoft Excel. In BEx Analyzer, you can analyze selectedInfoProvider data and use it for planning by navigating in queries created in BEx Query Designer. You can do this using the context menu or drag and dropfunctions.You can design the interface for your queries by inserting design items such as dropdown boxes, radio button groups, and pushbuttons into your Excel workbook.A workbook thus becomes a complete query application.See Analysis & Reporting: BEx Analyzer .BEx Information BroadcastingBEx information broadcasting allows you to make BEx objects and BW objects available to a wide range of users, according to your requirements.Using BEx Broadcaster, you can precalculate Web templates, queries, query views, reports, and workbooks and publish them to the portal, distribute them by e-mail, or print them. In addition to precalculated documents containing historical data, you can also generate online links to queries and Web applications.The Business Explorer portal role illustrates the various options that are available when working with BEx objects and BW objects in the portal.See BEx Broadcaster .Integration in the PortalYou can integrate the business contents from SAP NetWeaver BW and SAP BEx in the portal. Integration is performed using BEx Broadcaster, KM content, SAPRole Upload, or the Portal Content Studio. You can create objects with various display types in the portal, depending on the type of integration. More information:Overview: Integration and Display Types of BEx Objects and BW Objects .The portal allows you to access applications from other systems and sources, like the Internet or intranet. Using one single entry point, you can access bothstructured and unstructured information. In addition to content from Knowledge Management, business data from data analysis is available from the Internet andintranet.See Integration of BEx Objects and BW Objects in the Portal .Integration with SAP BusinessObjectsIntegration with SAP BusinessObjects broadens the scope of the reporting tools in Business Explorer. This integration comprises the following:

    Integration with Xcelsius Enterprise to visualize BW data in dashboardsIntegration with Crystal Reports to create form-based reports based on BW data

    See Integration with SAP BusinessObjects .

    2.1 BEx Query Designer

    UseYou analyze the dataset of the BI system by defining queries for InfoProviders using the BEx Query Designer. By selecting and combining InfoObjects(characteristics and key figures) or reusable query elements (such as structures) in a query, you determine the way in which you evaluate the data in theselected InfoProvider.

    FeaturesThe BEx Query Designer provides the following functions:

    You can use the queries that you define in the BEx Query Designer for OLAP reporting and for enterprise reporting. For more information, seeEnterpriseReporting.You can parameterize the queries by using variables for characteristic values, hierarchies, hierarchy nodes, texts, or formulas. For more information,seeVariables.You can select InfoObjects more precisely by:Restricting characteristics to characteristic values, characteristic intervals, and hierarchy nodes. For more information, seeRestricting Characteristics.Defining formulasDefining selectionsDefining reusable calculated and restricted key figures (seeDefining Calculated Key Figures andDefining Restricted Key Figures)Using local or reusable structures (seeStructures andCreating Reusable Structures)

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 6 of 141

  • Defining exceptionsDefining conditionsDefining exception cells

    The most significant components of the query definition are filters and navigation:The selections in the filter restrict the whole query. When defining the filter, select characteristic values from one or more characteristics or from a key figure.All of the InfoProvider data is aggregated using the filter selection of the query.For the navigation, select free characteristics and define the content of the rows and columns of the query. You use this selection to specify the data areas ofthe InfoProvider through which you want to navigate. The arrangement of row and column content determines the initial view for the query.After being inserted into a workbook, a query is displayed in the default initial view in the portal or in the BEx Analyzer. By navigating through the query, youcan generate different views of the InfoProvider data: You do this by dragging one of the free characteristics into the rows or columns of the query, forexample, or by filtering a characteristic according to a single characteristic value.

    Query definitions allow the InfoProvider data to be evaluated specifically and quickly. The more detail you use to define the query, the quicker its execution andnavigation.

    ActivitiesTo open the Query Designer, choose Start Programs Business Explorer Query Designer.You can also call the BEx Query Designer from the following BEx tools:

    BEx AnalyzerBEx Web Application DesignerBEx Report Designer

    See also:Defining New Queries

    2.1 BEx Query Designer

    UseQuery Designer is a desktop application for creating queries, and plays an important role in the Business Explorer Suite. The queries created can be displayedas data providers for Web applications, reports, and workbooks or can alternatively be displayed in BEx Web Analyzer.This section describes the appearance of Query Designer and explains how you can customize it according to your requirements.

    FeaturesAs well as the menu bars and toolbars, BEx Query Designer comprises the following screen areas:

    InfoProviderRows/ColumnsFiltersTasksPropertiesMessagesWhere-Used ListDocumentsCellsExceptionsConditions

    For more information about the screen areas, which you can also display using the menu bar and the Viewtoolbar, seeMenu Bar Functions in Query Designer.You can personalize the appearance of Query Designer.

    When you start Query Designer, a standard view is displayed automatically. This shows the InfoProvider screen area on the left, the Filter area in themiddle, and the Rows/Columns area underneath as a tab page. The Properties area is shown on the right, and the Tasks area is displayed underneath as atab page. In the lower area, the Messages area is displayed in collapsed form. If you drag the cursor over the Messages area, it expands automatically.You can use the View menu to show and hide screen areas such as Propertiesor Messages, as well as the toolbars.You can move the toolbars to any position. Depending on where you position the object, it is either anchored or appears as a hovering toolbox. The screenareas can be arranged on top of one another as tab pages.Using the View Predefined Standard View menu option, you can return to the standard view. If you prefer to use the view you are familiar with fromQuery Designer in SAP BW 3.x, choose View Predefined SAP BW 3.x View.

    2.2 Working with BEx Query Designer

    General ConceptsBEx Query Designer provides you with a high degree of flexibility and ease of operation. It is structured according to the following concepts.Error Handling, Correction Help, Messages and WarningsThe error handling concept in Query Designer allows you to create and edit objects without disrupting your work. Query Designer informs you of errors byunderlining incorrect or incomplete objects in red. However, your work will not be disrupted by error messages appearing in popups. Error messages aredisplayed in the Messages screen area instead. Warnings and information are also displayed here. The messages are displayed in groups for improved clarity.They are displayed in the following categories, which you can expand and collapse as needed:

    Messages for the current queryMessages about elements stored on the server that were loaded for use in the query by Query Designer.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 7 of 141

  • Status messagesCorrection help is available in several places:

    In the context menu for the incorrect objects - underlined in redIn the context menu for the error message in the Messages screen areaIn the Query Designer menu bar under HelpIn the Tasksscreen area

    With the Explain These Errors menu option, the error message text is displayed in the Documents screen area. By choosing Jump to Error, you can return to theobject that has errors. The Correct These Errorsmenu option provides situation-specific context-sensitive correction options.TasksIn the Tasks screen area, Query Designer provides various situation-specific context-sensitive editing options. These functions can be called either from thecontext menu or the menu bar. The Tasks area is intended for users who do not work very often with Query Designer or do not have much experience with the tool.The tasks make it easier for you to find the required functions. The tasks also provide correction help for incorrect objects, together with further explanations.Working with Unfinished ObjectsYou can define new objects (formulas, selections, restricted and calculated key figures, exception cells, variables, conditions or exceptions) wherever you needthem. The object (without a definition) is created and is given a standard name. You can change the name directly at the object. The object can be used in otherobjects without a definition. You can decide whether to define it immediately or later. A message is appears in the Messages screen area reminding you to definethe object..Automatic Generation of Technical NamesThe system automatically generates technical names for reusable objects you create (variables, restricted key figures or calculated key figures). As long as youhave not yet saved an object, you can change its technical name in the relevant dialog. Once you have saved the object, you cannot change the technical nameagain. The generation rule is (VAR/RKF/CKF)_, for example RKF_20050818122045. If you have not yet saved the object, and the generatedtechnical name has not been changed, a warning appears informing you that you should change the technical name.Automatic generation of technical names ensures that the objects are unique immediately and allows you to work with unfinished objects.Simultaneous Editing of Multiple ObjectsYou can edit several objects at the same time. The objects should all be of the same type, so that you can use all available options when working with each one.If a function is not allowed for all of the selected objects, it will not displayed.The Edit and New functions for selections, formulas, variables, restricted or calculated key figures do not allow simultaneous editing of multiple objects. TheTechnical Name input field is also hidden when editing the properties of multiple objects at the same time. Since the technical name must always be unique,Query Designer does not allow simultaneous editing.For drag and drop operations with multiple objects, it proceeds as if drag and drop is being performed for all objects allowed for this operation. The drag and dropoperation is not executed on objects that may not be dragged to the selected location.If you want to delete multiple objects at the same time, Query Designer proceeds as in drag and drop operations. All deletable objects are deleted. Objects thatcannot be deleted (for example, reusable objects that are part of other queries) are not deleted. The relevant information is displayed in the Messages screenarea.Reusable PropertiesThe properties for query components show you whether the setting has been defined locally at the object or at the underlying object. You can decide yourselfwhether to use a local setting or to use the default value. If you use the default value, the local object references the default value. If you reference another object,you can only edit the referenced object (the default value) when making settings. The change is visible automatically in all other objects that use the default value.More information:Properties and How They Are Derived

    ProceduresTo create a query, proceed as follows:Click on the plus or minus symbols to expand or collapse the directories. This allows you to display the list of all key figures in the InfoProvider by expanding thekey figure node in the InfoProvider tree.Using drag and drop or the temporary storage location (Ctrl C - Ctrl V), you can drag characteristics, key figures, and reusable objects from the InfoProvider to thedirectories in Query Designer (Filter, Rows, Columns, Free Characteristics).Using the secondary mouse button, you can call all functions offered in the current context menu. First select the required query component and then choose amenu option from the context menu.If you double-click an element in Query Designer, the standard function is called for this element. You can also call the standard function from the context menu,where it is displayed in bold. If, for example, you double-click a characteristic, the dialog box for restricting the characteristic appears. If you double-click on acalculated key figure, for example, the Change Calculated Key Figure dialog box appears.You can cut objects and paste them in another location. With the Edit menu or an object's context menu, you can use the Cut function. The object will not bedeleted immediately. It will continue to be displayed here at first. Once you use the Pastefunction (from the context menu or Edit menu) at a new location, theobject disappears from the old location and appears at the new one. This ensures that the object is not removed if you forget to insert it in another location. If youforget to insert the object and cut and paste another object instead, the clipboard with the object you cut before is not overwritten. The object you cut beforeremains at the old location.Remove or DeleteIf you want to remove objects from the query, choose Remove from the object context menu. If you want to delete a reusable object, choose Delete from the contextmenu. Deletion means that the object is deleted from the BW server and is no longer available in a query. Removing means that the object is removed locally fromthe query but remains available in other queries provided that it is a reusable object.Edit Text Directly at the ObjectWhen a new object is created, it is displayed with a standard name. If you click on the standard text, the cursor appears directly on the standard text of the object,and you can overwrite it.

    2.3 Functions of the Menu Bar in the Query Designer

    UsePUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 8 of 141

  • UseThis section contains an overview of the functions available in the menu bar and toolbar in the BEx Query Designer.

    FeaturesMenu BarThe functions are available from the following menus in the menu bar:

    QueryEditViewToolsHelp

    ToolbarsThe Query Designer has the toolbars View, Standard, and Exit:View ToolbarIn the View toolbar, the following functions are available as pushbuttons in the menu bar:

    InfoProviderFiltersRows/ColumnsCellsConditionsExceptionsPropertiesTasksMessagesWhere-Used ListDocumentsTechnical Names

    Standard ToolbarIn the Standard toolbar, the following functions are available as pushbuttons in the menu bar:

    New Query...Open Query...Save Query...Execute...Check QueryQuery PropertiesCutCopyPaste

    Exit ToolbarIn the Exit toolbar, the following functions are available as pushbuttons in the menu bar:

    Exit and Use QueryEnd and Discard Changes

    NoteThe Exit toolbar is available when you call the BEx Query Designer from the BEx Analyzer, the BEx Web Application Designer, or the BEx ReportDesigner.

    2.3.1 Functions in the Query Menu

    UseThis is an overview of the functions in the Query Designer bar in the Querymenu.

    FeaturesThe Querymenu offers the following functions:Menu: Query

    Menu Option DescriptionNew To create a query, choose New... The BEx Open dialog appears. You can select the

    InfoProvider whose data you want to use as the basis for your query. You can select theInfoProvider either from the InfoProviders in your history or from the list of all availableInfoProviders under InfoAreas. More information:Defining New Queries.

    Open When you choose Open, the BEx Open dialog appears. All queries are offered here inyour history, favorites, or roles, or are listed according to InfoArea. In InfoAreas, a list ofall existing queries is displayed from the BW system that you have display authorizationfor.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 9 of 141

  • 2.3.2 Functions in the Edit Menu

    UseHere you get an overview of the functions that are provided in the menu bar for the Query Designer in the Edit menu.

    Check Before saving a new or changed query, you can use the Check function to check thequery definition for errors.Whenever you use the Quit and Use Query function, the system calls the Checkfunction automatically for queries that have not yet been saved. Once the system haschecked the query successfully, it prompts you to decide whether to save it.

    Save When changing a query, you can use the Save function to save it under its currentname.If the query does not have a technical name, the system displays the Save As functionautomatically. More information:Saving Queries.

    Save As To save the query under a new technical name, choose Save As... Enter the newtechnical name. You can save the query in your favorites or roles. Moreinformation:Saving Queries.

    Delete To delete the query, choose Delete. You can delete the query only if it is no longer beingused (in any workbook, Web template, report or broadcast setting).

    Where-Used Lists If you want to identify where the query is used, choose Where-Used List. In the Where-Used List screen area, the system displays the objects (workbook, Web template, report,or broadcast setting) in which this query is used.

    Documents This function enables you to access the document browser, where technical informationabout the query is displayed (technical name, identifier, last changed by, and so on) andyou can see all documents for this query.Using the document browser, you can display documents, create a new text document,insert new formatted text, or upload an existing document.

    Properties Choose Properties if you want to change the description of the query or if you want tomake settings for the Result Position, Display Options, Value Display, and SuppressZeros for the query. You can also release OLE DB for OLAP in the query properties. Youcan also access the existing documents for the objects used in the query from here. TheQuery Properties dialog box appears in the Properties screen area. You can make therequired settings here. More information:Query Properties.

    Execute... Once you have defined and saved your query, you can use this function to display it inBEx Web Analyzer and analyze the data. More information:BEx Web Analyzer.

    Publish You can publish queries that you have edited and saved in the Query Designer so thatthey are available to other users.You can choose from the following options:To RoleThe save dialog appears. Here, you can select the role where you want to publish thequery. The system saves a link to the current query in the selected role.To PortalThe publish dialog appears. This enables you to publish the query in the Portal ContentDirectory (PCD) as an iView. More information:Publishing Queries, Web Applications,and Reports.BEx BroadcasterBEx Broadcaster is launched. This is a Web application for precalculating and distributingqueries, query views, Web templates, reports, and workbooks. You can precalculate thequery that you edited in Query Designer, or generate an online link. You can broadcastthe generated document or link by e-mail, print it, or publish it in the portal. Moreinformation:Broadcasting BEx Objects.

    Exit and Use Query You can use this function to exit the Query Designer and use the query that you havedefined. This function is only available if you have called Query Designer from other BExtools. The format in which the query is used depends on the tool you called QueryDesigner with. Generally, the query is available as a data provider for Web applications,reports, or workbooks.If you have not saved your query yet, the system calls the Check function automaticallyto check the query for errors. Once the system has checked the query successfully, itprompts you to decide whether to save it.

    End and Discard Changes This function is only available if you have called Query Designer from other BEx tools.Using this function, you quit Query Designer but do not use the modified query in theBEx tool from which you called Query Designer. Instead, the version of the query is usedthat was displayed before you called Query Designer.If you have not saved your query yet, the system calls the Check function automaticallyto check the query for errors. Once the system has checked the query successfully, itprompts you to decide whether to save it. You can therefore save the query in the newversion without using this new version in the current environment (BEx Analyzer orBEx Web Application Designer, for example).

    Exit You can use this function to quit Query Designer if you called it from the start menurather than from other BEx tools.If you have not saved your query yet, the system calls the Check function automaticallyto check the query for errors. Once the system has checked the query successfully, itprompts you to decide whether to save it.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 10 of 141

  • FeaturesYou can choose from the following functions in the Edit menu:Menu: Edit

    2.3.3 Functions in the View Menu

    UseThe following information provides an overview of the functions provided in the menu bar for the Query Designer in the Viewmenu.

    FeaturesYou can choose from the following functions in the View menu:Menu: View

    Menu Entry DescriptionDisplay/Change You can use this function to change between the display and change modes in the

    properties of a query or query component.Cut You can use this function to cut selected objects.Copy You can use this function to copy selected objects.Paste You can use this function to paste selected objects into other areas.Paste as Child You can use this function to paste selected structural components subordinate to the

    structural components above the selection. The hierarchical relationship of the structuralcomponents is displayed in the executed query similar to a presentation hierarchy.

    Remove You can use this function to remove selected objects.

    Menu Option DescriptionPredefined Using the View Predefined Standard View menu option, you can return to the

    standard view. If you prefer to use the view that you are familiar with from the QueryDesigner in SAP BW 3.x, choose View Predefined SAP BW 3.x View.

    Toolbars You use this function to show and hide the View, Standard, and Exit toolbars.Technical Names You use this function to show or hide the technical names of the query components

    (InfoObjects, structures, variables, and so on).Properties You use this function to show the Properties screen area. The content of the Properties

    screen area automatically adjusts itself. Depending on the object that you select, theproperties appear as context-sensitive.

    Tasks You use this function to show the Tasks screen area. In this area, the most importanttasks for the selected object with which you are currently working are listed; the tasks arelisted context-sensitively. This provides an overview of the functions and optionsavailable to you while you are working in the query.

    InfoProvider You use this function to show the InfoProvider screen area. The content of theInfoProvider upon which the query is based is displayed in this area; from here you caninclude objects in the query by using drag and drop.

    Filter You use this function to show the Filter screen area. You specify the filter values of thequery in this area. For more information, seeFilters.

    Rows/Columns You use this function to show the Rows/Columns screen area. In this area, you specifythe free characteristics for navigating in the query and the contents of the rows andcolumns. You can view the structure of the query in a preview.

    Cells You use this function to show the Cells screen area. If the query already contains cells,this area automatically appears as a tab page.You can define formulas and selection conditions explicitly for cells in queries with twostructures. In this way, you can override cell values created implicitly from theintersection of the structure components. This function allows you to design moredetailed queries.This function is only available for queries with two structures. The menu option isdeactivated for queries with just one structure.SeeDefining Exception Cells.

    Exceptions You use this function to show the Exceptions screen area. If the query already containsexceptions, this area automatically appears as a tab page.You can define exceptions for a query. Exceptions are deviations in key figure values thatyou define. They are displayed in color in the query view. This allows you to see at aglance whether results deviate from the expected results.SeeException Reporting.

    Conditions You use this function to show the Conditions screen area. If the query already containsconditions, this area automatically appears as a tab page.You can define conditions for a query. You can specify threshold value conditions for the

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 11 of 141

  • 2.3.4 Functions in the Tools Menu

    UseHere you get an overview of the functions that are provided in the menu bar for the Query Designer in the Tools menu.

    FeaturesYou can choose from the following functions in the Tools menu:Menu: Tools

    2.3.5 Functions in the Help Menu

    UseHere you get an overview of the functions that are provided in the menu bar for the Query Designer in the Help menu.

    FeaturesYou can choose from the following functions in the Help menu:Menu: Help

    2.4 Defining New Queries

    key figure values for every characteristic. For example, you can specify all sales figuresabove or below a certain threshold value. In the query, the selected characteristics aredisplayed with the restricted key figures.SeeConditions

    Messages You use this function to show the Messages screen area. System messages, checkmessages, warnings, and other information are displayed in this area. From the contextmenu of the message, you can navigate to the actual error, or display information aboutthe error.

    Where-Used List You use this function to show the Where-Used List screen area.When you choose Query Where-Used List the Query Designer displays in the Where-Used List area the objects (workbook, Web template, report or broadcast setting) in whichthis query is used.When you choose Where-Used List in the context menu for reusable objects, the systemdisplays in this area where these objects are used.

    Documents You use this function to show the Documents screen area. When you select the ExplainError Message function, the system message texts are displayed here.

    Menu Option DescriptionSave All You can use this function to save the query and its components, as well as the reusable

    objects for this InfoProvider that are not used in the query (for example, newly createdvariables in the InfoProvider screen area), in one step.

    Expand Nodes You can use this function to fully expand the hierarchy nodes that you have selected, inone step.

    Collapse Nodes You can use this function to fully collapse the hierarchy nodes that you have selected, inone step.

    Menu Entry DescriptionApplication Help When you choose Application Help, the SAP NetWeaver online documentation

    appears. The Query Design: BEx Query Designer section in the documentation for theBusiness Explorer is displayed automatically there.

    Jump to Error After you have selected an object containing errors, which is indicated by red underlining,and have read the error message text in the Documents area, you can use this functionto return to the location of the error.

    Explain This Error After you have selected an object containing errors, which is indicated by red underlining,you can use this function to explain the error. The error message text appears in theDocuments area.

    Correct This Error After you have selected an object containing errors, which is indicated by red underlining,you can use this function to correct the error. Context-sensitive correction help is offered.

    About Using this function, you see the version of the Query Designer with the number of thesupport package and the revision. You can quote this information to SAP if you need tosend problem messages.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 12 of 141

  • UseTo analyze data in BEx Analyzer or in BEx Web applications, you require a query as a data provider. Queries also act as data providers when you create reports.To do this, you define new queries in BEx Query Designer based on InfoProviders.

    PrerequisitesAt least one InfoProvider is available in the BW system.You have called BEx Query Designer using one of the following options:

    Standalone, choosing Start Programs Business Explorer Query Designer.BEx Web Application Designer:You have chosen Tools BEx Query Designer in the Web Application Designer menu bar.BEx Analyzer:You are in an empty cell and have chosen Tools Define New Query in the analysis toolbar.BEx Report Designer:In the menu bar of the Report Designer, you have chosen Tools BEx Query Designer...

    You have then chosen Query New in the Query Designer menu bar.

    ProcedureOverviewYou define queries by:

    Selecting an InfoProvider for which the query is definedSelecting reusable structures that already contain characteristic or key figure combinations (for example, contribution margin schema)Selecting characteristics from the InfoProviderRestricting selected characteristics to characteristic values, characteristic value intervals, or hierarchy nodesUsing variables for characteristic values, hierarchies, hierarchy nodes, formulas, and texts or defining new variables where necessarySelecting key figures from the InfoProviderFormulating calculated key figuresRestricting key figures by combining them with characteristicsDefining Exception CellsArranging the characteristics and key figures in rows or columns and thereby establishing an initial view for the query analysis

    NoteThe steps that are not in bold are optional. You do not have to use these functions.

    NoteWith an InfoCube as an InfoProvider, you can display and sort the key figures in a hierarchy. The key figures are then displayed in the InfoProviderscreen area. More information:Creating InfoCubes.

    Defining QueriesThe selection screen is displayed for all InfoProviders that you can define a new query for.

    1. From your history, or from all available InfoProviders under InfoAreas, select the InfoProvider that you want to base your query on.

    NoteIf you want to show the technical name of the InfoProvider, choose the Technical Name On/Off icon.

    2. The available objects for the InfoProvider you selected are displayed as a directory tree in the InfoProvider screen area.

    NoteYou can sort the objects of the InfoProvider alphabetically (either in descending or ascending order) by clicking the corresponding arrows in the title bar.If you click three times, the system displays the data in the default order again (from top to bottom: Structures, Filter, Key Figures, and Dimensions).

    The Filter screen area contains empty directories for the filter selection; the Rows/Columnsscreen area contains empty directories for the rows, the columns,and the free characteristics of the query. The preview of the results area for the query can be found at the bottom right. This area is also empty initially.For more information about the process for creating a query, seeWorking with BEx Query Designer, under Proceed as follows to create a query

    3. Make the selections for the filter of the query. Note that the filter selection has a restricting effect on the entire query, which means that all the InfoProviderdata is aggregated with the filter selection. In the InfoProvider directory tree, select the characteristics or the key figure that you want to base the query on.

    CharacteristicsExpand the required dimension directory and first select one or more characteristics that you want to restrict to one or more values, a variable, a valueinterval, or a hierarchy node from the InfoProvider. Expand this characteristic and using drag:

    One or more single values to the filter's Characteristic Restrictions areaOne or more characteristics to the filter's Characteristic Restrictions area. Click the right mouse button on a characteristic to display the contextmenu and choose Restrict. Now select a characteristic value interval or a hierarchy node (more information:Restricting Characteristics).

    Key figureDecide whether to base all the query data on the numerical values of just one key figure or to base it on multiple key figures. If you want to base thequery on the numerical values of just one key figure, select the relevant key figure for the InfoProvider tree and drag it to the Filter area. You can alsouse a restricted or calculated key figure (more information:Defining Restricted Key Figures andDefining Calculated Key Figures).

    4. If required, define default values for the filter by dragging the required filter values into the filter's Default Values area. More information:Filters.5. Specify which characteristics, key figures, or structures you want to be available for navigating through the query data. Drag the corresponding directories of

    the characteristics in the InfoProvider tree to the directories Rows, Columns, orFree Characteristics in the Rows/Columns screen area, or drag the structuredirectories into the rows or columns.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 13 of 141

  • NoteIf a characteristic has a compound characteristic, the compound characteristic is automatically added during the drag and drop action. This also appliesto copying and pasting.The compound characteristic is always added to the characteristic restrictions of the filter. For example, characteristic Country is compounded tocharacteristic Region. If you drag the Region characteristic to the Free Characteristics area, the characteristic Country appears automatically in theCharacteristic Restrictions area of the filter.You can use any number of characteristics in the query. Note however that the number of characteristics in the drilldown is restricted. An unlimitednumber of characteristics is permitted in the Free Characteristics area. Note, however, that the rows and columns can contain a maximum of 50 - characteristics only.If the query does not contain a structure, a total of 50 characteristics are permitted in the rows and columns. If you use one structure, 49 characteristicsare permitted, and with two structures, 48 characteristics are permitted in the rows and columns.

    If you have not selected any key figures for the filter, define one or more key figures either in the rows or columns of the query. Drag a key figure from theKey Figuresdirectory in the InfoProvider tree to either the Rowsor Columns directory. Query Designer automatically generates a new structure that containsthe selected key figure; the structure has the default description Key Figures.You can also define a new calculated key figure and use it for the query. For example, instead of "Sales revenue", define the key figure "Price", which iscalculated by dividing "Sales revenue" by "Quantity". Select the Key Figures directory in the InfoProvider tree and in the context menu, choose NewCalculated Key Figure.You can restrict key figures to characteristic values, characteristic value intervals, or hierarchy nodes by selecting the key figure and choosing Edit in thecontext menu. "Sales revenue in first quarter" is an example of a restricted key figure.By placing the characteristics, key figures, or structures either in the rows or columns directory, you configure the first navigational state of the query (startview). In the lower right area of the screen, you can see a preview of the results area of the query. This is displayed in the start view that you selected.

    NoteYou can use drag and drop to change how the key figures and characteristics are arranged in the rows and columns until the preview displays theresults area you want.

    6. Once you have created the query, you can check the query definition by choosing Query Check in the menu bar.7. Choose Query Properties in the menu bar if you want to change the Description,settings for Result Position, Display Options and Number Display, or

    Key Date for the query. More information:Query Properties8. Save the query. Enter a Technical Name and a Description for the query. The Technical Name must uniquely identify the query; meaning that the name

    may appear only once across all InfoProviders in the BW system. The technical name can be up to 30 characters in length and must begin with a letter.

    ResultThe query has been saved and can now be:

    Used in BEx Analyzer as a data provider for design itemsUsed in Web Application Designer as a data provider for Web itemsDisplayed in BEx Web Analyzer: Choose Query Execute

    You can analyze the query data in Business Explorer.

    More Information:Creating Reusable StructuresProperties of Query ComponentsMenu Bar Functions in Query DesignerAuthorizations for Query Definition and Information BroadcastingMore information about displaying and sorting key figures in a hierarchy:Creating InfoCubesMore information about using non-cumulative InfoCubes as InfoProviders:Performance Tips

    2.4.1 Restricting Characteristics

    UseWhen defining a query, you can restrict characteristics in the filter to single characteristic values, value ranges, hierarchy nodes, or characteristic value variables.

    PrerequisitesYou have selected the characteristic in the filter and using the secondary mouse button, you have chosen Restrict in the context menu.

    ProcedureGeneral Functions of Input HelpWhen you select characteristic values in the query definition, you can use the same functions as those available in the input help in the executed query. For thefollowing functions, see the descriptions underSelecting Characteristic Values.

    Selecting single valuesSelecting value rangesDisplaying value keysValues available in historySaving values to favoritesDeleting values from the selection window

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 14 of 141

  • Searching for ValuesA search option is available in the input help dialog box. For more information, seeSearching for Values.Personalization of Input HelpYou can make various user-specific settings to personalize input help functions. For more information, seeMaintaining User Settings for the Input Help Dialog Box.Input Help Functions in the BEx Query DesignerIn contrast to calling the input help dialog box from the BEx Analyzer and the BEx Report Designer, the input help dialog box in the BEx Query Designer alwaysappears with the full range of functions and with both screen areas. The right window, Selection, which displays the selected values, is always visible.You can choose from the following additional functions in the query definition:Excluding Values from the SelectionYou use this function to select the values that you do not need for your report.

    NoteThis function is only used with single values or single value variables.

    1. Select the required value in the right Selectionwindow.2. Choose Exclude from Selection.

    If you want to undo the procedure, choose Include in Selection.Selecting VariablesWhen you select characteristic values in the query definition, you can also select variables instead of fixed values. These act as placeholders and are only filledwith fixed values when the query is executed.

    NoteWhen selecting variables, you can also define new variables, change variables, or delete variables. These functions are always available to the right of theselection of the variable type.

    Selecting Variables1. Choose Show Variables.2. Under Type, select the variable type (such as Characteristic Value Variable, Hierarchy Node Variable) from which you want to select the variable.3. Select one (or, in exceptional cases, more than one) variable from the list of available variables in the left window and add them (using the right arrow) to the

    right Selection window.Selecting Variable Value Range Limits

    1. Choose Show Value Ranges.2. Select your required operator from the dropdown box. You can choose from the following operators:

    BetweenLess Than or Equal toGreater Than or Equal toLess ThanGreater Than

    3. Select the required value or values for the value range and choose . The input help appears in a new dialog box and displays the selection of variablesunder Show Variables.

    4. Under Type, select the variable type (such as Characteristic Value Variable, Hierarchy Node Variable) from which you want to select the variable.5. Select the required variable and choose OK.6. For the Betweenoperator, two single values are required for the interval limits; the system automatically displays two dropdown boxes. In this case, repeat

    steps 3-5.7. After you have set the value range, choose OK.8. Add the selection to the right Selection window using the right arrow.

    Selecting Intervals with One Variable and One Fixed Limit1. Choose Show Value Ranges.2. Choose the Between operator.3. Select the fixed limit:

    You can also select the values from your history in the dropdown box.If you want to select another value, choose . The input help appears in a new dialog box and offers the corresponding single values under Show Single Values or History for selection. Select the required value and choose OK.

    4. Select the variable limit by following steps 3-5 from the Selecting Value Range Limitssection above.5. After you have set the value range, choose OK.6. Add the selection to the right Selection window using the right arrow.

    Selecting Variable Offsets

    CautionYou can only use this function for characteristic value variables of the type Single Value.

    1. Select the required variable in the right Selection window.2. Choose Set Variable Offsets.3. Enter the required offset value.4. Choose OK.

    TipYou want to select the period of the last 5 years for your data analysis.

    1. Choose Show Value Range and Between as the operator.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 15 of 141

  • 2. Choose the variable Current Calendar Year and copy it to the right Selection window using the right arrow.3. Select the variable and choose Set Variable Offsets.4. For the lower limit, enter the offset -5.5. Do not enter an offset for the upper limit.6. Choose OK.

    Selecting Fixed/Variable Hierarchies/Hierarchy NodesYou can also restrict characteristics by hierarchy or hierarchy node, on a fixed or variable basis. SeeRestricting Characteristics: Hierarchies.

    ResultYou have now restricted a characteristic to certain characteristic values. Choose OK. You return to the query definition. Save your entries and execute the query.

    NoteIf you have restricted a characteristic to variable values, before the query is executed a dialog box appears into which you manually enter variable values(provided that the variable is flagged as Ready for Input). For more information, seeVariables.Enter the required values and choose OK. The query is now executed with the chosen values.

    The query is calculated according to your selection criteria. The selected characteristic values are displayed to the right in the filter area, next to the correspondingcharacteristic. Only the selected characteristic values are included in the table (or in the chart or map).

    2.4.1.1 Restricting Characteristics: Hierarchies

    UseIn the Query Designer, you can restrict characteristics by hierarchy or hierarchy node, on a fixed or variable basis.You can choose from the following options:

    Fixed Hierarchy Node - Fixed Hierarchy

    TipReport on department A (fixed hierarchy node) for the hierarchy valid for 2005 (fixed hierarchy)

    Variable Hierarchy Node - Fixed Hierarchy

    TipReport on chosen department (variable hierarchy node) for the hierarchy valid for 2005 (fixed hierarchy)

    Fixed Hierarchy Node - Variable Hierarchy

    TipReport on department A (fixed hierarchy node) for the hierarchy valid for the current calendar year (variable hierarchy).

    Variable Hierarchy Node - Variable Hierarchy

    TipReport on a chosen department (variable hierarchy node) for the hierarchy valid for the current calendar year (variable hierarchy).

    PrerequisitesThis function is only available if hierarchies exist for the characteristic that you want to restrict.For more information about hierarchies, seeHierarchies.

    ProcedureFixed Hierarchy - Select Fixed Hierarchy Node

    1. Choose Show Single Values.2. Choose the required hierarchy under Hierarchy.3. Navigate to the required hierarchy node in the hierarchy tree.4. Select the required hierarchy node and copy it to the right Selection window using the right arrow.

    Fixed Hierarchy - Select Variable Hierarchy Node1. Choose Show Variables.2. For the selection of the variable hierarchy node, choose Hierarchy Node Variable underTypein the upper area.3. From the list of available hierarchy node variables, choose the required variable and select it.4. In the lower area, under Hierarchy, choose . The Select Hierarchy dialog box appears.5. Select a fixed hierarchy (seeSelecting Hierarchies).6. Add the selection to the right Selection window using the right arrow.

    Variable Hierarchy - Select Fixed Hierarchy Node1. Choose Show Single Value.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 16 of 141

  • 2. For the selection of the fixed hierarchy node, choose the required hierarchy under Hierarchyin the upper area.3. Navigate to the required hierarchy node in the hierarchy tree and select it.4. In the lower area, choose Variable Hierarchy.5. Choose . The Select Hierarchy dialog box appears.6. Select a variable hierarchy (seeSelecting Hierarchies).7. Add the selection to the right Selection window using the right arrow.

    Variable Hierarchy - Select Variable Hierarchy Node1. Choose Show Variables.2. For the selection of the variable hierarchy node, choose Hierarchy Node Variable underTypein the upper area.3. From the list of available hierarchy node variables, choose the required variable and select it.4. In the lower area, under Hierarchy, choose . The Select Hierarchy dialog box appears.5. Select a variable hierarchy (seeSelecting Hierarchies).6. Add the selection to the right Selection window using the right arrow.

    ResultYou have restricted a characteristic according to a node within a hierarchy. Choose OK. This takes you back to the Query Designer. Save your entries andexecute the query.

    NoteIf you have restricted a characteristic to a variable hierarchy or a hierarchy node, before the query is executed a dialog box appears in which you manuallyenter variable values (provided that the variable is flagged as Ready for Input). Enter the required values and choose OK. The query can now be executedwith the values you selected to fill the variable.

    2.4.1.2 Selecting Hierarchies

    UseYou select hierarchies at the following stages in the query definition:

    When selecting a variable hierarchy or a fixed hierarchy for a hierarchy node (seeRestricting Characteristics: Hierarchies).When selecting a display hierarchy for a characteristic (seeProperties of the Characteristic.

    PrerequisitesYou can only use this function if hierarchies have been created for the characteristic that you want to restrict.More information:Hierarchies.

    NoteIf you have activated virtual time characteristics in the SAP Reference IMG for time characteristics, you can select virtual hierarchies when selectinghierarchies.More information:Activating Virtual Time Hierarchies

    ProcedureYou are in the Select Hierarchy dialog box. You have the following options:Select Fixed Hierarchies

    1. Under Hierarchy Name, choose a fixed hierarchy.2. Choose OK.

    Select Variable HierarchiesA hierarchy is variable if at least one of its elements (name, version, key date) is variable.

    1. Select Hierarchy Variables.2. Choose . The input help for selecting the variable hierarchy appears.3. Select the required hierarchy and choose OK.

    NoteYou can also define a new variable and change or delete an existing one. These functions are always available to the right of Hierarchy Variable.

    4. Make the required settings for the version and key date.5. Choose OK.

    NoteNote that the version and key date fields can only be filled if the characteristic has version-dependent or time-dependent hierarchies.

    More InformationFor more information about the hierarchy properties (version-dependent and time-dependent) that you can set on this dialog, seeHierarchy Properties

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 17 of 141

  • 2.4.2 Defining Selections

    UseYou can define a query by dragging the key figures from the InfoProvider to the directories in Query Designer. If you drag a key figure into the rows or columns,this key figure automatically becomes part of a structure.You can restrict (filter) the key figure in the structure using one or more characteristic selections. The key figure, restricted by one or more characteristicselections, can be a basic key figure, a calculated key figure, or a key figure that is already restricted.

    ProcedureDefining a New Selection

    1. If the query does not contain any key figure structures yet, drag a key figure to a directory in Query Designer. Alternatively, select the header of thedirectories for Rows or Columns and select New Structure in the context menu.

    2. Select the structure directory, and choose New Selection in the context menu. The New Selection entry is inserted, and the properties of the selection aredisplayed in the Properties screen area.

    3. Select the New Selection entry and choose Edit in the context menu. The Change Selection dialog box appears.

    NoteYou can also call the Change Selection dialog box from the Properties screen area by choosing Edit.

    You make the basic settings on the General tab page.A text field for entering a description of the selection is available in the upper part of the screen.

    You can usetext variables in the description.You can also enter a technical name in the Technical Name field.A directory of all objects available in the InfoProvider is displayed below the text field, to the left of the Detail View area. The empty field for the definition of the newselection (Details of the Selection) is on the right-hand side of the screen.

    NoteIf the query contains two characteristic structures - one in the rows and one in the columns - and a key figure is defined in the filter, the key figures of theInfoProvider are not displayed on the left-hand side of the Detail View.

    1. Drag a key figure from the InfoProvider, and restrict it by selecting one or more characteristic values. SeeRestricting Characteristics.

    NoteYou can also use variables instead of characteristic values. For technical reasons, note that you cannot use the following variable types in selectionstructure elements:

    Variables with processing type Replacement with Query (more information:Replacement Path: Replacement from Query)Variables that represent a precalculated value set (more information:Details)

    You can use these variable types to restrict characteristics in the rows, columns, or in the filter.

    NoteIf a characteristic has a compound characteristic, the compound characteristic is automatically added during the drag and drop action.For example, characteristic Country is compounded to characteristic Region. If you now drag the Region characteristic to the Details of the Selection area, theCountry characteristic is also added automatically. If the Country characteristic is already in the Characteristic Restrictions for the filter, and you now drag theRegion characteristic to the Details of the Selectionarea, only the Regioncharacteristic is displayed under Details of the Selection. This is because the Countrycharacteristic is already in the Characteristic Restrictions for the filter.

    1. Make any necessary settings for the properties of the selection on the other tab pages. SeeSelection/Cell/Formula Properties2. Choose OK. The new selection is defined in the structure.

    Editing Selections1. If you want to change the restriction on a key figure, select the key figure in the structure and choose Edit in the context menu. The Edit Selection dialog box

    appears.

    NoteYou can also call the Change Selection dialog box from the Properties screen area by choosing Edit.

    2. Make the required changes to the definition and, if required, to the properties on the corresponding tab page.3. Choose OK.

    Marking Selections as ConstantYou can mark a selection in the Query Designer as constant. This means that navigation and filtering have no effect on the selection at runtime. This allows you toeasily select reference sizes that do not change at runtime.More information:Constant SelectionDefining Properties for the Selection

    1. Select the selection in the structure. The properties dialog box is displayed in the Properties screen area.2. Make the required settings for the technical name, description, display, number format, and calculations for the selection. SeeSelection/Cell/Formula

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 18 of 141

  • Properties

    2.4.3 Defining Formulas

    UseYou can recalculate the key figures in a structure using a formula. You can include basic key figures, restricted key figures, and calculated key figures in theformula definition.

    ProcedureDefining a Formula

    1. If the query does not have a key figure structure yet, create a New Structure in the Rows or Columns of the Query Designer by highlighting the row orcolumn directory using the secondary mouse button and selecting New Structurefrom the context menu.

    2. If the structure does not yet contain any key figures, use drag a (basic) key figure from the InfoProvider to the directory of the new structure.3. Select the structure directory and choose New Formula. The New Formulaentry is inserted, and the properties for the formula are displayed in the

    Propertiesscreen area.4. Select the NewFormulaentry and choose Edit from the context menu (secondary mouse button). The Change Formula dialog box appears.

    NoteYou can also call the Change Formula dialog box from the Properties screen area by pressing the Edit pushbutton.

    You make the basic settings on the General tab page.You enter a description of the formula in the text field provided in the upper part of the screen.

    You canuse text variables in the description.You can also enter a technical name in the Technical Namefield.The formula entry field is below the text fields. The area to the bottom left contains all the operands available for defining the formula. These are:The structure elements that you have already defined for the structureThe cells that you have defined as exception cellsAll form variablesOn the right side of the screen, you see the functions that are available as operators:Basic functionsPercentage functionsData functionsMathematical functionsTrigonometric functionsBoolean operatorsAbove these two areas, the symbols for basic arithmetical operations are displayed. To the right, there is a numeric pad.To define a formula, proceed as follows:

    Choose the required operands and insert them in the Detail View field by double-clicking them or dragging them.Choose the calculation functions you want to use by either clicking the icons for the basic arithmetic operations, double-clicking the functions or draggingthem.Select the numerical values for the formula by clicking the numeric pad.

    NoteYou can also enter digits, parentheses and basic arithmetical operations using the keyboard.

    1. Define your formula using the operands and operators provided. With each step, the system checks the syntactic correctness of the formula. If the formula isincomplete or syntactically incorrect, the system underlines the error in red.The system does not check whether the formula makes sense semantically, for example, if it contains the same units. Semantic checks are performed withthe Check Query function. You call this function in theQuery Designer Toolbar.

    NoteIf you want to use a variable that is not contained in the operands while defining a formula, you first need to create the variable. Highlight the FormulaVariable entry and choose New Formula from the context menu. The Variables Wizard now appears. This guides you step-by-step through the processfor defining a new variable.If you want to change a formula variable, select the variable and choose Edit from the context menu. The Variables Editor appears.

    CautionNote that when you execute a query, the key figures are always calculated as the same unit. This means that a formula is semantically incorrect if, forexample, a currency unit (like USD) is added to a weight unit (like kg). If you want to calculate values regardless of the unit, use the Value WithoutDimension (Without Units) function . SeeData Functions.

    2. Enter a description for the formula.3. Make any necessary settings for the properties of the formula in the other tab pages. SeeSelection/Formula/Cell Properties4. Choose OK. The new formula is defined in the structure.

    Editing a Formula1. Highlight the formula in the structure and, from the context menu, chooseEdit.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 19 of 141

  • NoteYou can also call the Change Formula dialog box from the Properties screen area by pressing the Edit pushbutton.

    2. Make the required changes to the formula definition or in the properties on the corresponding tab page.3. Choose OK.

    Defining Properties for the Formula1. Select the formula in the structure. The properties dialog box is displayed in the Properties screen area.2. Make the required settings for the technical name, description, display, number format, calculations, aggregation behavior and formula collision in the

    formula. SeeSelection/Formula/Cell PropertiesDefining Inverse FormulasIf you set formulas for planning applications as input-ready (in the formula properties on the Planning tab), an inverse formula is required for every input-readyoperand in the formula. The inverse formula makes it possible to recalculate the valued entered back to the input-ready formula's operand.

    1. Select the input-ready formula and choose Create Inverse Formulas from the context menu.2. By double-clicking on an inverse formula, you can call the Change Formula screen.3. Define the rules for the recalculation.

    More information:Input-Ready Query andDefining Inverse Formulas.See also:Technical Notes about the Formula OperatorsFormula Calculation

    2.4.3.1 Percentage Functions

    UseYou use the following percentage functions as operators when you define a formula or a calculated key figure.

    FeaturesNote

    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, seeTechnical NotesAbout the Formula Operators.

    Percentage Variance (%) % This gives the percentage variance between operand 1 and operand 2. It is identical to:Formula 100 * ( - ) / abs(), if is not equal to 0 and the character for 'Division by 0' if isequal to 0.

    TipPlan Sales % Actual Sales specifies the percentage difference between the plan sales and the actual sales.

    Percentage Share (%A) %A This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * / abs(), if is not equal to0 and the character for 'Division by 0' if is equal to 0.Character for 'Division by 0': See SAP Reference IMG SAP Customizing Implementation Guide SAP NetWeaver Business Warehouse Settings for Reporting and Analysis General Settings for Reporting and Analysis Display of Numeric Values in the Business Explorer.

    TipFixed Costs %A Costsexpresses the proportion of the total cost of a product that is the fixed cost.

    Percentage Share of Result (%CT)%CT This shows how high the percentage share is, with regard to the result. The result is the outcome of aggregating the second highest results level (interimresult).If a characteristic has been drilled down in both the rows and the columns, this reference is not unique. The system displays a warning and the relevantsymbol for Data Does Not Exist. For more information, see SAP Reference IMG SAP Customizing Implementation Guide SAP NetWeaver Business Warehouse Settings for Reporting and Analysis General Settings for Reporting and Analysis Display of Numeric Values in the BusinessExplorer.

    Example Table for Operator %CT

    Year Region Sales %CT 'Sales'1999 North 30 50 South 30 50 Result for 1999 60 33.33332000 North 60 50

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 20 of 141

  • Percentage Share of Overall Result (%GT)%GT This shows how high the percentage share is with regard to the overall result. The overall result is the outcome of aggregating the highest results level.Dynamic filters (filters that were not specified in the Query Designer) also play a role in calculating the overall result.

    Example Table for Operator %GT

    Percentage Share of Query Result (%RT)%RT This is the same as %GT.Unlike the process for calculating the overall result, dynamic filters are not used in the calculation of the query result. This means that the calculation alwaysnormalizes to the same value, irrespective of the filter status and the navigational state.

    Example Table for Operator %RT

    The year 1999 is in the dynamic filter. The 100% refers to the sales (180) not visible in the table (including the year 2000) (see %GT).

    2.4.3.2 Data Functions

    UseWhen defining a formula or calculated key figure, you can use the following data functions as operators.

    FeaturesNote

    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, seeTechnical NotesAbout the Formula Operators.

    Value = 1 if operand 0, otherwise 0 (numerator)COUNT()Returns value 1 if the is 0, otherwise 0.

    Processing a value as a dateDATEThe value is seen as the number of days from 01.01.0000 and is displayed as a date.The value can be between 0 and one million, which results in a date between 01.01.0000 and 27.11.2738.

    Value = 1 if operand = 0, otherwise 0DELTA()Returns value 1 if the is 0, otherwise 0.

    CautionThis function is identical to the NOT operator and should not be used anymore.

    NDIV0 (x): Equals 0 when divided by 0, otherwise xNDIV()Is 0 if the calculation of causes a division by 0. Otherwise the result is the value of the expression. Used to avoid error messages or so thatyou can continue to calculate with a defined result.

    South 60 50 Result for 2000 120 66.6667Overall result 180 100

    Year Region Sales %GT 'Sales'1999 North 30 16.6667 South 30 16.6667 Result for 1999 60 33.33332000 North 60 33.3333 South 60 33.3333 Result for 2000 120 66.6667Overall result 180 100

    Year Region Sales %RT 'Sales'1999 North 30 16.6667 South 30 16.6667 Result for 1999 60 33.3333Overall result 60 66.6667

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 21 of 141

  • Values Without Dimensions (Without Units)NODIM()Returns purely numerical values of and suppresses units and currencies.

    TipYou can use this function to prevent the system from displaying the "mixed currency" character. See SAP Reference IMG SAP CustomizingImplementation Guide SAP NetWeaver Business Warehouse Settings for Reporting and Analysis General Settings for Reporting andAnalysis Display of Numeric Values in the Business Explorer.

    NOERR (x): Is equal to 0 for undefined calculations, otherwise xNOERR()Is 0 if the calculation of causes an arithmetical error. Otherwise the result is the value of the expression. Used to avoid error messages or sothat you can continue calculating with a defined result.

    TipNOERR(SQRT(-1)) = 0

    ResultSUMCT Returns the result of the operand to all rows or columns (more information:Percentage Functions % CT).

    Example table for operator SUMCT

    Overall resultSUMGT Returns the overall result of the operand (more information:Percentage Functions %GT).

    Example table for operator SUMGT

    Query ResultSUMRT Returns the query result of the operand (more information:Percentage Functions %RT).Unlike the process for calculating the overall result, dynamic filters are not used in the calculation of the query result. This means that the calculation alwaysnormalizes to the same value, irrespective of the filter status and the navigational state.

    Example table for operator SUMRT

    The year 1999 is in the dynamic filter. The missing sales (120) come from the year 2000 (see SUMGT).Processing a Value as a Time

    TIMEThe TIME operator takes any key figure or (partial) formula and makes a key figure of type TIME. Go to the formula editor. For the operator, double-click theProcess Value as Time data function. For the operand, double-click the key figure you want. The formula could then be TIME(Sales).The system cuts off the decimal places, interprets the value as seconds, and displays the value in format +-hh:mm:ss. -4812 is displayed as -1:20:12 forexample.Any number is seen as the number of seconds from 00:00:00 and is displayed in hours, minutes, and seconds. A key figure of type TIME with value 0 is

    Year Region Sales SUMCT "Sales"1999 North 30 60 South 30 60 Result for 1999 60 1802000 North 60 120 South 60 120 Result for 2000 120 180Overall result 180 180

    Year Region Sales SUMGT "Sales"1999 North 30 180 South 30 180 Result for 1999 60 1802000 North 60 180 South 60 180 Result for 2000 120 180Overall result 180 180

    Year Region Sales SUMRT "Sales"1999 North 30 180 South 30 180 Result for 1999 60 180Overall result 60 180

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 22 of 141

  • Any number is seen as the number of seconds from 00:00:00 and is displayed in hours, minutes, and seconds. A key figure of type TIME with value 0 isdisplayed as 00:00:00.Negative times are permitted: With a negative number, the system calculates backwards from 00:00:00.You can enter any number of hours. After 24 hours, the system does not restart again at 0.

    TipThis function is designed for offset calculations in particular. For example, if you have time key figures and want to deduct 4 hours, you can use theTIME operator.

    2.4.3.3 Boolean Operators

    UseThese are functions that you can use as operators for defining a formula or a calculated key figure.

    FeaturesRelational Operators (=) The result is 1 if the relationship denoted by between expression and holds (that is is true), otherwise the result is 0. Only numerical values of and are compared without taking units into account.

    TipExample: Costs < Sales delivers 1 if sales are greater than costs and 0 if costs are greater than or equal to sales.

    Logical AND (AND) AND The result is 1 if both and do not equal 0. Otherwise the result is 0. Only the numerical values of and are considered, without taking units into account.Logical OR (OR) OR The result is 1 if or does not equal 0. Otherwise the result is 0. Only the numerical values of and are considered, without taking units into account.Logical Exclusive OR (XOR) XOR The result is 1 if either or (but not both) does not equal 0. Otherwise the result is 0. Only the numerical values of and are considered, without taking units into account.Logical NOT (NOT)NOT The result is 1 if is 0, otherwise the result is 0. Only the numerical value of is considered without taking units into account.LEAFThe result is 0 for results rows or real (inner) nodes of a hierarchy, and the value 1 for elementary rows or the leaves of a hierarchy.This operator allows you to carry out various calculations on results rows and elementary rows.Conditional Calculations (IF-THEN-ELSE)You can make conditional calculations using Boolean operators An expression in the formIF THEN ELSE canalso be made using a formula in the form * + NOT *

    TipExample: IF Actual Costs > Plan Costs THEN Plan Costs + Plan Deviation ELSE Actual Costscan be written as the following formula:(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (NOT (Actual Costs > Plan Costs)) * Actual Costsor(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (Actual Costs

  • NoteBelow, 'N' stands for NULL value, 'D' stands for the result of a division by 0, 'X' stands for the error indicator (value does not exist), 'W' stands for any validvalue, and '*' stands for any value.

    NOERR(X) = 0, NDIV0(D) = 0, O1(N) = N and O1(X) = X for all remaining one-digit operators O1.O2(N,N) = N, O2(X,*) = X and O2(*,X) = X for all two-digit operators.O2(N,W) = O2(0,W) and O2(W,N) = O2(W,0) except for the following combinations, which return 'N' as the result:

    N * WW * NN / WN %A WN %_A WN %RT WN %GT WN %CT WN ** WN DIV WN MOD W

    For more information, see SAP Note 794006.Result for Non-Defined Mathematical OperationsIf an operation is executed that is not permitted mathematically or is not defined (for example, division by 0 or square roots of negative values), depending on theoperation, the corresponding string that you specified in Customizing is output and the calculation is terminated. In Customizing, you can specify the string forDivision by Zero and Data Does Not Exist. For more information, see SAP Reference IMG SAP Customizing Implementation Guide SAP NetWeaver Business Warehouse Settings for Reporting and Analysis General Settings for Reporting and Analysis Display of Numeric Values in the BusinessExplorer.This means that all formulas in which the incorrect formula appears are not calculated.You can suppress this behavior by compounding the expression that leads to the error with the NDIV0() or NOERR() operators (more information:Data Functions).

    CautionWhen you use these operators, check that the result can be interpreted meaningfully by the user, even in the case of errors.

    ABAP Code for Calculating OperatorsIf you are in doubt, you can check how the operators function in the ABAP code (include LRRK0F10, form LOC_RECHNEN).

    2.4.4 Defining Exception Cells

    UseWhen you define selection criteria and formulas for structural components and there are two structural components of a query, generic cell definitions are created atthe intersection of the structural components that determine the values to be presented in the cell.Cell-specific definitions allow you to define explicit formulas and selection conditions for cells as well as implicit cell definitions. This means that you can overrideimplicitly created cell values. This function allows you to design more detailed queries.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 orhelp formulas.

    PrerequisitesThe query contains two structures. You can define exception cells only for queries that have two structures. For example, you can use characteristic values in onestructure and key figures in the other. You can then define cells if these prerequisites have been met.

    NoteA cell is the intersection between two structural components. The term cell for the function Defining Exception Cells should not be confused with the term cell inMicrosoft Excel. The formulas or selection conditions that you define for a cell always take effect at the intersection between two structural components. If adrilldown characteristic has two different characteristic values, the cell definition always takes effect at the intersection between the characteristic value and thekey figure.

    ProcedureIn Query Designer, choose View Cells in the menu bar to access the cell definition functions. The Cells screen area is displayed.New selection

    1. Select a cell in the Cell screen area and choose New Selection with the secondary mouse button. The new selection that is not yet defined appears in thecell.

    2. Select the new selection and choose Edit from the context menu. The Change Selection Cells dialog box appears. Make the basic settings on the Generaltab page.

    3. Use drag and drop to define your required selection by dragging a key figure and the characteristic values by which you want to restrict the key figure to theright-hand area of the Details of the Selection dialog box. SeeDefining Selections.You can use characteristic value variables instead of fixed characteristic values.If you want to change an existing variable, select the variable and choose Edit from the context menu. The Variables Editor appears, and you can changethe settings.

    PUBLIC 2014 SAP SE or an SAP affiliate company. All rights reserved.

    Page 24 of 141

  • If you want to define a new variable, select the characteristic value and choose New Variable from the context menu. The new variable is displayed. In thecontext menu of the new variable, choose Edit. The Variables Editor appears and you can define the settings.For more information, seeDefining Variables.

    4. Enter a description for the selection.

    You can usetext variables in the description.1. Make any necessary settings for the properties of the selection on the other tab pages. SeeSelection/Cell/Formula Properties2. Choose OK. The cell contains the description of the selection. The