Exposing Analytic view as odata–>Please follow below mentioned steps to expose your analytic view as Odata, which is present in the HCP Trial.

Step 1:- Create your Analytic View in HANA trial account.

Step 2:- As per the privileges assigned to the developers in the trial HANA account,only calculation views can preview the data.

So we need to convert the analytic view into a calculation view by creating a dummy Calculated Column – Attribute as shown below:-


Step 3:- Open the SQL console and run below command to provide Select Rights for Activated Modeled Views. [Now you can see your view in _sys_BIC–>Column views]  CALL “HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS”;

Step 4:- Create a XSodata file for exposing analytical view as odata like mentioned below,

service namespace “mynew.data”


    “XXXXXXXtrial.gowri::ANA” as “Ana” keys generate local “new”

    aggregates always;


Step 5:- create a role, to access your created model.

role xxxxxxxxtrial.gowri.mynew.role::model_access {

sql object xxxxxxxtrial.gowri:CD.analyticview : SELECT;

sql object xxxxxxxtrial.gowri:ANA.analyticview : SELECT;



Step 6:- Grant created role to your user by running below query,

call “HCP”.”HCP_GRANT_ROLE_TO_USER”(‘xxxxxxxtrial.gowri.mynew.role::model_access’, ‘xxxuseridxx’)


Now check your exposed analytic view as odata via browser.


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