Blogs / SAP / SAP Data Warehouse Cloud / SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Jan 24, 2020

SHARE

SAP Data Warehouse Cloud is an enterprise-class Data Warehousing solution on Cloud by SAP. Powered by SAP HANA Cloud services, it integrates heterogeneous data from multiple sources and enables you to do advanced analytics using SAP Analytics Cloud.

This tool provides you with the flexibility to connect to both cloud and on-premise systems. You can also bring in data via third party ETL tools to SAP Datawarehouse Cloud. Currently, it supports SAP ABAP, SAP HANA, and OData connections. The scope of this blog is limited to connecting ABAP CDS views that are exposed as OData Service and Data modeling using the exposed objects via Data Builder capabilities of SAP Data Warehouse Cloud. To know more about ABAP CDS please refer to this blog.

OData

OData (Open Data Protocol) is a standard that helps in the creation and consumption of RESTful APIs. Data Objects from both SAP and non-SAP systems can be exposed to other systems using the OData Protocol.

The simplest way of exposing a CDS view from an S4H system as OData Service is by using the annotation @OData.publish: true in the definition of the CDS. The following types of CDS views can be exposed using OData Protocol and consumed in SAP Data Warehouse Cloud.

View TypesImplementation
Basic View@VDM.ViewType: #BASIC
Composite View@VDM.ViewType: #COMPOSITE
Consumption View@VDM.ViewType: #CONSUMPTION
With Table FunctionAMDP Table function is created that returns some value implementing any of the defined methods.
With JoinA Simple Join is created
With AssociationThe associated object stands as a separate Entity in the exposed OData service.

The OData URL exposed from the CDS view will have the following syntax – https://<ServerName>:<PortNo>/sap/opu/odata/sap/<VIEW_NAME_CDS>/

Connection Establishment

Log into SAP Data Warehouse Cloud and navigate to the connections page by clicking on the highlighted icon in the left panel. A new Connection can be configured to the OData Source by clicking on the ‘+’ icon.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Provide connections details as explained below.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Once the Connection is created, check its validity by clicking on the highlighted icon.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

In this case, let us assume that we have a created a connection called ‘WriteBack’ to consume objects exposed as OData.

Space Assignment

Click on the highlighted icon in the left panel to view the available Spaces for which you have access in SAP Datawarehouse Cloud System. Select the desired Space. In this case, Space ‘OData’ is selected.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

The created Connection needs to be added to the Space selected to be able to consume the objects exposed as part of the connection ‘WriteBack’.

In addition, Users who require access to Space can also be added.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Objects Creation

Click on the highlighted ‘Data Builder’ icon in the left panel and select the Space ‘OData’.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Click on the option ‘New Graphical View’.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

The Entities under the OData Connection ’WriteBack’ can be viewed by expanding the connection.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

When you click and drag an Entity into the canvas for the very first time a dialog box will pop up with ‘Import and Deploy’ option. The below action creates a Remote Table in the Space selected for the corresponding Entity.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Preview of the data can be done in order to check the data consistency.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

In the below example, Transaction data pertaining to Products, Dimension data pertaining to Product Category and Product Type which are exposed as OData are added as Remote Tables. You can include multiple Remote Tables/Views and build calculation view based on the business requirement using Data Modelling capabilities of SAP Data Warehouse Cloud. The resultant Calculation view can be consumed in SAP Analytics Cloud Stories and in other Calculation Views as well.

SAP Data Warehouse Cloud – Consuming ABAP Core Data Services (CDS) views via OData Services

Click here to evaluate if SAP Analytics Cloud is right for you. To know about the Analytic Applications of SAP Analytics Cloud, please check out our blog series here.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!