Generate External SAP HANA Calculation Views
In SAP BW/4HANA, you can automatically generate SAP HANA Calculation Views for the following SAP BW/4HANA objects:
- DataStore Object (advanced)
- CompositeProvider
- InfoObject Characteristic
- BW Query
- Local CompositeProvider of BW Workspace

A generated calculation view exposes the SAP BW/4HANA model to SAP HANA's modeling environment.
Here are some use cases:
Consume SAP BW/4HANA data with native SQL front ends or clients not able to consume BW Queries
Consume SAP BW/4HANA data completely independent of the services and governance of SAP BW/4HANA application
Consume SAP BW/4HANA data and manage access with native SAP HANA concepts (SAP HANA privileges, lifecycle management and so on
Leverage SAP HANA calculations or transformation functions that are more powerful and/or easier to implement in native SAP HANA compared to SAP BW/4HANA
The automatic generation of SAP HANA calculation views occurs during the activation of the SAP BW/4HANA object, if the setting in the property External SAP HANA Views is enabled.
The generated calculation views point directly to the same data and tables of the corresponding SAP BW/4HANA object. These tables are located in the BW-managed SAP HANA schema.
Direct consumption of SAP BW/4HANA-owned tables by SAP HANA calculation views is not supported. For more information, check SAP note 1682131: SAP BW tables in SAP HANA Information Views and ABAP CDS Views not supported
It is important to note that the generated calculation views are based on XS classic. There is no HDI calculation view generation available (see SAP note 2463312).
Although it might seem neater to have a single environment for HANA calculation views, there is no significant benefit for SAP BW/4HANA to have its calculation views generated in XSA and XSC is sufficient. Please remember, you should never directly adjust the generated calculation views in SAP HANA as they are generated from SAP BW/4HANA. You could use SAP HANA Studio to display the generated calculation views. Also, with some configuration, you can access the generated calculation views in your XSA modeling projects. For example, a calculation view in XSA can consume any calculation view in XS Classic, regardless of whether it is generated or manually created.
Later in this lesson you learn about the prerequisites to use SAP HANA classic calculation views in XSA modeling scenarios.

The generated SAP HANA calculation views are managed in a predefined SAP HANA Content Package. These calculation views are transported with the corresponding InfoProviders and they are generated in the SAP HANA database of the target SAP BW/4HANA-system based on the "External SAP HANA View" setting in the modeling properties.
Do not change generated SAP HANA views manually because the external SAP HANA Calculation Views may be overwritten at any time by the system. This means that any manual changes would be lost. You can, however, create customer SAP HANA calculation views, which consume these objects to define stable customer logic.
Also take into consideration, that it is not supported to use the generated external SAP HANA Views directly inside the SAP BW/4HANA CompositeProvider. Instead, you must use the original SAP BW/4HANA object as a PartProvider (refer to SAP note 2458572).
Restrictions of External SAP HANA Views
Not all SAP BW/4HANA InfoProvider properties can be added to the generated SAP HANA Calculation Views. The following properties are not supported:
- ALPHA conversion and date conversion
- Display attributes
- Noncumulative key figures are only supported in the SAP HANA view for queries
- Key figures, for which the aggregation is set to No Aggregation
- Key figures of data type date or time related to aggregation SUM
- For information on restrictions regarding data on Cold storage, see SAP note 2032797.
- Additional restrictions for InfoObjects are as follows:
- It must be a characteristic with master data and texts.
- The master data access must be standard or SAP HANA View.
- The Attribute only checkbox has not been selected.
- The InfoObject must not have any navigation attributes that are authorization-relevant and whose master data access is not standard.
- Compound characteristics are added as simple InfoObjects; the compounding property is lost, and there are no concatenated values.
- The key date for time-dependent attributes and texts is specified using the input parameter keydate of the SAP HANA view. If this parameter is not explicitly supplied with data when the access occurs, the current day is used. The format of the parameter is YYYYMMDD, which corresponds to ABAP type DATS.
SAP HANA View Generation for SAP BW Queries
Queries are compiled by the analytic manager into an optimized execution plan. This means that most parts are executed in SAP HANA, and only a small part in the SAP BW application server. In many cases, the result set is complex and multidimensional.
In some cases, however, the query result is displayed as a flat view and can be fully calculated in SAP HANA. For these queries, an SAP HANA Calculation View can be generated from SAP BW. This view can be used with SAP HANA native interfaces such as SQL.
An SAP HANA Calculation View, which has been created from its SAP BW query, cannot be compared to other query interfaces such as BICS. This is because the SAP HANA Calculation View cannot perform any calculations such as hierarchies, zero suppression, or local calculations, which are normally performed on the SAP BW application server. Therefore, there is no guarantee that the result of the SAP HANA Calculation View will be exactly the same as the result of the query executed on the SAP BW/4HANA application server. Here, the restrictions of the SAP HANA view of the InfoProvider, which the query is based on, also apply to the query. If you change the query in the SAP BW modeling tools, the associated SAP HANA view is automatically updated. However, the global elements are not updated. If global elements are changed, these elements are only changed in the query, once the query is activated again. The associated SAP HANA view is also updated.
There are additional restrictions for generating external SAP HANA Calculation Views for queries. The following query features are ignored, but the external HANA View can still be generated (but without these features):
- Hierarchy display settings
- Default values for characteristics
- Structures
- Conditions
- Exceptions
- Local calculations
- Display options (for example, the number of decimal places)
- Zero suppression
- Additional query properties (cache mode, read mode, near-line storage mode)
- Hidden key figures
- Display attributes
- Stable data during navigation
- Structures
For noncumulative key figures, see SAP note 2032830.
The following functions are not supported and impede the generation of external SAP HANA calculation views from queries:
- Constant selection
- Definitions on a cell
- Exception aggregation
Launch the next demo to explore the generation of an external SAP HANA calculation view for an InfoObject: