How to connect a HANA CDS view to SAC

SAC accepts data for visualization from several sources including imports or live connections. Import accepts data from a flat file that you upload into SAC. With a live connection, an on-premise or cloud data source consistently supplies your SAC with the data it needs for visualization. In this article, we will walk through the process of connecting a HANA CDS view to your SAC. Suffice it to say, HANA is SAP’s cloud (or hybrid, depending on your need) database. There are three types of HANA CDS views:

  • Basic
  • Composite
  • Consumption

We will not be dwelling on the details of each CDS view and how to create them in this article. However, the CDS you need to connect to your SAC is the consumption view.

Develop Your Consumption CDS VIEW

A consumption CDS view is built on a composite view and is exposed to the front-end or visualization tools. To make your CDS view composite, define your VDM as composite and enable its availability for analytics by making dataExtraction true as seen below.

image.png

(Working with the assumption that you have completed the definition of your key, fields, and associations.) Copy the sqlViewName you have defined for your view (The highlighted part of the image below).

image.png

Define Your Query

In your Project Explorer, right-click on the BW client to create a query, do to New, and then Query.

image.png

image.png

In the InfoProvider tab, type 2C then add the SQL name you copied from your view like 2CSANA_TEST. Then click Browse. Add the InfoProvider on the Browse page. Then add the Technical Name and Description. Then click Finish. You should have your newly created query.

image.png Tick the three boxes for OData, Easy Query, and OLE DB for OLAP to expose your query to external sources. Click the Sheet Definition tab to define your rows (Characteristics), columns (measures,) and Free characteristics. Note that you can make conditions and exception filters as appropriate with relative tabs.

image.png Save your query by clicking the save tab. Copy your query name and log on to your SAC account.

Connecting your query to SAC

After logging in, go to the modeler tab.

image.png

Click the Live Data Model

image.png

In the System Type, Add SAP BW

image.png In the Connection drop-down, click the HANA connection you are working with.

image.png Paste your Query name in the Data Source and select it. Now your Query should be connected to your SAC.

image.png Save your model. You have successfully connected your query to your SAC.

1
Subscribe to my newsletter

Read articles from Fagbuyi Temitope Emmanuel directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Fagbuyi Temitope Emmanuel
Fagbuyi Temitope Emmanuel