In the first part of our series, you learned about the concept behind external HANA Views. In the article "External HANA Views - Advantages of automatically generated HANA Views" we explained the advantages and also the limitations of HANA Views. This is the second part of our three-part series on external HANA Views. In this post, we will show you how to generate the views for the respective BW objects.
Our "External HANA Views" blog series at a glance
|
To generate an external SAP HANA view for InfoObjects, first open the InfoObject in Eclipse. Under the description of the characteristic, you will find the options "External SAP HANA View for Master Data" and "External SAP HANA View for Reporting". Select the desired option and activate the characteristic. This creates a HANA view on the SAP HANA database that corresponds to the structure of the InfoObject.
Please note that virtual master data is not supported. To be able to replicate the authorizations in SAP HANA, the authorization objects S_TABU_LIN and S_RS_IOMAD must be assigned to the users.
Then it comes to the use of hierarchies, some special features have to be taken into account. If you generate a HANA view for an InfoObject that uses hierarchies, a HANA view for hierarchies is also generated.
If the InfoObject is not used as an InfoProvider and the setting "External SAP HANA view for master data" is active, a master data view and a hierarchy view are generated. This internal hierarchy view can be used in a query view to display the characteristic values in a hierarchical structure.
If, on the other hand, the InfoObject is used as an InfoProvider and the setting "External SAP HANA view for master data" is set, a master data view and a hierarchy view are also generated for internal use. In addition, another hierarchy view is generated for reporting and analysis.
The naming convention for the internal hierarchy view is <IOBJNM>_HIERARCHY. This is a calculation view of type DIMENSION. This view can be used in other SAP HANA views to display the characteristic values in a hierarchical structure.
The hierarchy view for reporting is generated according to the following naming convention: <IOBJNM>_REPORTING_HIERARCHY. It is a calculation view of type CUBE. This view can be used independently to display the characteristic values in a hierarchical structure. The transaction data is aggregated accordingly.
You can use hieid (hierarchy ID) and keydate (key date) as input parameters for both hierarchy views. If the keydate parameter is not passed in the call, the current date is used by default.
Based on an ADSO it is also possible to create an external SAP HANA view. To do this, tick the “External SAP HANA view” option and activate the ADSO. When the DataStore object is activated, a SAP HANA view is created on the HANA database that corresponds to the structure of the ADSO.
It is also possible to create an external SAP HANA View based on an ADSO. To do so, check the "External SAP HANA View" option and activate the ADSO. When the DataStore object is activated, an SAP HANA View is created on the HANA database that corresponds to the structure of the ADSO.
The ADSO may only contain InfoObjects that are visible for reporting. InfoObjects with the setting "No master data check / No reporting" are not supported. This setting is made for each characteristic in the Details tab.
If fields are used in ADSO, they may contain a maximum of 20 characters in the name. Only the following types are supported:
The following types are supported for key figures:
INT8, DATS or TIMS key figures are not supported.
You can also generate calculation views for Composite Provider that you have created in BW Modeling Tools. To do this, check the "External SAP HANA view" option and activate the Composite Provider. When the Composite Provider is activated, a Calculation View is generated on the HANA database that corresponds to the structure of the Composite Provider. However, there are also some restrictions.
For example, data from the following InfoProviders is excluded: Open ODS Views that do not use a Calculation Scenario, Aggregation Levels, and InfoObjects that are used as InfoProviders for which the master data access is set to anything other than standard. If the Composite Provider consists only of these characteristics, that is, Open ODS Views without Calculation Scenario, aggregation levels and InfoObjects without standard master data access, the HANA View cannot be generated.
In addition, for Open ODS views with Calculation Scenario, you must ensure that the SAP database user of the BW application server has SELECT authorization with GRANT OPTION for the table or view pointing to the Open ODS view. Moreover, request handling is not supported. All requests are always read.
When it comes to authorizations, there is another peculiarity to consider. Composite Providers can also contain native SAP HANA tables or views. These can be integrated directly or via an Open ODS View. The authorizations to access these native SAP HANA objects within BW are managed in BW.
It is true that BW authorizations are replicated when the external HANA view is created. However, it does not apply to the authorizations of the native SAP HANA objects. Therefore, the same user may not be able to access the external HANA view and the data in the HANA view may not match the data displayed in BW.
To resolve this issue, you can either disable the authorization check for the affected HANA view or maintain the authorizations manually in SAP HANA.
In addition to the normal Composite Providers, you can also use local Composite Providers from workspaces to automatically generate calculation views. The same requirements apply as for normal Composite Providers.
In BW4HANA, the external HANA views are created in the Workspace Designer. To start the Workspace Designer, select the menu path Modeling → Workspace Designer under Home. You can create the workspace itself under the Configuration menu item.
Then select the previously created Composite Provider and click on Change.
In the Create Queries step, you can check the External SAP HANA view for reporting setting.
After activation, the external HANA View is created.
If you are working with BW on HANA, you can create the workspace using transaction RSWSP (Workspace Individual Processing).
To subsequently create a Local Composite Provider via Workspace Designer, use the web interface at the following URL:
https://<Web Server Host>:<Web Server Port>/sap/bc/webdynpro/sap/rsl_ui_my_workspace
The following steps correspond to those on BW4HANA, which I have already described above. However, the Webdynpro interface looks less stylish compared to Fiori.
Queries can also be used to generate SAP HANA views. This allows you to model the desired drilldown in the query and then create a HANA view.
You must observe the following prerequisites. The query must be based on an ADSO or Composite Provider. The "External SAP HANA View" setting must also be active for the ADSO or Composite Provider. In addition, the Composite Provider used must not have any ambiguous joins.
If a hierarchy is used, an SAP HANA view must also be active for the InfoObject on which the hierarchy is defined.
In addition, input-ready planning queries are not supported.
If these requirements are met, you can activate the External SAP HANA View setting in BW Modeling Tools under the General tab, in the Remote Access section. When the query is saved, a SAP HANA view corresponding to the query structure is generated on the SAP HANA database.
When generating the HANA View, the texts of the query elements are always added in the user's logon language. For key figures, the UID is used as the technical name in the HANA View if no technical name is defined in BW Modeling Tools. You can customize the technical name in BW Modeling Tools under Properties → General → Technical Name.
If you use global elements such as filters and structures in your query, you need to consider the following. When the query is modified in BW Modeling Tools, the associated HANA View is automatically updated. However, this does not apply to global elements such as global filters or global structures. If you change these, the HANA View of the query is not automatically adjusted. This happens only after you save the query again.
Furthermore, the results of the HANA Calculation View may differ from the results of the query on the BW application server. This is because the Calculation View cannot perform calculations such as zero suppression.
For example, a HANA View can still be generated if the query contains certain BW functions. However, these are ignored by the HANA View. This applies, for example, to conditions, exceptions, display options such as number of decimal places, hidden key figures, and zero suppression. A complete list can be found in the SAP help.
If the query contains constant selections, cell definitions or exception aggregations, HANA View cannot be generated. In this case, the setting is grayed out.
As you can see, it is very easy to create external SAP HANA views. When setting up, you only have to take into account the special features of the underlying objects. Now that we have explained them in detail, we will show you in the next article where in the system the generated HANA views are stored.
Do you have questions about HANA Views? Are you trying to build up the necessary know-how in your department or do you need support with a specific question? We will be happy to help you. Request a non-binding consulting offer today.