C_GLAccountHierarchyNode

DDL: C_GLACCOUNTHIERARCHYNODE SQL: CFIGLACCOUNTHN Type: view CONSUMPTION

API GL Acccount Hierarchy Node

C_GLAccountHierarchyNode is a Consumption CDS View that provides data about "API GL Acccount Hierarchy Node" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountHierarchy, I_GLAccountHierarchyNode) and exposes 15 fields with key fields GLAccountHierarchy, HierarchyNode, ValidityEndDate. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_GLAccountHierarchy _Hierarchy inner
I_GLAccountHierarchyNode _Node from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_GLAcctHierNodeSemanticTag _SemanticTag _SemanticTag.GLAccountHierarchy = _Node.GLAccountHierarchy and _SemanticTag.HierarchyNode = _Node.HierarchyNode and _SemanticTag.ValidityEndDate = _Node.ValidityEndDate and ( _SemanticTag.SemanticTag = 'ASSET' or _SemanticTag.SemanticTag = 'LIAB_EQUIT' )
[0..*] C_GLAccountHierarchyNodeT _Text $projection.GLAccountHierarchy = _Text.GLAccountHierarchy and $projection.HierarchyNode = _Text.HierarchyNode and $projection.ValidityEndDate = _Text.ValidityEndDate and $projection.GLAccount = ''

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CFIGLACCOUNTHN view
ClientHandling.type #CLIENT_DEPENDENT view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label API GL Acccount Hierarchy Node view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY GLAccountHierarchy I_GLAccountHierarchyNode GLAccountHierarchy
KEY HierarchyNode I_GLAccountHierarchyNode HierarchyNode
KEY ValidityEndDate I_GLAccountHierarchyNode ValidityEndDate
ParentNode ParentNode
HierarchyVersion HierarchyVersion
ValidityStartDate I_GLAccountHierarchyNode ValidityStartDate
ChartOfAccounts ChartOfAccounts
GLAccount GLAccount
SequenceNumber SequenceNumber
HierarchyNodeSequence HierarchyNodeSequence
HierarchyNodeLevel HierarchyNodeLevel
NodeType I_GLAccountHierarchyNode NodeType
SemanticTag _SemanticTag SemanticTag
_Text _Text
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
@AbapCatalog.sqlViewName: 'CFIGLACCOUNTHN'
@ClientHandling.type: #CLIENT_DEPENDENT
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType:  #CONSUMPTION

@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'API GL Acccount Hierarchy Node'

@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED

define view C_GLAccountHierarchyNode
  as select from    I_GLAccountHierarchyNode as _Node

    inner join      I_GLAccountHierarchy     as _Hierarchy  on  _Node.GLAccountHierarchy = _Hierarchy.GLAccountHierarchy
                                                            and _Node.ValidityEndDate    = _Hierarchy.ValidityEndDate // Hierarchy directory and hierarchy nodes have the same time slice


    
  association [0..1] to I_GLAcctHierNodeSemanticTag as _SemanticTag on  _SemanticTag.GLAccountHierarchy = _Node.GLAccountHierarchy
                                                                    and _SemanticTag.HierarchyNode      = _Node.HierarchyNode
                                                                    and _SemanticTag.ValidityEndDate    = _Node.ValidityEndDate
                                                                    and (
                                                                       _SemanticTag.SemanticTag         = 'ASSET'
                                                                       or _SemanticTag.SemanticTag      = 'LIAB_EQUIT'
                                                                       //                                                                       or _SemanticTag.SemanticTag      = 'REVENUE'

                                                                       //                                                                       or _SemanticTag.SemanticTag      = 'COST'

                                                                     )

  association [0..*] to C_GLAccountHierarchyNodeT   as _Text        on  $projection.GLAccountHierarchy = _Text.GLAccountHierarchy
                                                                    and $projection.HierarchyNode      = _Text.HierarchyNode
                                                                    and $projection.ValidityEndDate    = _Text.ValidityEndDate
                                                                    and $projection.GLAccount          = '' // just to show that this association is only to be followed if GLAcount is blank


{
      //I_GLAccountHierarchyNode

  key _Node.GLAccountHierarchy,
  key _Node.HierarchyNode,
  key _Node.ValidityEndDate,
      ParentNode,
      HierarchyVersion,
      _Node.ValidityStartDate,
      ChartOfAccounts,
      GLAccount,
      SequenceNumber,
      HierarchyNodeSequence,
      HierarchyNodeLevel,
      _Node.NodeType,
      _SemanticTag.SemanticTag            as SemanticTag,

      case _SemanticTag.SemanticTag
        when 'ASSET'          then 'AST'
        when 'LIAB_EQUIT'     then 'LEQ'
        else
          case _Node.SignIsInverted
            when 'X'          then 'INC'
            else                   'EXP'
          end
      end                                 as SACAccountType,
      
      case _Node.SignIsInverted
        when 'X'              then -1
        else                        1
      end                                as SignFlipFactor,

      /* Associations */
      _Text,
      _GLAccountInChartOfAccounts
      
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTHIERARCHY",
"I_GLACCOUNTHIERARCHYNODE",
"I_GLACCTHIERNODESEMANTICTAG"
],
"ASSOCIATED":
[
"C_GLACCOUNTHIERARCHYNODET",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCTHIERNODESEMANTICTAG"
],
"BASE":
[
"I_GLACCOUNTHIERARCHYNODE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/