I_FINSTMNTEXPANDEDHIERNODE

CDS View

Financial Statement Expanded Hier Node

I_FINSTMNTEXPANDEDHIERNODE is a CDS View in S/4HANA. Financial Statement Expanded Hier Node. It contains 10 fields. 12 CDS views read from this table.

CDS Views using this table (12)

ViewTypeJoinVDMDescription
P_FinStmntHierarchyWithCoCode view from COMPOSITE
P_FinStmntHierarchyWithCoCode view union_all COMPOSITE
P_KZ_DATASELFINSTMNT view from COMPOSITE
P_KZ_DATASELFINSTMNT view union_all COMPOSITE
P_RU_DataSelFinSTMNT view from COMPOSITE
P_RU_DataSelFinSTMNT view union_all COMPOSITE
P_RU_DataSelFinSTMNTV508 view from COMPOSITE
P_RU_DataSelFinSTMNTV508 view union_all COMPOSITE
P_RU_DSFinStmntExpandHierNode view from COMPOSITE
P_RU_DSFinStmntExpandHierNode view union_all COMPOSITE
P_UA_DATASELFINSTMNT view from COMPOSITE
P_UA_DATASELFINSTMNT view union_all COMPOSITE

Fields (10)

KeyField CDS FieldsUsed in Views
KEY FinancialStatementHierarchy FinancialStatementHierarchy 5
KEY HierarchyNode HierarchyNode 1
KEY HierarchyVersion HierarchyVersion 1
KEY ParentNode ParentNode 1
KEY ValidityEndDate ValidityEndDate 1
ChartOfAccounts ChartOfAccounts 2
DebitCreditCode DebitCreditCode 1
FinancialStatementLeafItem FinancialStatementLeafItem 4
FinStatementHierarchyNodeValue FinStatementHierarchyNodeValue 1
GLAccountInfo GLAccountInfo 4
@AbapCatalog.sqlViewName: 'IFISTMNTEXPND'
@VDM.viewType: #COMPOSITE
@ObjectModel: { dataCategory: #HIERARCHY }
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@AbapCatalog.buffering.status: #NOT_ALLOWED
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass:  #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@EndUserText.label: 'Financial Statement Expanded Hier Node'
define view I_FinStmntExpandedHierNode  
  as select from I_FinancialStatementHier as hier
  left outer join R_HierRuntimeRprstnAttrib as source on hier.FinancialStatementHierarchy = source.HierarchyID
                                and hier.ValidityEndDate = source.ValidityEndDate
                                and source.HierarchyAttributeName = 'SOURCE'
                                and ( hier.ValidityEndDate = '99991231' or source.HierAttributeRangeFromVal = 'UH' )                                
  left outer join R_HierRuntimeRprstnNode as node on hier.FinancialStatementHierarchy = node.HierarchyID
                                and hier.ValidityEndDate = node.ValidityEndDate                                
  left outer join R_HierRuntimeRprstnNodeAttrib as attrib on node.HierarchyID = attrib.HierarchyID
                                                         and node.HierarchyVersion = attrib.HierarchyVersion
                               and node.ValidityEndDate = attrib.ValidityEndDate
                               and node.HierarchyNodeClass = attrib.HierarchyNodeClass
                               and node.HierarchyNode = attrib.HierarchyNode
                               and node.ParentNode = attrib.ParentNode
                               and attrib.HierarchyNodeAttributeName = 'SIGN'
                               
  association [0..*] to I_FinancialStatementHierNodeT as _Text            on     $projection.FinancialStatementHierarchy = _Text.FinancialStatementHierarchy
                                 and $projection.ValidityEndDate     = _Text.ValidityEndDate    
                                 and $projection.HierarchyNode = _Text.HierarchyNode
  association [0..*] to I_FinancialStatementHierNodeT as _ParentText           on     $projection.FinancialStatementHierarchy = _ParentText.FinancialStatementHierarchy
                                 and $projection.ValidityEndDate     = _ParentText.ValidityEndDate   
                                 and $projection.HierarchyNode = _ParentText.HierarchyNode
  association [0..1] to I_FinancialStatementHier as _Hierarchy on $projection.FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy
                                                         and $projection.ValidityEndDate     = _Hierarchy.ValidityEndDate
  association [0..1] to I_FinancialStatementLeafItem              as _FinancialStatementLeafItem  on  $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem
  association [0..*] to P_HRRP_NODE_ATTR as _NodeAttribute on  $projection.FinancialStatementHierarchy = _NodeAttribute.HierarchyID
                                                                and $projection.HierarchyVersion      = _NodeAttribute.HierarchyVersion
                                                                and $projection.ValidityEndDate      = _NodeAttribute.ValidityEndDate
                                                                and $projection.ChartOfAccounts      = _NodeAttribute.NodeClass
                                                                and $projection.HierarchyNode      = _NodeAttribute.HierarchyNode
                                                                and $projection.ParentNode      = _NodeAttribute.ParentNode
  {
  
//      @ObjectModel.foreignKey.association: '_Hierarchy'

  key node.HierarchyID                              as FinancialStatementHierarchy,
  key node.HierarchyVersion,
      @ObjectModel.text.association: '_Text'
  key node.HierarchyNode,
      @ObjectModel.text.association: '_ParentText'
  key node.ParentNode,
      @Semantics.businessDate.to: true
  key node.ValidityEndDate,
      node.ValidityStartDate,
      node.HierarchyNodeClass                            as ChartOfAccounts,
      node.NodeType,
      node.HierarchyNodeVal                          as FinStatementHierarchyNodeValue,
      node.DebitCreditCode,

      cast( 
        case when NodeType = 'R' or NodeType = 'N' or NodeType = 'M' 
                or NodeType = 'K' or NodeType = 'A' or NodeType = 'O' then
          node.HierarchyNodeVal
        else ''
      end as ergsl )                               as FinancialStatementItem,
      
      cast( case 
        when NodeType = 'L' or NodeType = 'D' then
          case node.HierarchyNodeClass
            when '' then  concat(HierarchyNodeVal,'F') // Functional Area

            else
                concat(node.HierarchyNodeClass,lpad(HierarchyNodeVal,12,'0'))
          end
        else  ''
      end as hrynode)                              as GLAccountInfo,
      
      case 
        when NodeType = 'L' or NodeType = 'D' then
          case node.HierarchyNodeClass
            when '' then  'F' // Functional Area

            else  'A'
          end
        else  ''
      end                                          as FunctionalAreaIsUsed,

      @ObjectModel.foreignKey.association: '_FinancialStatementLeafItem'
      cast( case 
        when NodeType = 'L' or NodeType = 'D' then
          case node.HierarchyNodeClass
            when '' then  concat(HierarchyNodeVal,'F') // Functional Area

            else
              case DebitCreditCode
                when 'S' then concat(node.HierarchyNodeClass,concat(HierarchyNodeVal,'1A'))
                when 'H' then concat(node.HierarchyNodeClass,concat(HierarchyNodeVal,'2A'))
                else concat(node.HierarchyNodeClass,concat(HierarchyNodeVal,'0A'))
//                when 'S' then concat(node.HierarchyNodeClass,concat(lpad(HierarchyNodeVal,12,'0'),'1A'))

//                when 'H' then concat(node.HierarchyNodeClass,concat(lpad(HierarchyNodeVal,12,'0'),'2A'))

//                else concat(node.HierarchyNodeClass,concat(lpad(HierarchyNodeVal,12,'0'),'0A'))

              end
          end
        else  ''
      end as hrynode)                              as FinancialStatementLeafItem,
      
      SequenceNumber,
//      SequenceNumber as HierarchyNodeSequence,

      HierarchyNodeLevel as HierarchyLevel,
      attrib.HierNodeAttributeRangeFromVal                  as SignIsInverted,

       _Text,
       _ParentText,
       _FinancialStatementLeafItem,
       _Hierarchy
}