I_CCV_DataSource_VH_1
CCV Datasource VH primary || associated
I_CCV_DataSource_VH_1 is a CDS View that provides data about "CCV Datasource VH primary || associated" in SAP S/4HANA. It reads from 7 data sources and exposes 18 fields with key fields entity_name, state. It has 14 associations to related views.
Data Sources (7)
| Source | Alias | Join Type |
|---|---|---|
| ddldependency | dep | inner |
| ddheadanno | modelingAssocTargetAnno | left_outer |
| ddheadanno | modelingDataSourceAnno | left_outer |
| dd02bnd | node_info | inner |
| ARS_APIS_RELEASED_C1_OR_GROUPS | rel_c1_grp | inner |
| ddddlsrc | src | inner |
| tadir | tadir | inner |
Associations (14)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | ddddlsrc02bt | _label_text_active | _label_text_active.ddlname = src.ddlname and _label_text_active.strucobjn = stob.strucobjn and _label_text_active.ddlanguage = $session.system_language and _label_text_active.as4local = stob.as4local -- Label text English |
| [0..1] | ddddlsrc02bt | _label_text_english | _label_text_english.ddlname = src.ddlname and _label_text_english.strucobjn = stob.strucobjn and _label_text_english.ddlanguage = 'E' and _label_text_english.as4local = stob.as4local -- Label text Original |
| [0..1] | ddddlsrc02bt | _label_text_original | _label_text_original.ddlname = src.ddlname and _label_text_original.strucobjn = stob.strucobjn and _label_text_original.ddlanguage = tadir.masterlang and _label_text_original.as4local = stob.as4local -- Annotation value 'ODATA.PUBLISH' |
| [0..1] | ddheadanno | _odata | _odata.strucobjn = stob.strucobjn and _odata.name = 'ODATA.PUBLISH' -- Annotation value 'ANALYTICS.DATACATEGORY' |
| [0..1] | ddheadanno | _analytics_datacategory | _analytics_datacategory.strucobjn = stob.strucobjn and _analytics_datacategory.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 | _objectmodel_datacategory | _objectmodel_datacategory.strucobjn = stob.strucobjn and _objectmodel_datacategory.name = 'OBJECTMODEL.DATACATEGORY' |
| [0..1] | I_CustomCDSViewSourceOrigin | _SourceOrigin | _SourceOrigin.SourceOrigin = src.source_origin |
| [0..1] | I_CustomCDSViewObjectStatus | _ObjectStatus | _ObjectStatus.ObjectStatus = $projection.ObjectStatus |
| [0..1] | I_CustomCDSViewAccProtection | _AccessProtection | _AccessProtection.AccessProtection = $projection.access_protection |
| [0..1] | I_CustomCDSViewRework_KeyUpper | _Rework | _Rework.EntityName = src.ddlname |
| [0..1] | I_CustomCDSViewAnaDataCategory | _AnaDataCategory | _AnaDataCategory.AnalyticsDatacategory = $projection.analytics_datacategory |
Annotations (2)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | CCV Datasource VH primary || associated | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | entity_name | stob | strucobjn | Entity Name Upper Case |
| KEY | state | stob | as4local | Entity State |
| view_name | stob | strucobjn_raw | ||
| ddl_name | ddddlsrc | ddlname | DDL Name | |
| _SourceOrigin | _SourceOrigin | |||
| _ObjectStatus | _ObjectStatus | |||
| _AccessProtection | _AccessProtection | |||
| HighestPriorityasTaskPriorityId | ||||
| TaskPriority | _Rework | HighestPriorityText | Task Priority | |
| TaskPrioritySortOrder | _Rework | HighestPrioritySortOrder | ||
| ReworkIndicator | _Rework | ReworkIndicator | Rework | |
| TaskCategory | _Rework | CategoryText | ||
| Category | _Rework | Category | ||
| _Rework | _Rework | |||
| _TaskPriority | _Rework | _TaskPriority | ||
| _TaskCategory | _Rework | _TaskCategory | ||
| _AnaDataCategory | _AnaDataCategory | |||
| TextandFuzzySearchNeeded |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'CCV Datasource VH primary || associated'
define view entity I_CCV_DataSource_VH_1
as select distinct 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.parentname = ''
and ( src.source_type = 'V' or src.source_type = 'W' )
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 )
-- Has parameters
inner join dd02bnd as node_info on node_info.strucobjn = stob.strucobjn
and node_info.nodename = '.NODE1'
and node_info.as4local = stob.as4local
--tadir
inner join tadir as tadir on tadir.pgmid = 'R3TR'
and tadir.object = 'STOB'
and tadir.obj_name = stob.strucobjn
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' )
left outer join ddheadanno as modelingDataSourceAnno on modelingDataSourceAnno.strucobjn = stob.strucobjn
and modelingDataSourceAnno.name like 'OBJECTMODEL.SUPPORTEDCAPABILITIES%'
and modelingDataSourceAnno.value = '#CDS_MODELING_DATA_SOURCE'
left outer join ddheadanno as modelingAssocTargetAnno on modelingAssocTargetAnno.strucobjn = stob.strucobjn
and modelingAssocTargetAnno.name like 'OBJECTMODEL.SUPPORTEDCAPABILITIES%'
and modelingAssocTargetAnno.value = '#CDS_MODELING_ASSOCIATION_TARGET'
-- Label text
association [0..1] to ddddlsrc02bt as _label_text_active on _label_text_active.ddlname = src.ddlname
and _label_text_active.strucobjn = stob.strucobjn
and _label_text_active.ddlanguage = $session.system_language
and _label_text_active.as4local = stob.as4local
-- Label text English
association [0..1] to ddddlsrc02bt as _label_text_english on _label_text_english.ddlname = src.ddlname
and _label_text_english.strucobjn = stob.strucobjn
and _label_text_english.ddlanguage = 'E'
and _label_text_english.as4local = stob.as4local
-- Label text Original
association [0..1] to ddddlsrc02bt as _label_text_original on _label_text_original.ddlname = src.ddlname
and _label_text_original.strucobjn = stob.strucobjn
and _label_text_original.ddlanguage = tadir.masterlang
and _label_text_original.as4local = stob.as4local
-- 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_datacategory on _analytics_datacategory.strucobjn = stob.strucobjn
and _analytics_datacategory.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 _objectmodel_datacategory on _objectmodel_datacategory.strucobjn = stob.strucobjn
and _objectmodel_datacategory.name = 'OBJECTMODEL.DATACATEGORY'
association [0..1] to I_CustomCDSViewSourceOrigin as _SourceOrigin on _SourceOrigin.SourceOrigin = src.source_origin
association [0..1] to I_CustomCDSViewObjectStatus as _ObjectStatus on _ObjectStatus.ObjectStatus = $projection.ObjectStatus
association [0..1] to I_CustomCDSViewAccProtection as _AccessProtection on _AccessProtection.AccessProtection = $projection.access_protection
association [0..1] to I_CustomCDSViewRework_KeyUpper as _Rework on _Rework.EntityName = src.ddlname
association [0..1] to I_CustomCDSViewAnaDataCategory as _AnaDataCategory on _AnaDataCategory.AnalyticsDatacategory = $projection.analytics_datacategory
{
@EndUserText.label: 'Entity Name Upper Case'
key stob.strucobjn as entity_name,
@EndUserText.label: 'Entity State'
key stob.as4local as state,
stob.strucobjn_raw as view_name,
@Search.defaultSearchElement: true
@EndUserText.label: 'DDL Name'
src.ddlname as ddl_name,
@EndUserText.label: 'Label Text'
cast(coalesce( coalesce( _label_text_active.ddtext,
_label_text_english.ddtext ),
_label_text_original.ddtext ) as abap.char(60)) as view_text,
-- Source Origin ----------------------------
@ObjectModel.foreignKey.association: '_SourceOrigin'
@EndUserText.label: 'Source Origin'
src.source_origin as source_origin, // abap.int1
_SourceOrigin,
-- Object Status -----------------------------
@ObjectModel.foreignKey.association: '_ObjectStatus'
cast (
case
when rel_c1_grp.state = 'RELEASED' then '1'
when rel_c1_grp.state = 'DEPRECATED' then '2'
end as aps_ccv_object_status ) as ObjectStatus, // null is possible, no ''
_ObjectStatus,
-- Access Protection -------------------------
@ObjectModel.foreignKey.association: '_AccessProtection'
case
when _dcl_for_entity.dclname is not null and
_dcl_for_entity.dclname <> '' and
_access_control.value = '#PRIVILEGED_ONLY' then '2'
when _dcl_for_entity.dclname is not null and
_dcl_for_entity.dclname <> '' then '1'
when _dcl_for_entity.dclname is null or
_dcl_for_entity.dclname = '' then '0'
end as access_protection, // 0=None, 1=Protected, 2=Privileged Only // null is possible, no ''
_AccessProtection,
-- ATO Rework -------------------------------
@ObjectModel.readOnly: true
_Rework.HighestPriority as TaskPriorityId,
@ObjectModel.readOnly: true
@ObjectModel.foreignKey.association: '_TaskPriority'
@EndUserText.label: 'Task Priority'
_Rework.HighestPriorityText as TaskPriority,
@ObjectModel.readOnly: true
_Rework.HighestPrioritySortOrder as TaskPrioritySortOrder,
@ObjectModel.readOnly: true
@EndUserText.label: 'Rework'
_Rework.ReworkIndicator as ReworkIndicator,
@ObjectModel.readOnly: true
_Rework.CategoryText as TaskCategory,
@ObjectModel.readOnly: true
_Rework.Category as Category,
_Rework,
_Rework._TaskPriority as _TaskPriority,
_Rework._TaskCategory as _TaskCategory,
-- Text View ---------------------------------
@EndUserText.label: 'Is Text View'
cast ( case when _objectmodel_datacategory.value = '#TEXT' then 'X'
else '' // '' is needed for VH, SADL doesn't handle null values as expected
end as boolean ) as text_view_ind, // boolean is needed, because of ValueHelp
-- Analytical Query --------------------------
@ObjectModel.foreignKey.association: '_AnaDataCategory'
case when _analytics_datacategory.value = '#CUBE' then '1'
when _analytics_datacategory.value = '#DIMENSION' then '2'
end as analytics_datacategory,
_AnaDataCategory,
-- Master Data -------------------------------
@EndUserText.label: 'Is Masterdata View'
cast ( case when _analytics_datacategory.value = '#DIMENSION' then 'X'
else '' // '' is needed for VH, SADL doesn't handle null values as expected
end as boolean ) as masterdata_view_ind, // boolean is needed, because of ValueHelp
-- Modeling Data Source ----------------------
@EndUserText.label: 'Is Modeling Data Source'
cast ( case when modelingDataSourceAnno.value is not null then 'X'
else '' // '' is needed for VH, SADL doesn't handle null values as expected
end as boolean ) as modeling_data_source_ind, // boolean is needed, because of ValueHelp
-- Modeling Association Target ----------------
@EndUserText.label: 'Is Modeling Association Target'
cast ( case when modelingAssocTargetAnno.value is not null then 'X'
else '' // '' is needed for VH, SADL doesn't handle null values as expected
end as boolean ) as modeling_assoc_target_ind, // boolean is needed, because of ValueHelp
-- Scenario ----------------------------------
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_CCV_CURRENTSCENARIO_TR_EXIT'
cast('' as aps_ccv_scenario) as current_scenario,
-- Has Parameter -----------------------------
@EndUserText.label: 'Has Parameters'
cast( case when node_info.with_parameters = 'X' then 'X'
else '' // '' is needed for VH, SADL doesn't handle null values as expected
end as boolean ) as has_parameter_ind, // boolean is needed, because of ValueHelp
-- Extensibility Draft -----------------------
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_CCV_TR_EXIT_DS_VH_DRAFTIND' // ensures that no extensibility drafts are shown
cast(' ' as boolean ) as extensibility_draft_ind, // boolean is needed, because of ValueHelp
-- Text and Fuzzy Search ---------------------
-- Needed, because SADL Search doesn't work with calculated fields (like coalesce, see DDCDS_ENTITY_HEADER)
stob.strucobjn_raw as view_name_camel_case,
stob.strucobjn as view_name_upper_case,
_label_text_active.ddtext as view_text_a_tx,
_label_text_english.ddtext as view_text_a_df,
_label_text_original.ddtext as view_text_fb
}
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",
"I_CUSTOMCDSVIEWREWORK_KEYUPPER",
"SACM_PUBLIC_DCL_FOR_ENTITY",
"DD02B",
"DD02BND",
"DDDDLSRC",
"DDDDLSRC02BT",
"DDHEADANNO",
"DDLDEPENDENCY",
"TADIR"
],
"ASSOCIATED":
[
"I_CCV_REWORK_TASK_CATEGORY_VH",
"I_CCV_REWORK_TASK_PRIORITY_VH",
"I_CUSTOMCDSVIEWACCPROTECTION",
"I_CUSTOMCDSVIEWANADATACATEGORY",
"I_CUSTOMCDSVIEWOBJECTSTATUS",
"I_CUSTOMCDSVIEWREWORK_KEYUPPER",
"I_CUSTOMCDSVIEWSOURCEORIGIN"
],
"BASE":
[
"I_CUSTOMCDSVIEWREWORK_KEYUPPER"
],
"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