FAC_GLACCOUNTHIERNODE

DDL: FAC_GLACCOUNTHIERNODE SQL: FACGLHIERN Type: view

GL Account Hierarchy Node

FAC_GLACCOUNTHIERNODE is a CDS View that provides data about "GL Account Hierarchy Node" in SAP S/4HANA. It reads from 1 data source (hrrp_node_n) and exposes 9 fields with key fields UniversalHierHierarchyID, ChartOfAccounts, HierarchyNode, ParentNode, ValidityEndDate. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
hrrp_node_n hrrp_node_n from

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_GLAccountText _GLAccountText $projection.ChartOfAccounts = _GLAccountText.ChartOfAccounts and $projection.GLAccount = _GLAccountText.GLAccount
[0..1] I_ChartOfAccounts _ChartOfAccounts $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName FACGLHIERN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label GL Account Hierarchy Node view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
Search.searchable true view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY UniversalHierHierarchyID hrrp_node_n hryid
KEY ChartOfAccounts hrrp_node_n ktopl
KEY HierarchyNode hrrp_node_n hrynode
KEY ParentNode hrrp_node_n parnode
KEY ValidityEndDate
ValidityStartDate
NodeType nodetype
_GLAccountText _GLAccountText
_ChartOfAccounts _ChartOfAccounts
@AbapCatalog.sqlViewName: 'FACGLHIERN'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'GL Account Hierarchy Node'
@ObjectModel: {usageType: {
  dataClass: #MASTER,
  serviceQuality: #A,
  sizeCategory: #XL}
}
@Search.searchable: true

define view FAC_GLACCOUNTHIERNODE
  as select from hrrp_node_n
  //      inner join hrrp_directory  as _Hierarchy       on  hrrp_node.hryid = _Hierarchy.hryid

  //                                                     and hrrp_node.hryver     = _Hierarchy.hryver

  //                                                    and hrrp_node.hryvalto     = _Hierarchy.hryvalto

  //                                                     and _Hierarchy.hrytyp = '0101'


  association [0..*] to I_GLAccountText             as _GLAccountText               on  $projection.ChartOfAccounts = _GLAccountText.ChartOfAccounts
                                                                                    and $projection.GLAccount       = _GLAccountText.GLAccount

  association [0..1] to I_ChartOfAccounts            as _ChartOfAccounts            on  $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts

{
         @Search.defaultSearchElement:true
  key    hrrp_node_n.hryid                                         as UniversalHierHierarchyID,

         @ObjectModel.foreignKey.association: '_ChartOfAccounts'
  key    hrrp_node_n.ktopl                                         as ChartOfAccounts,

  key    hrrp_node_n.hrynode                                       as HierarchyNode,

  key    hrrp_node_n.parnode                                       as ParentNode,

  key    cast(hrrp_node_n.hryvalto as fis_datbi preserving type )  as ValidityEndDate,

         cast(hrrp_node_n.hryvalfrom as fis_datab preserving type) as ValidityStartDate,
         nodetype                                                  as NodeType,

         @ObjectModel.text.association: '_GLAccountText'
         case nodetype
           when 'L' then  saknr
           when 'D' then  saknr
           else  '' end                     as GLAccount,

         _GLAccountText,
         _ChartOfAccounts
}
where
  (
       nodetype = 'D'
    or nodetype = 'L'
  )
  //add

  and  hrytyp   = 'FSVN';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"HRRP_NODE_N"
],
"ASSOCIATED":
[
"I_CHARTOFACCOUNTS",
"I_GLACCOUNTTEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/