I_CostCenterHierSubTree

DDL: I_COSTCENTERHIERSUBTREE SQL: IFICOSTCTRHST Type: view BASIC Package: FINS_FIS_FICO

Cost Center Hierarchy Sub Tree

I_CostCenterHierSubTree is a Basic CDS View that provides data about "Cost Center Hierarchy Sub Tree" in SAP S/4HANA. It reads from 1 data source (hrrp_node_n) and exposes 6 fields with key fields ControllingArea, CostCenterHierarchy, HierarchyNode, CostCenter. It has 2 associations to related views. Part of development package FINS_FIS_FICO.

Data Sources (1)

SourceAliasJoin Type
hrrp_node_n hrrp_node_n from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[1..*] I_CostCenterHierarchy _Hierarchy $projection.CostCenterHierarchy = _Hierarchy.CostCenterHierarchy and $projection.ControllingArea = _Hierarchy.ControllingArea

Annotations (9)

NameValueLevelField
ObjectModel.representativeKey HierarchyNode view
EndUserText.label Cost Center Hierarchy Sub Tree view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName IFICOSTCTRHST view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY ControllingArea
KEY CostCenterHierarchy
KEY HierarchyNode
KEY CostCenter hrrp_node_n nodevalue
_ControllingArea _ControllingArea
_Hierarchy _Hierarchy
// Main usage for access policy

//

@ObjectModel.representativeKey: 'HierarchyNode'
@EndUserText.label: 'Cost Center Hierarchy Sub Tree'
@VDM.viewType: #BASIC
@AbapCatalog.sqlViewName: 'IFICOSTCTRHST'
@AccessControl.authorizationCheck: #NOT_REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {
  dataClass: #MASTER,
  serviceQuality: #B,
  sizeCategory: #XL
}

define view I_CostCenterHierSubTree
  as select from hrrp_node_n
   
  association [0..1] to I_ControllingArea     as _ControllingArea on  $projection.ControllingArea = _ControllingArea.ControllingArea

  association [1..*] to I_CostCenterHierarchy as _Hierarchy       on  $projection.CostCenterHierarchy = _Hierarchy.CostCenterHierarchy
                                                                  and $projection.ControllingArea     = _Hierarchy.ControllingArea

{
      @ObjectModel.foreignKey.association: '_ControllingArea'
  key cast( hrrp_node_n.kokrs as fis_kokrs preserving type )   as ControllingArea,
      @ObjectModel.foreignKey.association: '_Hierarchy'
  key cast( hrrp_node_n.hryid as fis_hryid_cctr preserving type )    as CostCenterHierarchy,
  key cast( hrrp_node_n.parnode as fis_cctr_hrynid_50 preserving type ) as HierarchyNode,
  key hrrp_node_n.nodevalue                                             as CostCenter,
      _ControllingArea,
      _Hierarchy
}
where
       hrrp_node_n.hrytyp      = '0101'
  and  hrrp_node_n.hryvalfrom <= $session.system_date
  and  hrrp_node_n.hryvalto   >= $session.system_date
  and(
       hrrp_node_n.nodetype        = 'D'
    or hrrp_node_n.nodetype        = 'L'
  )