VB_CDS_VIEWS is a CDS View that provides data about "List of All CDS Views" in SAP S/4HANA. It reads from 6 data sources and exposes 13 fields with key field DDLSourceName.
@AbapCatalog.sqlViewName: 'VBCDSVIEWS'
@EndUserText.label: 'List of All CDS Views'
@ObjectModel.usageType.serviceQuality: #P@ClientHandling.algorithm: #SESSION_VARIABLE@AccessControl.authorizationCheck: #NOT_REQUIRED@AbapCatalog.preserveKey:true@AbapCatalog.compiler.compareFilter:truedefineview VB_CDS_VIEWS asselectfrom ddddlsrc as AllCDSViews
innerjoin Cds_Sql_View as CDSSQLView on AllCDSViews.ddlname = CDSSQLView.DDLSourceName
innerjoin Cds_Stob_View as CDSSTOBView
on AllCDSViews.ddlname = CDSSTOBView.DDLSourceName
{
key AllCDSViews.ddlname as DDLSourceName,
AllCDSViews.source_origin as CDSOriginKey,
CDSSQLView.SQLViewName as SQLViewName,
CDSSTOBView.CDSName,
AllCDSViews.source_type as SourceType
} where AllCDSViews.as4local = 'A' and AllCDSViews.source_type = 'V'
unionallselectfrom ddddlsrc as Views
leftouter to one join ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME' and anno.value notlike ''''
and ( anno.value isnotnullor anno.value <> '' )
{ // to fetch cds 2.0 views
key Views.ddlname as DDLSourceName,
Views.source_origin as CDSOriginKey,
anno.value as SQLViewName,
Views.ddlname as CDSName, // CDSName is DDLname for CDS 2.0, referred from BASIS view 'rsodp_abap_cds_odpname_cds'
Views.source_type as SourceType
} where Views.source_type = 'W' and Views.as4local = 'A'
unionallselectfrom ddddlsrc as Views
innerjoin dd02bnd as StructuredNodes
on StructuredNodes.strucobjn = Views.ddlname and provider_contract = 'AQ'
leftouter to one join ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME' and anno.value notlike ''''
and ( anno.value isnotnullor anno.value <> '' )
{
key Views.ddlname as DDLSourceName,
Views.source_origin as CDSOriginKey,
anno.value as SQLViewName,
Views.ddlname as CDSName,
Views.source_type as SourceType
} where Views.as4local = 'A' and Views.source_type = 'P'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"CDS_SQL_VIEW",
"CDS_STOB_VIEW",
"DD02BND",
"DDDDLSRC",
"DDHEADANNO"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/