Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Analytic Privilege : Something went wrong

$
0
0

Hi folks,

I am trying Analytic Privilege on SP08 system(doesn't matter what the system level is, but still ).

 

I created two tables in the schema "SREEHARIV" associated to the user "SREEHARIV".

Tables are Products and Desc.

 

Then I created one attribute view which joins the Products and descriptions (just like MARA and MAKT ).

 

Output result set

Data Preview.JPG

Now my intention is to make the user SREEHARIV to see only the data from country INDIA.

So I am creating an Analytic privilege with Country as attribute(is it the right way ?) .

AP.JPG

After activating it, I added the same analytic privilege to SREEHARIV user.

 

Then, to test the same , I created a XSJS service which will query the attribute view.

 

 

var query = 'SELECT "PNAME","TEXT","COUNTRY","TURNOVER" FROM "_SYS_BIC"."Sreehari/ATR_PRODUCTS"';
var output = [];
try{  var dbconn = $.db.getConnection();  var pstmt  = dbconn.prepareStatement(query);  var rs = pstmt.executeQuery();  while(rs.next()){  output.push({  PNAME : rs.getString(1),  TEXT : rs.getString(2),  COUNTRY : rs.getString(3)  });  }  $.response.setBody(JSON.stringify(output));
}
catch(err){  $.response.setBody(err.message);
}

And I am getting the whole records returned .

output.JPG

I believe it is a logical mistake I am doing . Please correct me if this is not the exact use of analytical privileges . Please don't pump me the Development guide URL

 

Thanks in Advance ,

Sreehari


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>