SAP BEx Query Designer Tutorial

โšก Smart Summary

BEx Query Designer in SAP BW is the standalone tool that builds queries on InfoProviders, defining characteristics, key figures, filters, and variables that shape how reports retrieve and present business data for analysis in the Business Explorer suite.

  • ๐Ÿ“Š Business Explorer: BEx is the SAP BW suite for query, reporting, and analysis of warehouse data.
  • ๐ŸŒ‰ Query Designer Bridge: Query Designer links InfoProviders to front-end reporting tools such as SAP BW and BO.
  • ๐Ÿ”ข Key Figures: Key figures hold KPIs and split into calculated (CKF) and restricted (RKF) key figures.
  • ๐Ÿท๏ธ Characteristics: Characteristics classify data by dimensions such as material, period, or location.
  • ๐ŸŽ›๏ธ Filters and Variables: Filters restrict data, and reusable variables prompt for values at query runtime.
  • ๐Ÿค– AI Assistance: SAP Analytics Cloud and Joule add natural-language queries and augmented insights to BW.

SAP BEx Query Designer Tutorial

What is SAP BEx Query Designer?

The Business Explorer (BEx) is a component of SAP BI that provides flexible reporting and analysis tools for strategic analysis and decision-making in an organization. These tools include query, reporting, and analysis functions. SAP NetWeaver 7.0 provides the following BEx tools:

  • BEx Query Designer
  • BEx Web Application Designer
  • BEx Broadcaster
  • BEx Analyzer

SAP BEx Query Designer

The BEx tool can display past and present data at different levels of detail and from different perspectives. It can create planning projections using BI Integrated Planning, and BEx Information Broadcasting can distribute business intelligence content by e-mail, either as pre-calculated documents with historical data or as links with live data.

Query Designer: As the name suggests, it is used to define queries that retrieve data from SAP BW. Query Designer acts as the bridge between SAP BW InfoProviders and the reporting front-end tools (SAP BW / SAP BO). It limits the field list displayed based on requirements and defines the default placement of report objects. It also lets users define filters, selection screen variables (prompts), calculations, and unit conversions that are not available in InfoProviders.

Accessing Query Designer

To access the BEx Query Designer, follow the steps below:

Step 1)

  1. Navigate to Start -> All Programs.
  2. Under the folder “Business Explorer”, the “Query Designer” is available. Click on “Query Designer”.

SAP BEx Query Designer

Step 2)

  1. Select the required BW system.
  2. Click the OK button.

SAP BEx Query Designer

  1. Enter the Client.
  2. User Name.
  3. Password.
  4. Logon Language.
  5. Click the OK button.

SAP BEx Query Designer

Query Panel

  1. InfoProvider details are available here.
  2. Tabs to view various report components.
  3. Properties box, which shows the properties of each component selected in the query.
  4. System Messages, such as any error or warning messages during the query check, are displayed here.
  5. Shows the Where-Used list of any component selected within the query.

SAP Query Panel

Query Panel – Standard Toolbar

The Standard toolbar in the Query Designer has the following buttons.

  1. Create New Query
  2. Open Query
  3. Save Query
  4. Save All
  5. Publish on Web
  6. Check Query
  7. Query Properties
  8. Cut
  9. Copy
  10. Paste
  11. Toggle tabs for Filter and Rows/Columns
  12. Cells
  13. Conditions
  14. Exceptions
  15. Properties
  16. Tasks
  17. Messages
  18. Where Used
  19. Documents
  20. Technical names

SAP Query Panel Standard Toolbar

Query Elements

  1. Key Figures: Key Figures represent the numerical data or KPIs (Key Performance Indicators). They are further divided into Calculated Key Figures (CKF) and Restricted Key Figures (RKF).
  2. Characteristics: A characteristic provides the criteria according to which objects are classified, for example Material, Period, or Location.
  3. Navigational attributes appear as characteristics in the Query Designer.

SAP Query Elements

Other Query Elements

  1. Dimensions: Similar characteristics are grouped together in a dimension. For example, the Time dimension consists of Year, Month, Week, and so on.
  2. Attributes: Attributes define the additional properties of a characteristic. For example, Material may have size, length, or width. A display attribute cannot be added to a query unless the related characteristic is also added, but you can set the characteristic property to “No Display”.

SAP Other Query Elements

