I have a CDS view ZCDS_XXX
:
define view ZCDS_XXX
as select distinct from XXX
association [1..*] to ZCDS_YYY as _YYY ...
{
key a,
_YYY
} ...
I have a DCL ZDCL_XXX
:
define role ZDCL_XXX{
grant
select
on
ZCDS_XXX
where
( _YYY.ProfitCenter ) = aspect pfcg_auth( K_PCAR_REP, PRCTR );
}
The goal is to return the entries of the CDS
ZCDS_XXX
for which the user has at least one authorization from a list of associated profit centers .
Okay everything is working fine ...
BUT, when the DCL is active, The CDS view ZCDS_XXX
view returns me duplicate keys
despite the DISTINCT
(removes duplicates from the results list).
As if the DCL does the processing after the selection and
changed the cardinality of my result >(
I would like to know if there is a solution directly in the DCL or the CDS view to avoid having duplicates and avoid doing a SELECT DISTINCT
in oSQL or delete duplicates for example if I use the CDS view in a search help.
And also if you have a link that describes its behavior or the SQL syntax in the DCL, I can't find much in the docs...
Thanks you a lot for your help !