I_GLAccountHierarchyNode

DDL: I_GLACCOUNTHIERARCHYNODE SQL: IFIGLACCOUNTHN Type: view BASIC

G/L Account Hierarchy Node

I_GLAccountHierarchyNode is a Basic CDS View that provides data about "G/L Account Hierarchy Node" in SAP S/4HANA. It reads from 1 data source (hrrp_node_n) and exposes 18 fields with key fields GLAccountHierarchy, HierarchyNode, ValidityEndDate. It has 4 associations to related views.

SAP Help Documentation

CategoryCDS Views for Master Data
Purpose
This CDS view retrieves hierarchy nodes and G/L accounts included in a financial statement version (FSV), G/L account hierarchy, G/L account group, or cost element group. It helps answer the following business questions: What's the validity timeframe of the hierarchy? Which nodes are included in the hierarchy? What is the node type, inner node or leaf node? Which G/L accounts are included under a node? When displaying in analytical reports, such as in Balance Sheet/Income Statement - Multidimensional , is the +/- sign for totals on node level reversed? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization object assigned: F_UNI_HIER : Universal Hierarchy Access

Structure
Fields used for filtering The main filters are as follows: GLAccountHierarchy : ID of the FSV, G/L account hierarchy, G/L account group, or cost element group. ValidityStartDate : Valid-from date of the hierarchies. ChartOfAccounts : Char of accounts. NodeType : Type of node, for example, R (root node), N (normal node or inner node), and L (leaf node). HierarchyNodeVal : ID of the hierarchy node.

View on SAP Help Portal →

Data Sources (1)

SourceAliasJoin Type
hrrp_node_n hrrp_node_n from

Associations (4)

CardinalityTargetAliasCondition
[0..*] I_GLAccountHierarchyNodeT _Text $projection.GLAccountHierarchy = _Text.GLAccountHierarchy and $projection.HierarchyNode = _Text.HierarchyNode and $projection.GLAccount = ''
[0..1] I_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts and $projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount
[0..1] I_GLAccountHierarchy _Hierarchy $projection.GLAccountHierarchy = _Hierarchy.GLAccountHierarchy and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate
[0..1] I_ChartOfAccounts _ChartOfAccounts $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts

Annotations (15)

NameValueLevelField
EndUserText.label G/L Account Hierarchy Node view
ObjectModel.dataCategory #HIERARCHY view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName IFIGLACCOUNTHN view
ObjectModel.representativeKey HierarchyNode view
Analytics.dataExtraction.enabled true view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.buffering.status #NOT_ALLOWED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #A view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
Consumption.filter.businessDate.at true view
ObjectModel.sapObjectNodeType.name GLAccountHierarchyNode view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY GLAccountHierarchy
KEY HierarchyNode hrrp_node_n hrynode Node
KEY ValidityEndDate
ParentNode hrrp_node_n parnode Par. Node
HierarchyVersion
ValidityStartDate
ChartOfAccounts hrrp_node_n ktopl G/L Chart of Accounts
GLAccount
SequenceNumber
HierarchyNodeSequence hrrp_node_n hryseqnbr Sequence Number
HierarchyNodeLevel hrrp_node_n hrylevel Hierarchy Level
NodeType hrrp_node_n nodetype Object Type
SignIsInverted
HierarchyNodeVal hrrp_node_n nodevalue Value
_Text _Text
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_Hierarchy _Hierarchy
_ChartOfAccounts _ChartOfAccounts

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_GLAccountHierarchyNode.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IFIGLACCOUNTHN

CREATE VIEW I_GLAccountHierarchyNode AS
SELECT
  cast ( hrrp_node_n.hryid_42 as fis_glaccthier preserving type ) AS GLAccountHierarchy,
  hrrp_node_n.hrynode AS HierarchyNode,
  cast(hrrp_node_n.hryvalto as fis_datbi preserving type ) AS ValidityEndDate,
  hrrp_node_n.parnode AS ParentNode,
  cast( '000000000000001' as hryversn ) AS HierarchyVersion,
  cast(hrrp_node_n.hryvalfrom as fis_datab preserving type ) AS ValidityStartDate,
  hrrp_node_n.ktopl AS ChartOfAccounts,
  cast(hrrp_node_n.saknr as fis_saknr preserving type ) AS GLAccount,
  concat(hrrp_node_n.hryseqnbr, hrrp_node_n.hrynode) AS SequenceNumber,
  hrrp_node_n.hryseqnbr AS HierarchyNodeSequence,
  hrrp_node_n.hrylevel AS HierarchyNodeLevel,
  hrrp_node_n.nodetype AS NodeType,
  cast(hrrp_node_n.sign as hryattrvalue ) AS SignIsInverted,
  hrrp_node_n.nodevalue AS HierarchyNodeVal
FROM hrrp_node_n
LEFT OUTER JOIN I_GLAccountHierarchyNodeT AS _Text ON GLAccountHierarchy = _Text.GLAccountHierarchy AND HierarchyNode = _Text.HierarchyNode AND GLAccount = ''  -- association [0..*]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts ON ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts AND GLAccount = _GLAccountInChartOfAccounts.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_GLAccountHierarchy AS _Hierarchy ON GLAccountHierarchy = _Hierarchy.GLAccountHierarchy AND ValidityEndDate = _Hierarchy.ValidityEndDate  -- association [0..1]
LEFT OUTER JOIN I_ChartOfAccounts AS _ChartOfAccounts ON ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts  -- association [0..1]
;