Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8150

Incorrect results with design-time artifacts

$
0
0

Hi,

 

Problem description:

After creating design-time artifacts, Analytic view with Anlaytic privilege having assign restriction as repository procedure is not returning desired results.

 

HANA AWS revision 70.

 

Problem Recreation:

Below I am giving the process for problem recreation.


1. EDW.hdbschema:

schema_name="EDW";


2. EDW_DD.hdbdd:


namespace excent.P1;

@Schema:'EDW'

context EDW_DD {

 

type TT_LV {

LowValue :String(18);

};

 

entity USER {

@Catalog.tableType:#COLUMN

 

key User              :String(10);

key InfoObject        :String(10);

key Option            :String(2);

key LowValue          :String(18);

HighValue             :String(18);

ChangedOn             :LocalDate;

ChangedBy             :String(8);

};

};"


3. Created Analytic view (AN_EDW_SALES.analyticview) based on VBAP table with output as VBELN, MATNR, NETWR. Apply privileges is left empty.


4. Created repository procedure (LowValue_IN.procedure)

CREATEPROCEDURELowValue_IN (OUTRES"EDW"."excent.P1::EDW_DD.TT_LV" )

       LANGUAGESQLSCRIPT

       SQLSECURITYDEFINER

       DEFAULTSCHEMA_SYS_BIC

       READSSQLDATAAS

 

v_cntINT;

BEGIN

 

RES = SELECT"LowValue"FROM  "EDW"."excent.P1::EDW_DD.USER"

             WHERE"User"            = SESSION_USER

               AND"InfoObject"       = 'MATNR'

               AND"Option"           = 'EQ'

             GROUPBY"LowValue""User"

;

 

SELECTCOUNT(*) INTOv_cntFROM :RES;

 

IF :v_cnt = 0

THENRES = SELECT 'EMPTY' AS"LowValue"FROMDUMMY;

ENDIF ;

 

END;


5. Created Analytic privilege(AP_EDW_SALES.analytic privilege) with assign restriction on Repository procedure (LowValue_IN.procedure) with operator "IN" and Privilege Validity with operator as ">=", From date as yesterday (2014-03-24)


6. Created Role (EDW_SALES.hdbrole) and assigned the below privileges:

 

systemprivilege: CATALOG READ;

 

catalogsqlobject "SYS"."REPOSITORY_REST": EXECUTE;

catalogschema "_SYS_BI": SELECT;

catalogschema "_SYS_BIC": SELECT;

 

analyticprivilege: excent.P1:AP_EDW_SALES.analyticprivilege;

 

package excent.P1: REPO.READ;

 

7. Created user from Systems view (EDWUSER) and assigned the role (EDW_SALES.hdbrole).

 

8. In SQLConsole, executed the query to insert 1 record, which has in VBAP:

insertinto"EDW"."excent.P1::EDW_DD.USER"values('EDWSALES','MATNR','EQ','M-08','','','');


Now when I do the data preview, I can see all the records instead of only 1 record with MATNR "M-08".


Few Observations:


1. When SELECT statement of procedure when executed in SQLconsole for EDWUSER(with extra privilege SELECT on EDW schema) it returns only 1 row but not the Analytic view.

 

2. Also the repository procedure can be used as catalog procedure in Analytic privilege. This also behaving the same.


3. When I change the "Apply Privileges" option to "Analytic Privileges" in Analytic view, I am getting below error when doing data preview.

DAP2.jpg

I could not understand where I am doing wrong. Is it a product bug or mistake from my end?


Regards

Raj


Viewing all articles
Browse latest Browse all 8150

Trending Articles



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