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
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 ?) .
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 .
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