@AbapCatalog.sqlViewName : 'ACCESSIBLEVIEWS'
@EndUserText.label : 'Accessible views (only start authorization checked)'
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view Accessible_Views
with parameters P_User: syuname
as select distinct from Auth_Profiles(P_User : $parameters .P_User ) as validRSComp1
inner join ust12 as compID
on compID.auth = validRSComp1.Authorization_Profile and validRSComp1.Authorization_Object = 'S_RS_COMP1'
and compID.field = 'RSZCOMPID'
inner join Accessible_Views_Comp( P_User:$parameters .P_User ) as allViews
on ((compID.von = '*' or compID.von = '2C*' or compID.von = allViews.csqlviewname)) {
allViews.sqlviewname
}
union
select distinct from Auth_Profiles(P_User : $parameters .P_User ) as validRSComp
inner join ust12 as ddlname
on ddlname.auth = validRSComp.Authorization_Profile and validRSComp.Authorization_Object = 'SDDLVIEW'
and ddlname.field = 'DDLNAME'
inner join ust12 as ddlscrname
on ddlscrname.auth = ddlname.auth and ddlscrname.objct = ddlname.objct and ddlscrname.field = 'DDLSRCNAME'
inner join cdsviewfirstref as allViews
on (allViews.referredobjectddlsourcename = ddlscrname.von and allViews.objectddlsourcename = ddlname.von) {
allViews.sqlviewname
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"ACCESSIBLE_VIEWS_COMP",
"AUTH_PROFILES",
"UST12",
"CDSVIEWFIRSTREF"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload