VB_CDS_SQLVIEWNAME is a CDS View that provides data about "Getting sqlviewname for cds 2.0 cds" in SAP S/4HANA. It reads from 6 data sources and exposes 13 fields with key field DDLSourceName.
@AbapCatalog.sqlViewName: 'VBCDSSQLVIEWNAME'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #NOT_REQUIRED@ObjectModel.usageType.dataClass: #META@ObjectModel.usageType.serviceQuality: #P@ObjectModel.usageType.sizeCategory: #L@EndUserText.label: 'Getting sqlviewname for cds 2.0 cds'
defineview VB_CDS_SQLVIEWNAME
asselectfrom ddddlsrc as Views
innerjoin ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME' and anno.value notlike '''' and ( anno.value isnotnullor anno.value <> '' )
{ // Entities with technical name annotation maintained
key Views.ddlname as DDLSourceName,
upper( anno.value ) as SQLViewName,
Views.ddlname as CDSName,
Views.source_origin as CDSOriginKey,
Views.source_type as SourceType
} where Views.source_type = 'W' and Views.as4local = 'A'
unionallselectfrom ddddlsrc as Views
innerjoin ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME' and (anno.value isnullor anno.value = '' or anno.value like '''')
{ // Entities with the annotation maintained, but value is empty
key Views.ddlname as DDLSourceName,
Views.ddlname as SQLViewName,
Views.ddlname as CDSName,
Views.source_origin as CDSOriginKey,
Views.source_type as SourceType
} where Views.source_type = 'W' and Views.as4local = 'A'
unionallselectfrom ddddlsrc as Views
leftouterjoin ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME'
{ // Entities without the annotation
key Views.ddlname as DDLSourceName,
Views.ddlname as SQLViewName,
Views.ddlname as CDSName,
Views.source_origin as CDSOriginKey,
Views.source_type as SourceType
} where Views.source_type = 'W' and Views.as4local = 'A' and anno.name isnull//
// leftouterjoin ddheadanno as anno on Views.ddlname = anno.strucobjn and anno.name = 'ANALYTICS.TECHNICALNAME'
//
//{
// key Views.ddlname as DDLSourceName,
// casewhen anno.value isnullthen Views.ddlname
// when anno.value = '' then Views.ddlname
// else replace( upper( anno.value ), '''', '')
// endas SQLViewName,
// Views.ddlname as CDSName,
// Views.source_origin as CDSOriginKey,
// Views.source_type as SourceType
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"DDDDLSRC",
"DDHEADANNO"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/