In my previous blog, I used OData Service Discovery to Measure my Raspberry Pi sensor data on the go with the Smart Business Service.

However, inspired by Raja Prasad Gupta’s blog Connect On-Premise HANA to Smart Business Service – An End-to-End Example I want to Enable Smart Business to Discover SAP HANA Analytic OData Services by SAP HANA views.

To start with, I download the respective Delivery Unit HANA CONT. SBS DISCOVERY 1.0:

And deploy it to my SAP Cloud Platform instance. To be able to do this I need Role sap.hana.xs.lm.roles::Administrator:

To simplify the OData discovery, I make the package anonymously accessible. To start with, I create a role with access to the 2 Views and the general analytic privilege _SYS_BI_CP_ALL:

role sap.smbaas.core.odata.modeler::anonymous
{
catalog sql object "_SYS_BIC"."sap.smbaas.core.v/GET_HANA_VIEWS": //Objecttype: VIEW
	SELECT;
catalog sql object "_SYS_BIC"."sap.smbaas.core.v/GET_ODATA_FOR_HANA_VIEW": //Objecttype: VIEW
	SELECT;
catalog analytic privilege : "_SYS_BI_CP_ALL";
}

Based on this I create my anonymous.xssqlcc file:

{
    "description" : "anonymous",
    "role_for_auto_user" : "sap.smbaas.core.odata.modeler::anonymous"
}

 

Modify my .xsaccess file:

{   
	"exposed" : true,
	"cache_control": "no-cache, no-store",
    "authentication": null,
    "anonymous_connection": "sap.smbaas.core.odata.modeler::anonymous"
}

 

And add a .xsjs file:

var conn = $.db.getConnection("sap.smbaas.core.odata.modeler::anonymous");

So, that I can Activate anonymous access:

For my Business System, I can now choose Service Discovery Type HANA Calc View-based Discovery:

Subsequently, in my Create KPI or OPI app I can Select view:

While OData Service Discovery works perfectly fine, I like the for me more intuitive way to Discover SAP HANA Analytic OData Services by SAP HANA views.

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply