To analyze a dataset in SAP BW/4HANA, you define queries on top of InfoProviders. By selecting and combining InfoObjects such as characteristics and key figures, or reusable query elements such as restricted and calculated key figures in a query, you define how you want to evaluate the data that comes from the selected InfoProvider.
Note
Although it is possible to build BW Queries directly on top of all types of InfoProviders such as DataStore Object (advanced) and Open ODS Views, it is best practice to build a CompositeProvider on top of, for example, a DataStore Object (advanced) as part provider and then build the query on top of the CompositeProvider.
This is because the InfoProvider on which the query is built cannot be replaced later with another, but it is possible to replace the part providers of the CompositeProvider. So better create the fixed assignment between the query and the CompositeProvider.
A CompositeProvider is a very powerful modeling object. The strength of a CompositeProvider is in preparing data sets for consumption by queries. By comparison, the strength of a DataStore Object (advanced) is in its handling of complex data loading scenarios.
The key parts of a query definition are navigation and filters:
For navigation, you choose a default layout assignment for each characteristic and key figure that has been selected from the InfoProvider. This means that you assign each characteristic and key figure to either the rows or columns section of the layout. Characteristics can also be left unassigned which means they belong to the free characteristic section. Those characteristics can moved to the rows or column by the business user when the query is executed and the results appear. The assignment to the rows and columns section for each characteristic and key figure determines the initial view for the query. The business user is able to change these assignments from the query results. Remember, they are only defaults when defined in the query.
The filter selection apply to the entire query. When defining the filter, you select values from one or more characteristics to restrict the data. You can also define one key figure as a filter. If you do this, the query can only have characteristics in the rows and columns and not key figures. All the InfoProvider data is aggregated using the filter selection for the query.
You can parameterize queries by using variables for characteristic values, hierarchies, hierarchy nodes, formulas, and texts, or by defining new variables where necessary.
To make the selection of InfoObjects more precise, you can do the following:
Restrict characteristics to characteristic values or hierarchy nodes
Define selections
Define formulas
Define exception cells and help cells
Use local structures
Define conditions
Define exceptions
Define calculated and restricted key figures as reusable query components
The queries are built in the SAP BW Query Designer, which is a part of the SAP BW Modeling Tools in SAP HANA Studio.
The SAP BW Modeling Tools provide an Eclipse-based integrated modeling environment for the management and maintenance of SAP BW/4HANA metadata objects.
The main objective of the tool is to support SAP BW/4HANA metadata modelers in today’s increasingly complex BI environments by offering flexible, efficient modeling tools. These tools integrate with ABAP Development Tools as well as with SAP HANA modeling tools and the consumption of SAP HANA elements in SAP BW/4HANA metadata objects, such as Open ODS views or CompositeProviders. The SAP BW Modeling Tools have powerful UI capabilities.