Introducing Queries

Objective

After completing this lesson, you will be able to identify Queries.

Queries

Scenario

Diagram shows SAP BW/4HANA architecture: Query, CompositeProvider, Characteristic, DataStore Objects, Transactions, Attributes, Texts, Master Data, Facts; connected to HANA and S/4HANA data sources, ODP layer.

A CompositeProvider has been defined. In the next step in our scenario, we define a Query on the CompositeProvider.

Screenshot shows a spreadsheet table with product IDs, categories, and metrics; right panel shows an Analysis pane with data sources, measures, and a hierarchy structure.

Finally, we consume the Query in SAP Analysis for Microsoft Office to analyze the results. An SAP Analysis for Microsoft Office workbook can be used to represent the results from one or more Queries. It offers the possibility to analyze the data such as changing the layout (row, columns), adding filters, sorting data, and creating additional calculations.

InfoProviders

Two panel diagram showing query definition: left panel defines the query and prompts selecting an InfoProvider; right panel lists InfoProviders by persistence type with highlights.

A Query always needs to be defined on an InfoProvider.

What are InfoProviders?

Comparison of InfoProvider configurations: with persistence vs without. Left column lists Master data-bearing characteristic and DataStore Object (advanced); column shows Open ODS View and CompositeProvider.
  • An InfoProvider is an object for which Queries can be created and run.

  • InfoProviders can store persistent data, or they just virtually collect data from other InfoProviders.

The definition correctly infers that an InfoProvider can be either physical storage of data in real database tables, or a virtual collection of data (such as a view) that only collects data temporarily to feed it to a Query, but does not permanently store it.

During the course, we have already covered many SAP BW/4HANA objects, which can be used as InfoProvider for Queries.

In a previous unit, data flows were described to load master data for master data bearing InfoObjects. If you set the property Usable as InfoProvider in the InfoObject definition, you can use these InfoObjects as InfoProviders. This gives you the possibility to create a Query on them for master data reports.

In a previous unit, we focused on the DataStore Object (advanced), which is primarily used to store transactional data and we have also explained the Open ODS View, which offers a view on source data, without the need to create InfoObjects and loading data upfront.

And in this unit, we have just explained the CompositeProvider, which is the object in SAP BW/4HANA representing the virtualization layer. Creating a Query on top of a CompositeProvider offers advantages (flexibility, maintenance, navigational attributes) compared to the creation of the Query on top of a DataStore Object (advanced).

Queries

Screenshot shows an EPM query builder with left filters and right definition, displaying fixed value filters, key figures, rows, free characteristics, and various filter panels.

You define a Query in order to generate a result set from SAP BW/4HANA.

In the definition of a Query you can choose which data should be available from the InfoProvider by selecting the InfoObjects and optionally applying filters to them.

You also define the initial layout of the report (rows, columns, totals).

In a Query you can also define additional calculations, for example the number of different products sold to business partners. Queries use the Analytic Engine offered in SAP BW/4HANA to process these kind of calculations.

Note

If you want to learn more details about Queries, the course BW405 has a primary focus on the possibilities with Queries and the use of the Analytic Engine.
Diagram of SAP BW/4HANA architecture: data sources feed DataStore and CompositeProvider; virtualization and no-persistence layers; plus a sample report table with customer, attributes, discount, revenue.

In SAP BW/4HANA, master data is stored in separate tables. However, when a Query is run, the Analytic Engine in SAP BW/4HANA automatically enriches transactional data with master data. On the picture above, the transactional data, revenue per customer, is enriched with the name of the customer (text) and two attributes (country and discount).

Diagram of SAP Analytics architecture: third-party data sources connect to SAP BusinessObjects BI components and SAP Analytics Cloud, with BW/4HANA queries supporting analytics and insights.

A Query is the final layer in the data flow and can be consumed by different tools, either by SAP Analytics or non-SAP solutions (via oData, SQL, or MDX).

SAP Analytics offers:

  • SAP Business Objects BI:

    • SAP BusinessObjects Web Intelligence: allows business users to easily analyze and visualize data in order to make informed decisions based on up-to-date information

    • SAP Crystal Reports: easy to consume, highly formatted pixel perfect reports

    • SAP Lumira Designer: for professional analysis application designers to create corporate analysis applications and reports based on multiple data sources

    • SAP Analysis for Microsoft Office: designed for analysts who require analytical capabilities in Microsoft Excel.

  • SAP Analytics Cloud: SAP’s strategic analytics and planning offering, allowing customers to analyze their data in context and to make better and faster decisions.

    Note

    You can review the main features and scenarios of SAP Analytics Cloud here: SAP Analytics Cloud | Features and Capabilities

Video: Creating a Query on a CompositeProvider

Watch the following video to learn how to create a Query on a CompositeProvider.