I_CCV_DataSource_VH_2
CCV Datasource VH primary || associated
I_CCV_DataSource_VH_2 is a CDS View that provides data about "CCV Datasource VH primary || associated" in SAP S/4HANA. It reads from 3 data sources (ddheadanno, ddheadanno, ARS_APIS_RELEASED_C1_OR_GROUPS) and exposes 19 fields with key fields entity_name, state. It has 10 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| ddheadanno | modelingAssocTargetAnno | left_outer |
| ddheadanno | modelingDataSourceAnno | left_outer |
| ARS_APIS_RELEASED_C1_OR_GROUPS | rel_c1_grp | inner |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CustomCDSViewSourceOrigin | _SourceOrigin | _SourceOrigin.SourceOrigin = header.source_origin |
| [0..1] | I_CustomCDSViewObjectStatus | _ObjectStatus | _ObjectStatus.ObjectStatus = $projection.ObjectStatus |
| [0..1] | Sacm_Public_Dcl_For_Entity | _dcl_for_entity | _dcl_for_entity.entity = header.entity_name |
| [0..1] | I_CustomCDSViewAccProtection | _AccessProtection | _AccessProtection.AccessProtection = $projection.access_protection |
| [0..1] | I_CustomCDSViewRework_KeyUpper | _Rework | _Rework.EntityName = header.ddl_name -- Annotation value 'OBJECTMODEL.DATACATEGORY' |
| [0..1] | ddheadanno | _objectmodel_datacategory | _objectmodel_datacategory.strucobjn = header.entity_name and _objectmodel_datacategory.name = 'OBJECTMODEL.DATACATEGORY' -- Label text |
| [0..1] | ddddlsrc02bt | _label_text_active | _label_text_active.ddlname = header.ddl_name and _label_text_active.strucobjn = header.entity_name and _label_text_active.as4local = header.state and _label_text_active.ddlanguage = $session.system_language -- Label text English |
| [0..1] | ddddlsrc02bt | _label_text_english | _label_text_english.ddlname = header.ddl_name and _label_text_english.strucobjn = header.entity_name and _label_text_english.as4local = header.state and _label_text_english.ddlanguage = 'E' -- Label text Original |
| [0..1] | ddddlsrc02bt | _label_text_original | _label_text_original.ddlname = header.ddl_name and _label_text_original.strucobjn = header.entity_name and _label_text_original.as4local = header.state and _label_text_original.ddlanguage = header.original_language |
| [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 (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | entity_name | header | entity_name | |
| KEY | state | header | state | |
| view_name | header | entity_name_raw | ||
| ddl_name | header | ddl_name | ||
| view_text | header | label_text | ||
| _SourceOrigin | _SourceOrigin | |||
| _ObjectStatus | _ObjectStatus | |||
| _AccessProtection | _AccessProtection | |||
| HighestPriorityasTaskPriorityId | ||||
| TaskPriority | _Rework | HighestPriorityText | Task Priority | |
| TaskPrioritySortOrder | _Rework | HighestPrioritySortOrder | ||
| ReworkIndicator | _Rework | ReworkIndicator | Rework | |
| Category | _Rework | Category | ||
| TaskCategory | _Rework | CategoryText | ||
| _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_2
as select distinct from DDCDS_ENTITY_HEADER as header
inner join ARS_APIS_RELEASED_C1_OR_GROUPS as rel_c1_grp on rel_c1_grp.object_key = header.entity_name
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 = header.entity_name
and modelingDataSourceAnno.name like 'OBJECTMODEL.SUPPORTEDCAPABILITIES%'
and modelingDataSourceAnno.value = '#CDS_MODELING_DATA_SOURCE'
left outer join ddheadanno as modelingAssocTargetAnno on modelingAssocTargetAnno.strucobjn = header.entity_name
and modelingAssocTargetAnno.name like 'OBJECTMODEL.SUPPORTEDCAPABILITIES%'
and modelingAssocTargetAnno.value = '#CDS_MODELING_ASSOCIATION_TARGET'
association [0..1] to I_CustomCDSViewSourceOrigin as _SourceOrigin on _SourceOrigin.SourceOrigin = header.source_origin
association [0..1] to I_CustomCDSViewObjectStatus as _ObjectStatus on _ObjectStatus.ObjectStatus = $projection.ObjectStatus
association [0..1] to Sacm_Public_Dcl_For_Entity as _dcl_for_entity on _dcl_for_entity.entity = header.entity_name
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 = header.ddl_name
-- Annotation value 'OBJECTMODEL.DATACATEGORY'
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
association [0..1] to ddheadanno as _objectmodel_datacategory on _objectmodel_datacategory.strucobjn = header.entity_name
and _objectmodel_datacategory.name = 'OBJECTMODEL.DATACATEGORY'
-- Label text
association [0..1] to ddddlsrc02bt as _label_text_active on _label_text_active.ddlname = header.ddl_name
and _label_text_active.strucobjn = header.entity_name
and _label_text_active.as4local = header.state
and _label_text_active.ddlanguage = $session.system_language
-- Label text English
association [0..1] to ddddlsrc02bt as _label_text_english on _label_text_english.ddlname = header.ddl_name
and _label_text_english.strucobjn = header.entity_name
and _label_text_english.as4local = header.state
and _label_text_english.ddlanguage = 'E'
-- Label text Original
association [0..1] to ddddlsrc02bt as _label_text_original on _label_text_original.ddlname = header.ddl_name
and _label_text_original.strucobjn = header.entity_name
and _label_text_original.as4local = header.state
and _label_text_original.ddlanguage = header.original_language
association [0..1] to I_CustomCDSViewAnaDataCategory as _AnaDataCategory on _AnaDataCategory.AnalyticsDatacategory = $projection.analytics_datacategory
{
key header.entity_name as entity_name,
key header.state as state,
header.entity_name_raw as view_name,
header.ddl_name as ddl_name,
header.label_text as view_text,
@ObjectModel.foreignKey.association: '_SourceOrigin'
header.source_origin as source_origin,
_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
header.access_control_auth_check = '#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'
// cast( coalesce( _Rework.ReworkIndicator, '' ) as aps_ccv_rework_ind preserving type ) as ReworkIndicator,
_Rework.ReworkIndicator as ReworkIndicator,
@ObjectModel.readOnly: true
_Rework.Category as Category,
@ObjectModel.readOnly: true
_Rework.CategoryText as TaskCategory,
_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 header.analytical_category = '#CUBE' then '1'
when header.analytical_category = '#DIMENSION' then '2'
end as analytics_datacategory,
_AnaDataCategory,
-- Master Data --------------
@EndUserText.label: 'Is Masterdata View'
cast (case when header.analytical_category = '#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 Associationn 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 header.entity_has_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)
header.entity_name_raw as view_name_camel_case,
header.entity_name 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
(
header.source_type = 'V'
or header.source_type = 'W'
)
and header.analytical_query != 'X'
and ( header.source_origin = 0
or header.source_origin = 1 and header.odata_published != 'X' // custom CDS views without OData
or header.source_origin = 3
or header.source_origin = 4
or header.source_origin = 5
)
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