on 10-16-2017 2:22 PM
Hi,
I have below procedure which i ave designed just for testing views secured with Dynamic AP using stored procedure.
PROCEDURE "SYSTEM"."X_HANA_XYZ_PR::Nikunj234" (OUT test VARCHAR(20) ) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER DEFAULT SCHEMA SYSTEM READS SQL DATA AS v_filter VARCHAR(20); CURSOR v_cusror FOR SELECT distinct "Customer_Name" FROM "SYSTEM"."CUSTOMER_DIM1" where "Customer_ID" = '786'; BEGIN OPEN v_cusror; FETCH v_cusror INTO v_filter; test := v_filter; CLOSE v_cusror; END;
the procedure syntax is correct, but when I try data preview of views secured by AP using this procedure I get error as below. I have checked and all the necessary access is in place. the view i am able to preview data for if i just secured it with simple SQL. Can anyone help what could be the issue. error screenshot attachedhana-error.jpg
Hi Ninkuj
This error is due to the invalid filter clause that comes from the procedure's output. The scalar output from the procedure should be exactly like a filter condition in a WHERE clause i.e
Region='West' (assuming Region is column in your table)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1: Firstly make sure the _SYS_REPO has the Select granted to it on the Schema.
2: If the _SYS_REPO has the select already granted, then check this Note I wrote: https://launchpad.support.sap.com/#/notes/2540498
3: If none of the above work then run the trace outlined in this Wiki and attach the trace here so i can look at it to see what you're missing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.