Query Properties

  1. Select the “Variable Sequence” tab. It controls the order in which selection screen variables are displayed to users.
  2. List the variables used in the query. Multiple variables can be present and sequenced as needed.

SAP Query Properties

  1. Select the “Display” tab.
  2. The “Hide Repeated Key Values” check box controls whether the characteristic repeats in each row.
  3. The “Display Scaling Factors for Key Figures” option controls whether the scaling factor is reported at the top of the corresponding column.

SAP Query Properties

  1. Select the “Advanced” tab. It is most important from a BO perspective, as it controls whether the query is visible to BO. The option must be checked to allow query access to BO.
  2. The “Allow External Access to this Query” check box should be checked if this query is to be used from BO.

SAP Query Properties

  1. Select the “Rows/Columns” tab.
  2. The options under “Result position” decide the location of the sub-total (results in BW) as below/above or right/left of the characteristics.
  3. The options under “Suppress Zeros” decide the application of zero-suppression on the query.

SAP Query Properties

Filters

Filters restrict the data retrieved by a query. Filters can be dynamic or static. Static filter values cannot be overwritten by users at runtime, while dynamic filters or variables can be overwritten by the user or system during query execution.

Steps to apply filters in the query:

  1. Select the “Filter” tab.
  2. Filters can be applied in the “Characteristic Restrictions” section.
  3. Filters can be applied in the “Default values” section.

SAP Filters

Characteristic Restrictions are applied before the data-fetch operation, while default values result in the entire data being fetched and the restriction applied only in the report front end. If “Clear all filters” is applied in WAD / Analyzer, the filters in Default Values are erased from the front end, but the filters applied via Characteristic Restriction still remain in force. It is recommended to have at least one or two characteristic restrictions when using a BW query for a BO Universe.

Variables

Variables are query parameters that you define in the Query Designer and that are filled with values only when you execute the query. Variables are reusable objects. The variables defined in the Query Designer are available in all InfoProviders. They do not depend on the InfoProvider, but rather on the InfoObject for which they were created.

Types of Variables:

  • Characteristic values
  • Hierarchies
  • Hierarchy Nodes
  • Texts
  • Formula elements

Steps to create a variable:

Step 1)

  1. To create a variable, browse to the folder “Characteristic Value Variables” under the corresponding characteristic.
  2. Right click on the folder and select “New Variable”.

SAP Variables

Step 2)

  1. In the subsequent window, enter the Description.
  2. Enter the Technical name.
  3. Variable Processing Types.
  4. Under reference characteristic, the variable can be assigned to either a specific InfoObject or all InfoObjects based on the same reference characteristic.

SAP Variables

  1. Under the “Details” tab, specify whether the variable accepts:
  2. Single Value / Multiple Values / Range.
  3. Selection Option (allows any of the above at runtime; not supported in BW-BO).

SAP Variables

Step 3)

  1. Click the “Default values” tab.
  2. Specify the default filter applied to the report. This value can be overwritten by the user at runtime.

SAP Variables

Conditions & Exceptions

Conditions act as filters on key figures, for example the top 10 customers or products with the bottom 10% margin.

Exceptions are similar to “conditional highlighting” in MS Excel. They highlight rows, columns, or cells where the KPI value is above or below a certain threshold. As these are not imported to a BO Universe, they are not discussed in detail in this article.

FAQs

A calculated key figure (CKF) applies a formula to existing key figures, such as revenue minus cost. A restricted key figure (RKF) filters a single key figure by a characteristic value, such as year-to-date sales. Both are reusable across queries.

A filter restricts query data to fixed values at design time. A variable is a placeholder that prompts for values at runtime, so the same query can be reused with different selections without being redesigned.

In SAP BW/4HANA, queries are built in the Eclipse-based BW Modeling Tools, and reporting shifts to SAP Analytics Cloud and the Analysis Office add-in. The classic BEx Query Designer remains available in older BW 7.x systems.

AI in SAP Analytics Cloud adds augmented analytics: Smart Insights explains figures, Smart Discovery finds drivers, and the Just Ask feature answers natural-language questions, helping users explore BW query results without building reports manually.

Increasingly, yes. Machine learning and the SAP Joule AI copilot can suggest key figures, propose calculated and restricted key figures, and recommend query structures, helping report designers build and optimize BW queries faster.

Summarize this post with: