R_CostElementGroupHierarchy

DDL: R_COSTELEMENTGROUPHIERARCHY SQL: RCOSTELMNTGRPH Type: view COMPOSITE

Cost Element Group Hierarchy

R_CostElementGroupHierarchy is a Composite CDS View that provides data about "Cost Element Group Hierarchy" in SAP S/4HANA. It reads from 7 data sources and exposes 60 fields with key fields SetClass, ChartOfAccounts, CostElementGroupHierarchyNode, HierarchyParentNode, ParentSetSubClass.

Data Sources (7)

SourceAliasJoin Type
I_CostElement _CostElement inner
I_SetHeader I_SetHeader from
I_Setleaf I_Setleaf union
I_Setleaf I_Setleaf union
I_Setleaf I_Setleaf union
I_Setleaf I_Setleaf union
I_Setnode I_Setnode union

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName RCOSTELMNTGRPH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
AccessControl.authorizationCheck #CHECK view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #COMPOSITE view
EndUserText.label Cost Element Group Hierarchy view

Fields (60)

KeyFieldSource TableSource FieldDescription
KEY SetClass I_SetHeader SetClass Set Class
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass Subclass
KEY HierarchyLevel
KEY CostElement G/L Account
KEY ControllingArea Controlling Area
char10asDrillState
CostElmntGrpHierNodeTypeFilter
CostElementGroupHierarchyNodekeySetClass
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass SetSubClass Subclass
KEY HierarchyLevel
KEY CostElement G/L Account
KEY ControllingArea Controlling Area
char10asDrillState
CostElmntGrpHierNodeTypeFilter
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass SetSubClass Subclass
KEY HierarchyLevel
KEY CostElement G/L Account
KEY ControllingArea Controlling Area
DrillState
CostElmntGrpHierNodeTypeFilter
CostElementkeySetClass
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass SetSubClass Subclass
KEY HierarchyLevel
KEY CostElement G/L Account
KEY ControllingArea Controlling Area
char10asDrillState
CostElmntGrpHierNodeTypeFilter
SetClass Set Class
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass I_Setleaf SetSubClass Subclass
KEY HierarchyLevel
KEY CostElement I_CostElement CostElement G/L Account
KEY ControllingArea I_CostElement ControllingArea Controlling Area
DrillState
CostElmntGrpHierNodeTypeFilter
SetClass Set Class
KEY ChartOfAccounts Subclass
KEY CostElementGroupHierarchyNode Valid-From Date
KEY HierarchyParentNode SETID
KEY ParentSetSubClass I_Setleaf SetSubClass Subclass
KEY HierarchyLevel
KEY CostElement I_CostElement CostElement G/L Account
KEY ControllingArea I_CostElement ControllingArea Controlling Area
DrillState
CostElmntGrpHierNodeTypeFilter
CostElementName

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view R_CostElementGroupHierarchy.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: RCOSTELMNTGRPH

CREATE VIEW R_CostElementGroupHierarchy AS
SELECT
  I_SetHeader.SetClass AS SetClass,
  cast (I_SetHeader.SetSubClass as fis_ktopl) AS ChartOfAccounts,
  cast (I_SetHeader.SetID as costelementgrouphierarchynode) AS CostElementGroupHierarchyNode,
  cast('' as costelementgrouphierarchynode) AS HierarchyParentNode,
  cast( '' as setsubcls) AS ParentSetSubClass,
  cast( 1 as abap.int4) AS HierarchyLevel,
  cast('' as kstar) AS CostElement,
  cast('' as kokrs) AS ControllingArea,
  cast(case when _CostElementGroupEndNode.CostElementGroupHierarchyNode is null then 'expanded' else 'leaf' end as abap.char( 10 )) as DrillState AS char10asDrillState,
  cast('R' as costelmntgrphiernodetypefilter) AS CostElmntGrpHierNodeTypeFilter,
  cast('' as ktext) as CostElementName AS CostElementGroupHierarchyNodekeySetClass,
  cast('expanded' as abap.char( 10 )) AS DrillState,
  cast('' as ktext) as CostElementName AS CostElementkeySetClass,
  _CostElement._Text[ Language = $session.system_language ].CostElementName AS CostElementName
FROM I_SetHeader
INNER JOIN I_CostElement AS _CostElement ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): I_Setnode, I_Setleaf
;