FAC_CDS_UH_STSTCLKEYFIGNODE is a CDS View that provides data about "Universal Hier Stat Key Figure Node" in SAP S/4HANA. It reads from 4 data sources (uhdt_clfd_val, uhdt_node, uhdt_ntxt, uhdt_vrsn) and exposes 14 fields with key field NodeId.
@AbapCatalog.sqlViewName: 'FACV_UH_STKFEDGE'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@ObjectModel.usageType: {
dataClass: #MIXED,
serviceQuality: #C,
sizeCategory: #S
}@AccessControl.authorizationCheck: #CHECK@EndUserText.label: 'Universal Hier Stat Key Figure Node'
defineview FAC_CDS_UH_STSTCLKEYFIGNODE asselectfrom uhdt_node as node
innerjoin uhdt_vrsn as version on node.ver_id = version.ver_id
innerjoin uhdt_clfd_val as clfdvalue on node.ver_id = clfdvalue.obj_id
leftouterjoin uhdt_ntxt as ntxt on node.node_id = ntxt.node_id
and ntxt.lang = $session.system_language
association[1..1] to fac_cds_uh_version as to_version on $projection.VersionId = to_version.VersionId
{
key node.node_id as NodeId,
node.node_type as NodeType,
node.ver_id as VersionId,
version.hier_hid as HierarchyId,
version.ver_nbr as VersionNumber,
version.ver_msg as VersionMessage,
version.ver_vldfm as ValidFrom,
casewhen ( ver_status = 'R' or ver_status = 'A' ) and locked_by = $session.user
thencast ( 'I' as vrsst )
else version.ver_status endas VersionStatus,
cast(node.node_lval as ncval) as NodeValue,
ntxt.lval_txt as NodeText,
casewhen node.node_hval = '' thencasewhen ntxt.lval_txt isnullor ntxt.lval_txt = '' thencast( node.node_lval as nltxt )
elsecast( concat( node.node_lval, concat(' (',concat( ntxt.lval_txt, ')' ) ) ) as nltxt ) endelsecast (concat(node.node_lval,concat('~',node.node_hval)) as nltxt) endas NodeValueText,
case clfdvalue.val_sign
when 'S' thencast( clfdvalue.val_low as cctrl)
when 'R' thencast( concat(clfdvalue.val_low,concat('~',clfdvalue.val_high)) as cctrl)
elsecast( clfdvalue.val_low as cctrl) endas ControllingArea,
cast( upper(ntxt.lval_txt) as nltxt ) as NodeTextUpper,
to_version
}
where version.hier_catg = '0104'
and clfdvalue.fld_name = 'CONTROLLINGAREA'
and (node.node_type = 'N' or node.node_type = 'R' or node.node_type = 'Z')
and version.ver_status <> 'T'
and version.ver_status <> 'B'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"UHDT_CLFD_VAL",
"UHDT_NODE",
"UHDT_NTXT",
"UHDT_VRSN"
],
"ASSOCIATED":
[
"FAC_CDS_UH_VERSION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/