@AbapCatalog.sqlViewName : 'IWBSHIERNODE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AccessControl.privilegedAssociations: ['_Hierarchy' ]
@ObjectModel: { dataCategory: #HIERARCHY }
@VDM.viewType: #BASIC
@Hierarchy.parentChild:
[{ recurse: { parent: ['ParentNode'] , child: ['HierarchyNode'] },
siblingsOrder: [{ by : 'HierarchyNodeSequence', direction: 'ASC' }],
directory: '_Hierarchy'
}]
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label : 'WBS Element Hierarchy Node'
//@ObjectModel.representativeKey : 'HierarchyNode'
//@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
//Deprecated - Do not use this view
@VDM.lifecycle : {
status: #DEPRECATED
}
define view I_WBSElementHierarchyNode
as
select from hrrp_node
association [0..*] to I_WBSElementHierarchyNodeText as _Text on $projection.WBSElementHierarchy = _Text.WBSElementHierarchy
and $projection.HierarchyNode = _Text.HierarchyNode
and $projection.WBSElement = ''
association [0..1] to I_WBSElement as _WBSElement on $projection.WBSElement = _WBSElement.WBSElement
association [1..1] to I_WBSElementHierarchy as _Hierarchy on $projection.WBSElementHierarchy = _Hierarchy.WBSElementHierarchy
and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate
{
@Consumption.filter : {mandatory : true , selectionType : #SINGLE, multipleSelections : false }
@ObjectModel.foreignKey.association : '_Hierarchy'
//key hrrp_node.hryid as WBSElementHierarchy,
key cast ( hrrp_node.hryid as wbshierarchy preserving type ) as WBSElementHierarchy,
@ObjectModel.text.association : '_Text'
key hrrp_node.hrynode as HierarchyNode,
@Consumption.filter : {mandatory : true , selectionType : #SINGLE, multipleSelections : false }
key cast (hrrp_node.hryvalto as fis_datbi) as ValidityEndDate,
hrrp_node.parnode as ParentNode,
hrrp_node.hryver as HierarchyVersion,
// @ObjectModel.foreignKey.association : '_WBSElement'
// case nodetype
// when 'L' then substring( hrrp_node.nodevalue, 1, 24 )
// else ''
// end as WBSElement,
@ObjectModel.foreignKey.association : '_WBSElement'
substring( hrrp_node.leafvalue, 1, 24 ) as WBSElement,
hrrp_node.hryseqnbr as HierarchyNodeSequence,
_Text,
_WBSElement,
_Hierarchy
}
where
nodetype <> 'D' and hrytype = '0110'
union all
select from prps
inner join prhi on prhi.posnr = prps.pspnr
association [0..1] to I_WBSElement as _WBSElement on $projection.WBSElement = _WBSElement.WBSElement
association [1..1] to I_WBSElementHierarchy as _Hierarchy on $projection.WBSElementHierarchy = _Hierarchy.WBSElementHierarchy
and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate
association [0..*] to I_WBSElementHierarchyNodeText as _Text on $projection.WBSElementHierarchy = _Text.WBSElementHierarchy
and $projection.HierarchyNode = _Text.HierarchyNode
and $projection.WBSElement = ''
{
@Consumption.filter : {mandatory : true , selectionType : #SINGLE, multipleSelections : false }
@ObjectModel.foreignKey.association : '_Hierarchy'
key 'WBSELEMENTHIERARCHY ' as WBSElementHierarchy,
@ObjectModel.text.association : '_Text'
key prhi.posnr as HierarchyNode,
@Consumption.filter : {mandatory : true , selectionType : #SINGLE, multipleSelections : false }
key '99991231' as ValidityEndDate,
prhi.up as ParentNode,
'000000000000001' as HierarchyVersion,
@ObjectModel.foreignKey.association : '_WBSElement'
prps.posid as WBSElement,
cast ('000000' as hryseqnbr preserving type ) as HierarchyNodeSequence,
_Text,
_WBSElement,
_Hierarchy
}
where
prhi.up is not null
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"HRRP_NODE",
"PRHI",
"PRPS"
],
"ASSOCIATED":
[
"I_WBSELEMENT",
"I_WBSELEMENTHIERARCHY",
"I_WBSELEMENTHIERARCHYNODETEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
I_WBSElementHierarchyNode view