Not WREX_GET_DATA! : Read BW-BEx query data across other SAP systems via Secondary DB connection
Scenario : To read BW-BEx query report output into R/3(any other SAP system)
Conventionally, it is being achieved by reading BW query via function module such as WREX_GET_DATA in R/3 or any other SAP system. The performance with this approach on data read is slightly on slower side and cannot handle greater volumes of data. In this blog I will describe accessing BEx report output into other SAP system via HANA as secondary connection.
From NW740 SP9 BW on HANA, BEx queries can be consumed as external HANA view, in other words you can generate calculation views for queries in the SAP HANA database. Below are the prerequisites for generating HANA view on BEx query.
Preconditions for generating HANA view:
- The InfoProviders that the query is defined on must be of type InfoCube, DataStore object (classic or advanced) or Composite Provider.
- The External SAP HANA View flag must be set for the InfoProvider on which the query is defined.
- The query can only comprise elements that are supported. More information: Supported BW Functions, Ignored BW Functions, Unsupported BW Functions
- This query is not input-ready.
Precondition for using HANA as secondary connection:
- Creation of DB connection : DB connection corresponding to BW system for R/3 system, that login to BW to read HANA view(ECC –> BW)
- DB user should have sufficient privileges, such as object privilege SELECT for schema _SYS_BIC
R&A – (BW Side) :
- After BW query view is generated, run RS2HANA_GEN tcode to replicate BW Analysis Authorization to SAP HANA
- Maintain a table entry in table RS2HANA_AUTH_STR.
INFOPROVIDER : Infoprovider on which the query is built
TLOGO : Object Type of Infoprovider
HANAMODELFL : X (External SAP HANA view for reporting)
USERNAME : BW User ALE(refer RSADMIN)
DBMSUSER : DB user that login to BW to read HANA view(ECC –> BW)
Execution in ECC(consuming SAP system) :
After generation of HANA view and DB connection setup, a program can call BW HANA view from R/3 in following possible ways:
Connection Via Open SQL
Connection Via Native SQL
Connection Via Native SQL – ADBC
Read more at : ABAP/HANA Connectivity via Secondary Database Connection