Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
lsubatin
Active Contributor
This previous post explained how to install the EPMMDS plugin to consume information views from tools like Lumira, Analysis for Office or anything that uses the Information Access (InA) service to et live data from HANA (express edition, in my case).

Following are some steps to create and consume information models using modelling on XS Advanced. We assume you already have a system with XS Advanced installed. If you don't, you can get one from any of these options.

Because we will be using XS Advanced, by "information views" I no longer mean the retiring attribute or analytical views, but the different flavors of calculation views:



I will assume you will want to create a new space to develop on the tenant database, so that will be the first step.

Create a space on XS Advanced


Well... where else would you create a space on HANA; right?

The steps to create and enable a new space are documented in the following tutorial. You will need a powerful user, like XSA_ADMIN and the steps on the following tutorial:

https://www.sap.com/developer/tutorials/xsa-setup-new-space.html



You may wonder what a space is and I'll try to make it short: This concept is inherited from Cloud Foundry and refers to a group of resources (applications or services) visible to each other. You can have different roles in a space (Auditor, Developer, Manager) and could use, for example, different spaces to isolate different projects. A space belongs in an organization, together with other spaces.

Do you have your new space? Is your developer user assigned as a developer to that space?

Let's move on...

Link a tenant database to your space


Another very simple task that also requires admin rights.

When you go into Web IDE to create a new multi-target application, you will be asked for your space. Linking a space to a tenant database allows you to develop on that tenant. You need the tenant in this case because, as of now, you are running the InA service through the XS Classic engine, which is now by default embedded in the index server.

In order to use that tenant DB through your space, you need to link them:

https://www.sap.com/developer/tutorials/xsa-tenant-db-space.html



Speaking of index servers, guess who does not have its own one? The system database (systemdb)!

In the system database, the name server covers the index server in only some of its functions, but not all of them. If you want full SQL capabilities and some cool stuff like predictive analytics or smart data streaming, you need a tenant database. That's actually where your application development should be happening, anyways.

This mapping will be handy for those scenarios too.

Let the HANA modelling begin


Before you can do any modelling you will need to create a multi target app. From SAP Web IDE for SAP HANA (yeah.. I did that on purpose...), Some options to achieve this:

  • You can right-click on Workspace --> New --> Project from Template. You will be prompted to choose your space. If you've done it correctly, you should find your space on the list.

  • You can also clone an initialized repository from Github (as explained in this very simple tutorial) to create a new MTA.

  • In my case, I had already created an MTA with a database module and nothing else (if I had created, for example, a UAA service instance on my original space, i would have needed to create it in my new space). So I could just right-click on the project --> Project Settings. There I chose my new space and rebuilt the app.




Coming from years of modelling in HANA Studio, and just like any other human being would, I had an adaptation period of like... two hours. In terms of modelling, there are some new features that clearly make life easier and change, in this case, was easy for me to embrace.

Here are two tutorials explaining how to create dimension and cube calculation views on Web IDE on XS Advanced.

  • Creating a Dimension Calculation view tutorial

  • Creating a Cube calculation view with a star join tutorial


Grant permissions


Remember how in XS Classic you used to need a schema and the creator of the schema was its owner, so it was the only one who could grant other users with permissions and sometimes you also needed to fiddle with some other repository permissions before you could do a data preview on a calculation view? Well, it got more simple here. The HDI container has its own technical users, which are created with the HDI container itself and look like this:



Those guys ( #DI and  #OO) are the owners of the schema and its objects. They have no problem accessing the schema and executing views.

You would generally create an analytic privilege (now called structured privilege) to use with a role. I'm skipping that part because it's my party and I access it all if I want to. If you create one, you will need to assign it to the technical user.

I will create a separate user to use from the reporting tools and grant a more restricted role to it.

From Web IDE, this is the role I created (within the src folder, I created a new file called "epm.hdbrole", inside a new folder called "roles"):
{
"role":{
"name": "epm_ina",
"schema_privileges": [{
"privileges": ["SELECT METADATA",
"SELECT"
]
}]
}
}

You can create new users and grant them permissions from the XSA Administration Cockpit (in HXE, with the default port, it's https://hxehost:51041/sap/hana/cockpit/landscape/index.html ) or use SQL statements from the DB explorer like I did (i.e.,  grant "PNL_1"."epm_ina" to "INA_USER" )

Connect to the reporting tools


Lumira


It's still requesting an "XS Classic" connection. For now, that's what I'm feeding it:



 

Ta-da! Here are my cube type calculation views, ready to be visualized:


Analysis for Office - MS Excel


I guess Excel makes people feel at home, so that's why there is some SAP Business Objects on Excel. It is also very easy to connect to my HXE instance. The trick is to skip here so you can create a new connection:



By right-clicking and using "Create New SAP HANA connection":



Enter the connection information:



 

And I can also see my dimension views:



There are more step-by-step, free tutorials on XS Advanced development and Lumira at the Developer Center.

Happy modelling and let's stay in touch on  or on LinkedIn!
16 Comments