In BW4HANA, T-code RSO2 can be used only to view the generic data sources. You cannot create or expose them to other systems as it was done earlier. Listed below are the alternate options that are available in BW4HANA.
- ABAP CDS (Logics can be incorporated)
- HANA Calculation Views (potentially on top of External Views of InfoProviders)
- BADI Provider as ODP-BW Provider
ABAP CDS Views
ABAP Core Data Services (CDS) allows the creation of complex views that exceed the capabilities of database views created in SE11.
Creating ABAP CDS views
ABAP CDS views can be created in eclipse using the SAP HANA Development perspective.
In the Project Explorer tab right-click on respective location and select New -> Other ABAP Repository Object
It will open a pop-up dialogue with the list of available objects. Select the Data Definition option under Core data services to create the view.
Specify the name and package for the view. Click on a finish to create the CDS structure.
You will get the coding window as shown below. Specify the SQL view name of the structure that we are going to create and select the source using quick help(Ctrl+Space) option in the respective places.
Write down the required structure logic inside the curly braces in the highlighted area.
Create a Datasource on top of this view.
SAP HANA Calculation view is a powerful information view that can be created by consuming multiple tables and we can perform complex calculations. You can create a calculation view on top of database tables and info providers.
Creating Calculation views
To create a calculation view on top of the info providers, ‘External SAP HANA View’ property should be enabled as shown below.
Calculation views can be created in the SAP HANA Modeler Perspective
Right-click on schema where you want to create the view and select New -> Calculation view. Drag and drop the projection node and you will find the objects that you had enabled for accessing through external views.
You can perform any calculations that are needed or join with other tables and use them as the data source.
BADI provider is an enhancement created by means of ABAP implementation. It is based on InfoObjects. Fields from HANA views are not supported.
Creating a BADI Provider
Run the T-code SE19 to open the BADI builder. Select New BAdI and specify the enhancement spot as RSO_BADI_PROVIDER and click create. It opens a pop-up window as shown below. Provide the name and text for the BAdl and click on the creation of enhancement.
Once the enhancement implementation is created, you will be asked to select a package and create the implementation class in the BADI as shown below.
Specify the class name which needs to be created in the BAdl.
Once you have saved it, the enhancement implementation will be created as shown below in which we can write an ABAP program based on the required structure of the Datasource.
You can use above mentioned three methods to create a generic Datasource from the Info Providers.
Know more about Visual BI Solutions SAP BW Services offerings here.