P_WBSHierarchyWithoutRootNode

DDL: P_WBSHIERARCHYWITHOUTROOTNODE Type: view_entity BASIC Package: FINS_COPA_REPORTING

WBS Hierarchy Without Root Node

P_WBSHierarchyWithoutRootNode is a Basic CDS View that provides data about "WBS Hierarchy Without Root Node" in SAP S/4HANA. It reads from 2 data sources (I_ProjectBasicData, prhi) and exposes 6 fields with key field WBSElementInternalID. It has 1 association to related views. Part of development package FINS_COPA_REPORTING.

Data Sources (2)

SourceAliasJoin Type
I_ProjectBasicData I_ProjectBasicData inner
prhi prhi from

Associations (1)

CardinalityTargetAliasCondition
[1..1] P_WBSHierarchyWithoutRootNode _Parent $projection.WBSElementParentInternalID = _Parent.WBSElementInternalID

Annotations (5)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
EndUserText.label WBS Hierarchy Without Root Node view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #BASIC view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY WBSElementInternalID prhi posnr
ProjectInternalID prhi psphi
WBSElementParentInternalID prhi up
CompanyCode
WBSElementIsBillingElement _ParentWBSElement WBSElementIsBillingElement
_Parent _Parent
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@EndUserText.label: 'WBS Hierarchy Without Root Node'
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #BASIC
define view entity P_WBSHierarchyWithoutRootNode
//  as select from prhi

//  association [1..1] to I_WBSElementBasicData         as _WBSElement       on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID

//  association [1..1] to I_ProjectBasicData            as _Project          on $projection.ProjectInternalID = _Project.ProjectInternalID

//  association [1..1] to I_WBSElementBasicData         as _ParentWBSElement on $projection.WBSElementParentInternalID = _ParentWBSElement.WBSElementInternalID

//  association [1..1] to P_WBSHierarchyWithoutRootNode as _Parent           on $projection.WBSElementParentInternalID = _Parent.WBSElementInternalID

//{

//  key posnr                                        as WBSElementInternalID,

//      psphi                                        as ProjectInternalID,

//      up                                           as WBSElementParentInternalID,

//      _ParentWBSElement.WBSElementIsBillingElement as WBSElementIsBillingElement,

//      _WBSElement,

//      _ParentWBSElement,

//      _Project,

//      _Parent

//}

//where

//  up is not initial

//  //and _Project.ProjectProfileCode = 'YP05'

  
  as select from prhi as prhi
     inner join I_ProjectBasicData on  prhi.psphi = I_ProjectBasicData.ProjectInternalID 
                                      and I_ProjectBasicData.ProjectProfileCode = 'YP05'
                                     
    left outer to one join I_WBSElementBasicData         as _ParentWBSElement on prhi.up = _ParentWBSElement.WBSElementInternalID
                                                                                  and _ParentWBSElement.WBSElementIsBillingElement = 'X'  
                                                                                  and  _ParentWBSElement.ProjectInternalID = I_ProjectBasicData.ProjectInternalID
//                                                                                  and _ParentWBSElement.CompanyCode = I_ProjectBasicData.CompanyCode


  association [1..1] to P_WBSHierarchyWithoutRootNode as _Parent           on $projection.WBSElementParentInternalID = _Parent.WBSElementInternalID
{
  key prhi.posnr as WBSElementInternalID,
      prhi.psphi as ProjectInternalID,
      prhi.up as WBSElementParentInternalID, 
      cast ( I_ProjectBasicData.CompanyCode as ps_vbukr preserving type )              as CompanyCode,
 //  I_ProjectBasicData.CompanyCode,

      _ParentWBSElement.WBSElementIsBillingElement as WBSElementIsBillingElement,      
      
     // _Project,

      _Parent
}
where
  prhi.up is not initial