SAP Cloud Platform, SAP Analytics Cloud

SAP Analytics Cloud live data connection to SAP Cloud Platform

Introduction:

This blog covers:

  • Enable HANA service in SAP Cloud Platform(Neo)
  • Creation of HANA database in Cloud Platform Cockpit
  • Access the HANA DB
  • Creation of live connection in SAC for Cloud Platform
  • Creation of model and simple story in SAC

Basic knowledge of SAC and SAP cloud platform is needed to understand the concept. User should have access to SAC system.

Also Read: SAP Cloud Platform Integration Certification Preparation Guide

Main Content:

Enable HANA service in SAP Cloud Platform(Neo)

Connect to SAP Cloud Platform Cockpit using your S-userid. You can sign up for a userid if don’t have one.

Link: https://cockpit.hanatrial.ondemand.com/cockpit/#/home/trial

The default one is cloud foundry. Scroll down and choose the Access Neo Trial Environment.

Cloud Platform Neo

Once logged in to SAP cloud platform cockpit, go to service.

Search for the service ‘HANA’.

Select the SAP HANA Service. Refer to the screenshot below. If its not enabled, please enable it.

HANA service in CP

Once the service is enabled, select “Go to service”. It will lead to HANA Service in CP.

By default, there is no database assigned. We have to create database instance.

Hana service

Creation of HANA Database in Cloud Platform Cockpit

To create the DB instance in cloud platform, click on the New button.

Give the name for Database ID. I have given ‘hdb’. Select the password for SYSTEM user. That will be used later for login. By default SYSTEM user gets created. Enable the web access.

Then click on Create. Select the details as shown below.

HANA DB creation

It will take couple of minutes to create the DB instance. You can see the progress. once its created it will be available to access.

Database

If database is stopped, you can start the database using Start button. Once its available, it will show Green status Started.

DB Started

After the database instance is created, we have access the database and provide required roles to SYSTEM user. Its described in next session.

Access the HANA Database

We have to assign the required roles to SYSTEM user. Also need to find out the Calculation view which will be used for Model building in SAC.

Access the administration tools ‘SAP HANA Cockpit’.

HANA Cockpit

It will open the HANA Cockpit in a different browser. We need to provide the userid and password for login. Please use SYSTEM as the user and password which was selected before.

it will open the Fiori Launchpad for HANA administration.

DB Administration

Then goto Manage Roles and Users section. it will open the IDE security in another window.

Select the SYSTEM user from Left menu.

SYSTEM user

It will be assigned with default roles. We need to assign XS admin roles, IDE roles and INA roles.

The list given below.

In Granted Roles tab, choose the + button and assign the roles to SYSTEM user.

Roles for SYSTEM user

Once the roles are assigned, SAVE and Close.

Now open the HANA Web IDE from Cloud Platform Cockpit.

Open Web IDE from CP Cockpit

It will open the Web IDE portal Select the Editor option to open repository objects in HANA. It will give the details of packages and views.

Open Editor

We have to find a Calculation view which will be used for model creation in SAC later on.

We will use PURCHASE_OVERVIEW calculation view. Its provided by SAP as part of demo content. Available in the below path.

Content –> SAP –> hana –> democontent –> models –> PURCHASE_OVERVIEW.calculationview.

Calculation View

This view later will be used in SAC to create the model.

Creation of live connection in SAC for Cloud Platform

User should have access to SAC subscription. Open SAP Analytics Cloud and login with the credentials.

Goto connections.

SAC Connections

Choose add a new connection.

Select SAP HANA under Connect to Live Data section.

Live Connection for HANA

Create new HANA live connection.

Give the name, description. Choose the connection type as SAP Cloud Platform.

Give cloud platform account name You can copy the account name from Cloud platform cockpit. Its next to Europe (Rot) – Trial.

CP Account

Database name: hdb (The name of database chosen in cloud platform)

Landscape host: Europe (Rot) – Trial

Default Language: EN

Choose authentication method ‘Username and password’.

New live connection1

Provide the username as SYSTEM.

Give the password which was chose for SYSTEM user in hana instance.

New live connection2

Click on OK. The connection is created.

Creation of model and simple story in SAC

In SAP Analytics Cloud portal, create a new model using create option.

Create model in SAC

Select the option, ‘Get data from a datasource’ and live data connection.

Datasource selection

Select the system type SAP HANA. Choose the connection created in above step. The name given was CPLIVE.

once its selection, system proposes option to select the datasource.

in the datasource selection, its gives the Calculation Views available in HANA instance in cloud platform.

choose the Purchase_Overview calculation view from the list. it gives the path also where hana view is present in hana repository.

Assign the group(optional) as needed. The SAVE it. Model is created.

Give the name and description for the Model.

Model Creation

Now we will create a simple story on top the model.

Create a new story and choose canvas page to start with.

Create Story 1

Insert a chart and choose the model which we created before.

Select the Netamount in measures. Choose product category and product ID in dimensions. it will display the net amount per product category and product ID.

Save the story.

Create Story 2
Create Story 3

Now we can execute the story to display the values.

Leave a Reply

Your email address will not be published. Required fields are marked *