FINCS_UH_COUNTRYKEYNODE

DDL: FINCS_UH_COUNTRYKEYNODE Type: view

Universal Hierarchy Country/Region Node

FINCS_UH_COUNTRYKEYNODE is a CDS View that provides data about "Universal Hierarchy Country/Region Node" in SAP S/4HANA. It reads from 3 data sources (uhdt_node, uhdt_ntxt, uhdt_vrsn) and exposes 11 fields with key field NodeId. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
uhdt_node node from
uhdt_ntxt ntxt left_outer
uhdt_vrsn version inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] fac_cds_uh_version to_version $projection.VersionId = to_version.VersionId

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName FINCS_UH_CS14N view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
EndUserText.label Universal Hierarchy Country/Region Node view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY NodeId uhdt_node node_id
VersionId uhdt_node ver_id
HierarchyId uhdt_vrsn hier_hid
VersionNumber uhdt_vrsn ver_nbr
VersionMessage uhdt_vrsn ver_msg
ValidFrom uhdt_vrsn ver_vldfm
ver_statusendasVersionStatus
node_hvalasncvalendasNodeValue
NodeText uhdt_ntxt lval_txt
node_hvalasnltxtendasNodeValueText
to_version to_version
@AbapCatalog:{
  sqlViewName: 'FINCS_UH_CS14N',
  preserveKey: true,
  compiler.compareFilter: true
  }
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: {
  dataClass: #MIXED,
  serviceQuality: #C,
  sizeCategory: #S
}
@EndUserText.label: 'Universal Hierarchy Country/Region Node'

define view FINCS_UH_COUNTRYKEYNODE
  as select from    uhdt_node as node

    inner join      uhdt_vrsn as version on node.ver_id = version.ver_id

    left outer join 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.ver_id                                                                as VersionId,

      version.hier_hid                                                           as HierarchyId,

      version.ver_nbr                                                            as VersionNumber,

      version.ver_msg                                                            as VersionMessage,

      version.ver_vldfm                                                          as ValidFrom,

      case
      when ( ver_status = 'R' or ver_status = 'A' ) and locked_by = $session.user
      then 'I'
      else version.ver_status end                                                as VersionStatus,

      case node.node_hval
      when '' then cast(node.node_lval as ncval)
      else cast (concat(node.node_lval,concat('~',node.node_hval)) as ncval) end as NodeValue,

      ntxt.lval_txt                                                              as NodeText,
      case node.node_hval
      when '' then case ntxt.lval_txt
                   when '' then cast( node.node_lval as nltxt )
                   else cast( concat( node.node_lval, concat('(',concat( ntxt.lval_txt, ')' ) ) ) as nltxt ) end
      else cast (concat(node.node_lval,concat('~',node.node_hval)) as nltxt) end as NodeValueText,

      to_version
}
where
       version.hier_catg  =  'CS14'
  and(
       node.node_type     =  'N'
    or node.node_type     =  'R'
  )
  and  version.ver_status <> 'T'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"UHDT_NODE",
"UHDT_NTXT",
"UHDT_VRSN"
],
"ASSOCIATED":
[
"FAC_CDS_UH_VERSION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/