I_CCV_DATASOURCE_HELPER
Custom CDS View Datasource Helper
I_CCV_DATASOURCE_HELPER is a CDS View that provides data about "Custom CDS View Datasource Helper" in SAP S/4HANA. It reads from 4 data sources (ddldependency, ARS_APIS_RELEASED_C1_OR_GROUPS, ddddlsrc, dd02b) and exposes 9 fields with key field DataSourceName. It has 9 associations to related views.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| ddldependency | dep | inner |
| ARS_APIS_RELEASED_C1_OR_GROUPS | rel_c1_grp | inner |
| ddddlsrc | src | inner |
| dd02b | stob | from |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | ddheadanno | _odata | _odata.strucobjn = stob.strucobjn and _odata.name = 'ODATA.PUBLISH' -- Annotation value 'ANALYTICS.DATACATEGORY' |
| [0..1] | ddheadanno | _analytics_category | _analytics_category.strucobjn = stob.strucobjn and _analytics_category.name = 'ANALYTICS.DATACATEGORY' -- Annotation value 'ANALYTICS.QUERY' |
| [0..1] | ddheadanno | _analytics_query | _analytics_query.strucobjn = stob.strucobjn and _analytics_query.name = 'ANALYTICS.QUERY' -- Annotation value 'ACCESSCONTROL.AUTHORIZATIONCHECK' |
| [0..1] | ddheadanno | _access_control | _access_control.strucobjn = stob.strucobjn and _access_control.name = 'ACCESSCONTROL.AUTHORIZATIONCHECK' -- Show DCLs protecting DDLs |
| [0..1] | Sacm_Public_Dcl_For_Entity | _dcl_for_entity | _dcl_for_entity.entity = stob.strucobjn -- Annotation value 'OBJECTMODEL.DATACATEGORY' |
| [0..1] | ddheadanno | _object_category | _object_category.strucobjn = stob.strucobjn and _object_category.name = 'OBJECTMODEL.DATACATEGORY' |
| [0..1] | I_CustomCDSViewSourceOrigin | _SourceOrigin | _SourceOrigin.SourceOrigin = src.source_origin |
| [0..1] | I_CustomCDSViewAccProtection | _AccessProtection | _AccessProtection.AccessProtection = $projection.AccessProtection |
| [0..1] | I_CustomCDSViewAnaDataCategory | _AnaDataCategory | _AnaDataCategory.AnalyticsDatacategory = $projection.AnalyticsDataCategory |
Annotations (2)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Custom CDS View Datasource Helper | view |
Fields (9)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DataSourceName | Entity Name Raw | ||
| DataSourceNameUpper | Entity Name Upper Case | |||
| SourceOrigin | ddddlsrc | source_origin | Source Origin | |
| char1asAccessProtection | ||||
| valueTEXTthenXendasTextViewIndicator | Is Text View | |||
| char1asAnalyticsDataCategory | ||||
| _SourceOrigin | _SourceOrigin | |||
| _AccessProtection | _AccessProtection | |||
| _AnaDataCategory | _AnaDataCategory |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Custom CDS View Datasource Helper'
define view entity I_CCV_DATASOURCE_HELPER
as select from dd02b as stob
inner join ddldependency as dep on dep.objectname = stob.strucobjn
and dep.state = 'A'
and dep.objecttype = 'STOB'
inner join ddddlsrc as src on src.ddlname = dep.ddlname
and src.as4local = 'A'
and ( src.source_type = 'V' or src.source_type = 'W' )
and src.parentname = ''
and ( src.source_origin = 0
or src.source_origin = 1
or src.source_origin = 3
or src.source_origin = 4
or src.source_origin = 5 )
inner join ARS_APIS_RELEASED_C1_OR_GROUPS as rel_c1_grp on rel_c1_grp.object_key = stob.strucobjn
and rel_c1_grp.object_type = 'CDS_STOB'
and ( rel_c1_grp.state = 'RELEASED'
or rel_c1_grp.state = 'DEPRECATED' )
-- Annotation value 'ODATA.PUBLISH'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _odata on _odata.strucobjn = stob.strucobjn
and _odata.name = 'ODATA.PUBLISH'
-- Annotation value 'ANALYTICS.DATACATEGORY'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _analytics_category on _analytics_category.strucobjn = stob.strucobjn
and _analytics_category.name = 'ANALYTICS.DATACATEGORY'
-- Annotation value 'ANALYTICS.QUERY'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _analytics_query on _analytics_query.strucobjn = stob.strucobjn
and _analytics_query.name = 'ANALYTICS.QUERY'
-- Annotation value 'ACCESSCONTROL.AUTHORIZATIONCHECK'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _access_control on _access_control.strucobjn = stob.strucobjn
and _access_control.name = 'ACCESSCONTROL.AUTHORIZATIONCHECK'
-- Show DCLs protecting DDLs
association [0..1] to Sacm_Public_Dcl_For_Entity as _dcl_for_entity on _dcl_for_entity.entity = stob.strucobjn
-- Annotation value 'OBJECTMODEL.DATACATEGORY'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _object_category on _object_category.strucobjn = stob.strucobjn
and _object_category.name = 'OBJECTMODEL.DATACATEGORY'
association [0..1] to I_CustomCDSViewSourceOrigin as _SourceOrigin on _SourceOrigin.SourceOrigin = src.source_origin
association [0..1] to I_CustomCDSViewAccProtection as _AccessProtection on _AccessProtection.AccessProtection = $projection.AccessProtection
association [0..1] to I_CustomCDSViewAnaDataCategory as _AnaDataCategory on _AnaDataCategory.AnalyticsDatacategory = $projection.AnalyticsDataCategory
{
@EndUserText.label: 'Entity Name Raw'
key cast(stob.strucobjn_raw as abap.char(30)) as DataSourceName,
@EndUserText.label: 'Entity Name Upper Case'
cast(stob.strucobjn as abap.char(30)) as DataSourceNameUpper,
@EndUserText.label: 'Source Origin'
src.source_origin as SourceOrigin,
@ObjectModel.foreignKey.association: '_AccessProtection'
cast (case when _dcl_for_entity.dclname <> '' and
_access_control .value = '#PRIVILEGED_ONLY' then '2'
when _dcl_for_entity.dclname <> '' then '1'
else '0'
end as abap.char(1) ) as AccessProtection, // 0=None, 1=Protected, 2=Privileged Only
@EndUserText.label: 'Is Text View'
@Consumption.filter : { selectionType: #SINGLE, multipleSelections : false}
case when _object_category.value = '#TEXT' then 'X'
end as TextViewIndicator,
@ObjectModel.foreignKey.association: '_AnaDataCategory'
cast (case when _analytics_category.value = '#CUBE' then '1'
when _analytics_category.value = '#DIMENSION' then '2'
end as abap.char(1) ) as AnalyticsDataCategory,
@EndUserText.label: 'Is Masterdata View'
@Consumption.filter : { selectionType: #SINGLE, multipleSelections : false}
case when _analytics_category.value = '#DIMENSION' then 'X'
end as MasterdataViewIndicator,
//Associations
_SourceOrigin,
_AccessProtection,
_AnaDataCategory
}
where stob.strucobjn_raw is not initial
and stob.as4local = 'A'
and ( _analytics_query.name is null // but do not show analytical queries
or _analytics_query.value = 'false'
)
and ( src.source_origin != 1 // custom CDS views without OData + non Custom CDS Views with and without OData
or ( _odata.name is null
or _odata.value = 'false'
)
);
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ARS_APIS_RELEASED_C1_OR_GROUPS",
"SACM_PUBLIC_DCL_FOR_ENTITY",
"DD02B",
"DDDDLSRC",
"DDHEADANNO",
"DDLDEPENDENCY"
],
"ASSOCIATED":
[
"I_CUSTOMCDSVIEWACCPROTECTION",
"I_CUSTOMCDSVIEWANADATACATEGORY",
"I_CUSTOMCDSVIEWSOURCEORIGIN"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA