Technical Articles
External HANA view configuration in BW on HANA
- Overview
SAP Introduced new functionality after BW 7.4 on HANA where we can generate HANA view directly from BW application during BW object activation, The external HANA view enables to create scenarios where data, which is modeled in the BW system, are merged with data modeled in SAP HANA with SAP HANA tools.
This document will provide you an overview of external HANA view configuration from the SAP BASIS point of view.
.
DISCLAIMER
The content of this blog post is provided “AS IS”. This information could contain technical inaccuracies, typographical errors, and out-of-date information. This document may be updated or changed without notice at any time. Use of the information is therefore at your own risk. In no event shall SAP be liable for special, indirect, incidental, or consequential damages resulting from or related to the use of this document.
Purpose
This document tried to include all Basis steps for BW on HANA external HANA view configuration.
From BW 7.50 it is possible to generate Calculation Views for all objects if you execute the steps available (SAP note 2236064)
According to this note, it is necessary to add an entry into table RS2HANA_VIEW_SET.
External HANA View setup in BW on HANA Steps: –
- Take all system backup
- User sync and setup HANA user creation along with ABAP user
- External HANA view related TRANSACTION
- Global Role for HANA external HANA view
- Parameter setup for external HANA view setup
- Generate external HANA view with ODSO and ADSO
- Sync new HANA user role from BW application
- Check external HANA view at DB level
Take all system backup: –
As we are adding a new configuration as such no impact on the system, but as per preventive measure take full DB backup.
User sync and setup HANA user creation along with ABAP user
Maintain SM 30 USR_DBMS_SYSTEM Table/View value for enable DBMS tab in su01.
Provide DB connection name which needs to update in DBCO and provide productive client number.
It will enable the DBMS tab in su01 and you will able to created DB user from the ABAP system.
TRANSACTION:-
In terms of SAP HANA external view configuration and check we must know about the below TCODEs.
1) RS2HANA_ADMIN: – Through this tcode we can perform all administration tasks and check all external HANA view configurations, even we can navigate all external HANA view transactions from this tcode.
2) RS2HANA_VIEW: – All external HANA view settings we can update by this tcode, we can say it’s a pre-requisite to set up all parameters here before stating External HANA view generation.
3) RS2HANA_CHECK: If we can face any issues during the generation of the external BW HANA view This tcode provides you with overall status.
4) RS2HANA_GEN: Sync all external HANA view role to HANA DB user.
Global Role for HANA external HANA view
bw2hana/<ABAP_Schema>_SAP_BW_MODEL_GENERATION is a master role and needs to create in every environment, Without this role on one can able to generate an external HANA view from the BW system, This role should be assigned to the HANA level.
To be able to access SAP HANA views that have been generated from the BW system, you need the following authorizations:
- Object privilege: SELECT on _SYS_BI
- Object privilege: EXECUTE on REPOSITORY_REST(SYS)
- Package privilege: REPO.READ on the content package where generated SAP HANA views are stored.
Parameter setup for external HANA view setup
Before you start to generate “external BW HANA view” it is necessary to think about some general settings e.g. which package should be used,
With 7.5 and support package 4 or higher you have the following options in transaction RS2HANA_VIEW.
SAP HANA Package :- system-local.bw.bw2hana (Check entry in RS2HANA_VIEW_SET table)
Assignment Type:- SAP providing 3 assignment types and based on your selection external Hana view roles will be created at the HANA DB level.
HANA Package is ‘system-local.bw.bw2hana’ and can be checked in table RS2HANA_VIEW_SET or RS2HANA_VIEW.
Changing an existing package is only possible if the HANA package is empty.
Multiple BW System on one HANA
If multiple BW systems share on HANA instance, it is mandatory to set a different package in each system.
Generate external HANA view with ODSO and ADSO
This step purely for the functional team, they can follow the below link and enable external HANA view from RSA1.
https://blogs.sap.com/2016/04/05/how-to-consume-sap-bw-objects-in-hana-studio/
Sync new HANA user role from BW application
RS2HANA_GEN:- You can sync all ABAP users with external HANA views authorizations at the DB level.
Provide BW object name and BW user name, Even you can select multiple users for one object or multiple objects.
It will assign the required role to HANA users and if required generate analytical privileges as per requirement.
Mass Generation of Authorizations
If you want to create an identical SAP HANA user for multiple BW users, you can use report RSUSR_DBMS_USERS for mass synchronization. For more information.
Check external HANA view at DB level
All BW external HANA views will be created under the system-local package as we placed the parameter under RS2HANA_VIEW TCODE.
Reference SAP Notes :-
2695442 – External Hana View: Activation of BW Object fails with error ‘Replication failed
2252122 – Technical Customizing of HANA View Generation (RS2HANA_VIEW_SET)
1956963 – Creating roles from BW in SAP HANA not possible
1927767 – Mass DBMS User Management
Advantages:-
I hope this document will help you with the external HANA view setup.
Cheers!
Anikesh Jyotishi
HI, thanks for the write-up. Great work! I have managed to cmplete all the settings, but I have a particular scenario which I've not been able to resolve. Though it may semm redundant, we have created o Composite Provider built directly on top of a HANA Calulation View. Now we have created BW queries on this InfoProviders a released them as External HANA Views. We are able to run the queries for a given user from BW, but when trying to consume the HANA Voew for the Query we gett missing authorization errors on the HANA side.
Whene generating authorizations in transaction RS2HANA_ADMIN we see the following error message:
External SAP HANA view: incorrect data due to authorizations possible
Message no. RS2HANA_VIEW163
Diagnosis
The CompositeProvider has a SAP HANA view or Open ODS view as PartProvider.
The CompositeProvider has a CompositeProvider as PartProvider where the previous statement applies.
Procedure
Make sure that the SAP HANA users have all the required privileges for the SAP HANA objects used as PartProviders in the CompositeProvider.
For more information, see SAP Note 2295891.
We have chechd this note and tried to add missing authorizations for the underlying HANA view directly in HANA, but we still have the same error. Any idea what may be missing?
Regards,
R
Hello Rodolfo,
Even you can use RS2HANA_GEN tcode for replicating or update missing HANA DB authorization from the SAP BW application level for all BW external Hana view objects or a specific objects.
Hope this will solve your issue.
Thanks,
Anikesh
Hi Anikesh,
Thanks for your help. We finally managed to solve it by granting select authorization on the schema which has the tables our HANA views are based on. Though this cannot be integrated into a BW Role, it is manageable through transaction SU01 on the DBMS Tab.
Regards,
Rodolfo
Hi Anikesh,
Thanks for the detailed blog, it's really helpful.
We have an external Hana view on top of a composite provider. We observed that upon transport of the composite provider, the external Hana view is not transported. We can' find the view in RS2HANA_ADMIN. Also if I try to capture the view in the tcode SCTS_HTA, the package where generated view is stored i.e." system-local.bw.hana" is not showing any contents at all. So I can't transport generated view separately.
Could you confirm if we are missing any step? Or how do we ensure that the external Hana view gets transported to next env?
Thanks,
Amit
Hello Amit,
You have setup an external Hana view in every system and schema user should have system-local.bw.hana package access.
This is related to SCTS_HTA hana DB tr creation, Object should be included in TR and user should have SAP HANA Repository Package.
Thanks,
Anikesh
Hi Anikesh,
We can enable to create External Hana View for any Composite provider. We have number of Bex queries built on top of those Composite providers including Restricted and Calculated key figures, which does not allow to create an External Hana View for them. Generally, the goal is to enable any Bex Query as a virtual table in Hana Database. This works for Composite providers, but as stated above we struggle with Bex queries including any sort of calculated measures. Is there some solution for that please?
Thanks
Karel
Hi Anikesh,
we have generated HANA view for CompositProvider. I can also see in HANA Studio in directory bw2hana/Calculation View my new view. If I do a Data Preview for the data I get the error message "Error: SAP DBTech JDBC: [258]: insufficient privilege".
What privileges do I need in the HANA DB to see the data?
Thanks
Stephan
Hello Leibiger,
Make sure your application and DB user name is the same, Auto-generated analytical role should be assigned to the user, If you don't have the privilege run RS2HANA_GEN Tcode for replicating or update missing HANA DB authorization from your user. Even you can assign privilege from HANA DB level and check.
Cheers,
Anikesh
Dear Anikesh,
my SAP user and DB user are different. This is a requirement of the service provider.
Therefore, I cannot assign the roles to myself. How can I proceed now? Which authorisations do I have to assign on the HANA DB?
Thanks
Stephan
Hello Stephan,
In this case, you have to assign all privileges at the HANA DB level.
Thanks,
Anikesh