Skip to Content

I would like to illustrate how to connect from SAP BusinessObjects Cloud to a Calculation View in HANA Cloud Platform (HCP) using SSO. If you don’t have HCP but you would like to use with your tenant, this first blog will show you how to create a user and a Calculation View to be consumed in SAP BusinessObjects Cloud.

1. Prerequisites in HANA Cloud Platform account

I will be using a simple Trial HCP account. If you don’t have one, you can create one:

https://account.hanatrial.ondemand.com/

I will be creating a HANA user HCPUSER as my user account. In order to make changes on the account, I need to first login to the Web-based Development Workbench. For example, if you are using HCP Trial:

https://.hanatrial.ondemand.com/sap/hana/ide/security/

In order to create the account to be used later on in SAP BusinessObjects Cloud, we will need to log in with an Admin account with these roles assigned (e.g.: SYSTEM):

sap.hana.xs.admin.roles::SAMLAdministrator 
sap.hana.xs.admin.roles::RuntimeConfAdministrator
sap.hana.ide.roles::CatalogDeveloper
sap.hana.ide.roles::SecurityAdmin 

You can also connect directly using HANA tools for Eclipse and the tools for HANA on demand.

If you are using SAP HANA studio 2.0 you can install the required software adding the following URL to your list of Available Software Sites: http://tools.hana.ondemand.com/kepler

If you want to know more on how to create users, you can watch this video by the SAP HANA Academy.

2. Assigning correct roles to your new HCP account

Now that we have created our analytics account in HCP: HCPUSER, we need to assign the following role:

sap.bc.ina.service.v2.userRole::INA_USER

I illustrate how to do it directly in the same Web-based workbench as before:

If you want to use this HCPUSER in HANA Studio to create the packages and Calculation Views, you will require few other roles and granting access to _SYS_BIC. For full details you can check the documentation: HANA Security Guide.

If you try to create a package, you will get the following error:


With the SYSTEM account you will need to execute the following SQL commands:

GRANT EXECUTE ON REPOSITORY_REST to HCPUSER;

I created a package named MyPackage to be used by my user HCPUSER. If we want this user to have access to create objects there, we must also grant the following rights:

GRANT REPO.READ ON _SYS_REPO."MyPackage" TO HCPUSER;
GRANT REPO.EDIT_NATIVE_OBJECTS ON _SYS_REPO."MyPackage"TO HCPUSER;
GRANT REPO.ACTIVATE_NATIVE_OBJECTS ON _SYS_REPO."MyPackage"  TO HCPUSER;
GRANT REPO.MAINTAIN_NATIVE_PACKAGES ON _SYS_REPO."MyPackage"  TO HCPUSER;

3. Creating the Calculation View in HANA studio

Now, we are ready to crate a Calculation View. If you are not familiar with HANA Studio or Calculation Views, I will recommend you to visit the Videos posted by the SAP HANA Academy.

If you get the following error when trying to activate your view: 

Message :
 Repository: Encountered an error in repository runtime extension;
Model inconsistency. Create Scenario failed: The following errors occurred: user is not authorized (2950)

In HANA the modelers are managed by the user “_SYS_REPO” that needs access to the repository used. This is going to be executed by the HCPUSER account:

GRANT SELECT ON SCHEMA <NAME_OF_THE_SCHEMA> TO _SYS_REPO WITH GRANT OPTION;

In my case <NAME_OF_THE_SCHEMA> was in fact HCPUSER which is the schema where I created my tables and uploaded my data in HCP.

The last bit is granting the user HCPUSER activating views. This has to be granted by the SYSTEM account or similar Admin account.

GRANT SELECT ON SCHEMA _SYS_BIC TO HCPUSER;
GRANT SELECT ON SCHEMA _SYS_BI TO HCPUSER;
CALL GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE('_SYS_BI_CP_ALL','HCPUSER')

After these changes, we should be able to Activate our Calculation View and it should be ready to be used in SAP BusinessObjects Cloud.

Note: if you don’t activate these privileges, you should get errors like this when trying to execute a Data Preview in HANA Studio:

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

Before you are ready to use that calculation view in SAP BusinessObjects Cloud, use Data Preview in HANA Studio with your user account (HCPUSER). You should be able to explore your data:

If you don’t have any errors, you are ready to use it in your SAP BusinessObjects Cloud tenant.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

    1. Julian Jimenez Post author

      Hi Budi,

      Because the question is not referred to my blog, I would recommend you to post it directly in the Answers area: https://answers.sap.com/questions/ask.html?primaryTagId=67838200100800006884

      Currently BOC only supports parent/child hierarchies from HANA. That applies to on-premise HANA and HCP.

      Regards,
      Julian

      (0) 
  1. Frédéric CHAUCHON

    Hello,

    I tried to follow what you explained, everything is ok, also in Eclipse Data Preview, but when I try to create the model in Businnes Object Cloud on the calculation view, I have these messages :

    • “Model succesfully created” in green,
    • “The data source view has no measures” in red,
    • “Cannot read property ‘measures’ of null

    I have created an answer here : https://answers.sap.com/questions/144007/problem-with-live-connexion-in-business-object-clo.html

    Can you help me ????

    Best regards

    Frédéric

    (0) 
    1. Julian Jimenez Post author

      Hi Frédéric,

      I see in your answer that the solution was to use Eclipse NEON with HANA Tools and not the “SAP HANA Web-based Development Workbench Editor”

      Regards,

      Julian

      (0) 
  2. Thallita Cardeal

    ​Hey experts! I hope you are fine !! I have a doubt: For users to create models by hana calculations views (BOC only) is it necessary to register the user’s P-USER (or S-USER) also in HCP or just in the BOC ??? I believe it is only in the BOC, but I would like the opinion of our specialists. Can someone fix me? Thank you very much in advance.

    (0) 
    1. Julian Jimenez Post author

      Hi Thallita,

      When you create a new connection in SAP BusinessObjects Cloud, you will only need to know the HANA account for SAP Cloud Platform (HCP) and the database name. For example, if your URL to connect to your database is: https://db1aabb44aa.us2.ondemand.com, this means that your connection will be using:

      SAP CP Account: aabb44aa

      Database Name: DB1

      Landscape Host: US West

      When you finally connect, it will prompt for a HANA logon the same way it will show in a form if you were connecting to the SAP HANA Cockpit or HANA studio. In this blog I created the account HCPUSER.

      Regards,

      Julian

       

      (0) 
  3. Ondrej Kloucek

     

    Hi Julian,

    thank you for your article.

    I am utilizing HANA Cloud Platform calulation views on BO Cloud stories (reports). I just have one issue regarding this point – description of cost centers in HANA Table (and calculation view) is e.g. COST_1, COST_2 etc..

    But on BOC Stories – when user wants to search cost center by descritiption (reports build on connected models – based on calculaton view) – they need to put search with case sensitivity.For example – “Cost_1”, “cost_1” will not return anything because case sensitivity of HANA search engine.

    Is there any way how to change this settings?

    Many thanks.
    Ondrej

    (0) 

Leave a Reply