DDCDS_DIRECT_BASE_OBJECTS_V2
Get direct base objects for V2 Entity
DDCDS_DIRECT_BASE_OBJECTS_V2 is a CDS View in S/4HANA. Get direct base objects for V2 Entity. It contains 5 fields. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| DDCDS_DIRECT_BASE_OBJECTS | view | from | Get direct base objects | |
| QB_QUERY_PDS | view | from | Get direct base objects |
Fields (5)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | entity_name | ObjectDDLSourceName | 1 |
| direct_base_object_name | ReferredObject | 1 | |
| direct_base_object_type | ReferredObjectType | 1 | |
| primary_data_source | primary_data_source | 1 | |
| state | state | 1 |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Get direct base objects for V2 Entity'
// ***********************************************************************************************************//
// This view list the direct base objects of a V2 Entity which are either part of select or used in the
// join (also via Assoc path propagation).
// ***********************************************************************************************************//
define view entity DDCDS_DIRECT_BASE_OBJECTS_V2
// ****************************************************************************************************************//
// -1- CDS V2 Entities(View Entity, Hierarchy etc) selecting from various objects like View, Hierarchy, Table etc.
// ****************************************************************************************************************//
as select from ddcds_fromclause as from_clause
inner join ddtypes as object_type on from_clause.base_obj_name = object_type.typename
--and from_clause.as4local = object_type.state
{
@EndUserText.label: 'Entity Name(Uppercase)'
key cast(from_clause.entity_name as abap.char(30)) as entity_name,
@EndUserText.label: 'Entity State'
key cast(from_clause.as4local as abap.char(1)) as state,
@EndUserText.label: 'Direct Base Object Name(Uppercase)'
cast(from_clause.base_obj_name as abap.char(30)) as direct_base_object_name,
@EndUserText.label: 'Direct Base Object Type'
cast(object_type.typekind as abap.char(04)) as direct_base_object_type,
cast( case when from_clause.union_number < 2
and from_clause.base_obj_pos = 1
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_ANCESTORS'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_DESCENDANTS_AG'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_DESCENDANTS'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_LEVELED'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_SIBLINGS'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_TEMPORAL_DATN'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_TEMPORAL_DATS'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_TEMPORAL_TS_L'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_TEMPORAL_TS'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY_TEMPORAL_UTCL'
and from_clause.base_obj_alias <> 'DDDDL_HIERARCHY'
then 'X'
when from_clause.parameter_value = 'HIER_SOURCE'
then 'X'
else '' end as abap.char(1) ) as primary_data_source
}
where
from_clause.parameter_name = 'DIRECT_BASE_OBJECT'
and from_clause.as4local = 'A'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"DDCDS_FROMCLAUSE",
"DDTYPES"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/