Skip to Content
Technical Articles
Author's profile photo Jyoti Sankar Sahu

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.

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%20Platform%20Neo

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%20service%20in%20CP

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%20service

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%20DB%20creation

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

Database

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

DB%20Started

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%20Cockpit

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%20Administration

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%20user

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%20for%20SYSTEM%20user

Roles for SYSTEM user

Once the roles are assigned, SAVE and Close.

Now open the HANA Web IDE from Cloud Platform Cockpit.

Open%20Web%20IDE%20from%20CP%20Cockpit

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%20Editor

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%20View

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%20Connections

SAC Connections

Choose add a new connection.

Select SAP HANA under Connect to Live Data section.

Live%20Connection%20for%20HANA

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%20Account

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%20selection

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.

Create%20model%202

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%20Creation

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%20Story%201

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%20Story%202

Create Story 2

Create%20Story%203

Create Story 3

Now we can execute the story to display the values.

Conclusion:

In this blog we created the hana instance in SAP cloud platform. Provided the required access to System user. Then created the live connection from SAP Analytics Cloud to Cloud Platform. Built the model and story in SAC on the calculation view of hana instance in SCP.

When we run the story in SAC, it brings the live data from cloud platform and the values are real-time values. Any change to the database value in hana instance immediately reflects in the SAC story.

This is created on SAP cloud platform trial. Same can be used in real-time scenarios where we need to build the SAC story and data resides in cloud platform HANA database.

Looking forward for reading your comments. I hope you will find this blog useful.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Denys van Kempen
      Denys van Kempen

      Hi Jyoti,

      Thanks for posting.

      Unfortunately, the SAP HANA Service will be retiring soon. ;-(

      Fortunately, a free trial is now available for SAP HANA Cloud. 😉

      You might want to look into using the latest products and services.

      Here are some tutorials you might find of interest:

      Although still supported for the on-premises releases, the SAP HANA XS "classic" technology (e.g. SAP Web-based Development Workbench) introduced in 2012 was deprecated in 2018. Instead, SAP recommends using SAP HANA XS Advanced, introduced in 2015, for SAP HANA-based development.

      For an update about the latest multicloud technologies, like SAP Business Application Studio and the Cloud Application Programming model, see

      Author's profile photo Jyoti Sankar Sahu
      Jyoti Sankar Sahu
      Blog Post Author

      Hi Denys,

      Thank you very much for your comments.

      Earlier cloud foundry trial was not having hana service. Only for Neo it was available. Now looks like its enabled for cloud foundry trial account also. 

      I will go through the blog you shared and will explore with free trial available ?

      Â