Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
jaigupta
Product and Topic Expert
Product and Topic Expert
0 Kudos

2024-01-11_15-25-41.gif

 jaigupta_28-1706645486008.png

 

Introduction

This blog is part of the blog series mentioned below:

  1. An Introduction to Hierarchy with Directory 
  2. Modeling a basic Hierarchy with Directory
  3. Modeling an advanced Hierarchy with Directory
  4. Guide:Create SAP S/4HANA External GL Account Hierarchy within SAP Datasphere through Community Conte...
  5. Walkthrough of different Enterprise Scenarios via Community Content package – GL Account External Hi...
  6. Explanation of Community Content Package - GL Account External Hierarchy via Replication Flow(Current Blog)

In the current blog, I will explain the different data entities which gets imported via the community content package, GL Account External Hierarchy with Replication Flow, as explained in the fourth blog of this series. 

This blog is intended for expert end-users who are interested in gaining the in-depth understanding beneath the community content package for the following reasons.

  • Future enhancements to the community content packages.
  • Use of other hierarchies than present in the community content packages.
  • A general interest in knowing the inner workings of the community content packages.

Overview

Before I start, PFB the list of data entities which gets imported via community content package, GL Account External Hierarchy with Replication Flow.

 

Number

Purpose

Technical Name

Business name

1

GL Account Hierarchy Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHY

HRF: G/L Account Hierarchy Directory (LT)

1

GL Account Hierarchy Dimension View

SAP_CC_FI_HRF_GLAccountHierDir

HRF: G/L Account Hierarchy Directory (DIM)

1

GL Account Hierarchy Text Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYTEXT

HRF: G/L Account Hierarchy Directory  - Text (LT)

1

GL Account Hierarchy Text View

SAP_CC_FI_HRF_IL_T_GLAccountHierDir

HRF: G/L Account Hierarchy Directory - Text (IL)

2

GL Account Hierarchy Node Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYNODE

HRF: G/L Account Hierarchy Node (LT)

2

GL Account Hierarchy Node Dimension View

SAP_CC_FI_HRF_GLAccountHierNode

HRF: G/L Account Group (Hierarchy Node) (DIM)

2

GL Account Hierarchy Node Text Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYNODET

HRF: G/L Account Hierarchy Node - Text (LT)

2

GL Account Hierarchy Node Text View

SAP_CC_FI_HRF_IL_T_GLAccountHierNode

HRF: G/L Account Group (Hierarchy Node) - Text (IL)

3

GL Account External Hierarchy Directory

SAP_CC_FI_HRF_GLAccountHierarchyView

HRF: G/L Account Hierarchy (Hierarchy with Directory)

2,3

GL Account Hierarchy Node View

SAP_CC_FI_HRF_IL_H_GLAccountHierNode

HRF: G/L Account Hierarchy Node (IL)

5

GL Account Master Data Dimension view

SAP_CC_FI_HRF_GLAccount

HRF: G/L Account (DIM)

5

GL Account Master Data Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTINCHARTOFACCOUNTS

HRF: G/L Account - Attr (LT)

4

GL Account Master Data Text View

SAP_CC_FI_HRF_IL_T_GLAccount

HRF: G/L Account - Text (IL)

4

GL Account Master Data Text Local Table

SAP_CC_FI_HRF_IL_I_GLACCOUNTTEXTRAWDATA

HRF: G/L Account - Text (LT)

Table 1: List of Data Entities

Here, for each value as mentioned in the column ‘Number’ in Table 1, we can see a relevant data entity in the SAP Datasphere as shown below in the lineage diagram.

jaigupta_0-1707162651564.png

Fig 1: GL Account Lineage Diagram

Logically, it would like something as shown below:

jaigupta_1-1707162651570.png

Fig 2: GL Account External Hierarchy Logical Diagram

 

GL Account Hierarchy Dimension View - HRF: G/L Account Hierarchy Directory (DIM) , SAP_CC_FI_HRF_GLAccountHierDir

This entity is used to obtain a list of available hierarchies created for GL Account from the source SAP S4/HANA system, as shown below. 

jaigupta_1-1706641224772.png

Fig 3: GL Account Hierarchy Dimension View

Besides, it also has a validity time interval making the hierarchies time dependent. This works in conjunction with Reference Date variable in Analytic Model. If this variable is not used, then the hierarchies are filtered with respect to current date.

Further, this view gets data from the Local table - HRF: G/L Account Hierarchy Directory (LT) , SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHY which is based on the ABAP CDS View - I_GLACCOUNTHIERARCHY, as shown from the lineage diagram below.

jaigupta_2-1706641224775.png

Fig 4: GL Account Hierarchy View Lineage Diagram

Also, it has a text association to the entity GL Account Hierarchy Text View - HRF: G/L Account Hierarchy Directory - Text (IL), SAP_CC_FI_HRF_IL_T_GLAccountHierDir. The mapped columns used in association are shown below.

jaigupta_3-1706641224778.png

Fig 5: GL Account Hierarchy View Association

Here,association is used to fetch the language and time dependent hierarchy descriptions/texts, as shown below. For language dependent texts, default Language is picked from the default language setting in the SAP Datasphere user account.

jaigupta_4-1706641224784.png

Fig 6: GL Account Hierarchy Text View 

Further, it gets data from the Local table - HRF: G/L Account Hierarchy Directory  - Text (LT), SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYTEXT which is based on the ABAP CDS View - I_GLACCOUNTHIERARCHYTEXT.

 

GL Account Hierarchy Node View  - HRF: G/L Account Group (Hierarchy Node) (DIM),   SAP_CC_FI_HRF_GLAccountHierNode

This entity contains nodes information pertaining to the different GL Account Hierarchies, as shown below. Also,this have validity intervals making it time dependent.

jaigupta_5-1706641224791.png

Fig 7: GL Account Hierarchy Node View

Further, from the Lineage diagram shown below, it can be inferred that this view is built on top of intermediate view HRF: G/L Account Hierarchy Node (IL), SAP_CC_FI_HRF_IL_H_GLAccountHierNode and the intermediate view gets data from the Local table -HRF: G/L Account Hierarchy Node (LT), SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYNODEwhich is based on the ABAP CDS View- I_GLACCOUNTHIERARCHYNODE.

jaigupta_6-1706641224793.png

Fig 8: GL Account Hierarchy Node View Lineage

Moreover, as shown in the lineage diagram, the intermediate view is also shared with the data entity GL Account External Hierarchy Directory - HRF: G/L Account Hierarchy (Hierarchy with Directory), SAP_CC_FI_HRF_GLAccountHierarchyView for reuse purpose.

Further, in this intermediate view, we have 2 calculated columns - NodeID and Hierarchy Name, as explained below. 

  • In NodeID, when Node Type value is ‘L’ i.e. leaf Node, then GL Account and Chart of Accounts are concatenated else for all other Node Type values column HierarchyNode is used, as shown below. We need these intermediate calculations, so they can be used later within GL Account External Hierarchy to get the data in the desired format.

jaigupta_7-1706641224795.png

Fig 9: Node ID Formula

  • Calculated Column Hierarchy name is a duplicate of GLAccountHierarchy column. We create this duplicate as currently we can't use same column in the Hierarchy With Directory Settings pop up when building an External Hierarchy in SAP Datasphere, which will be explained in the next section about GL Account External Hierarchy entity.

jaigupta_8-1706641224797.png

Fig 10: HIERNAME Formula

Also, from the lineage diagram, it can be inferred that it has a text association to the entity GL Account Hierarchy Node Text view - HRF: G/L Account Group (Hierarchy Node) - Text (IL), SAP_CC_FI_HRF_IL_T_GLAccountHierNode which gets data from the Local table - HRF: G/L Account Hierarchy Node - Text (LT), SAP_CC_FI_HRF_IL_I_GLACCOUNTHIERARCHYNODET based on the ABAP CDS View - I_GLACCOUNTHIERARCHYNODET.

For association, the mapped columns are shown below.

jaigupta_9-1706641224799.png

Fig 11: GL Account Hierarchy Node Association

Here, association is used to fetch the language-dependent and time-dependent hierarchy node descriptions/texts.  

jaigupta_10-1706641224806.png

Fig 12: GL Account Hierarchy Node Text view

 

GL Account External Hierarchy View - HRF: G/L Account Hierarchy (Hierarchy with Directory), SAP_CC_FI_HRF_GLAccountHierarchyView

This is the main data entity representing the SAP S/4HANA GL Account External Hierarchy within SAP Datasphere.

jaigupta_11-1706641224810.png

Fig 13: GL Account External Hierarchy View

Here, when you click on the Hierarchy with Directory settings button, below dialog will open. 

jaigupta_12-1706641224813.png

Fig 14: Hierarchy With Directory Settings Pop up

Here, we specify details of Parent, Child, Hierarchy Name Column, Node Type fields etc. to build the External Hierarchy using the views we discussed in the previous section.

For the community content we have mapped them to columns ParentNode, Node ID, Hierarchy Name, NodeType respectively coming from the source view GL Account Hierarchy Node - HRF: G/L Account Group (Hierarchy Node) (DIM), SAP_CC_FI_HRF_GLAccountHierNode.  This is the same intermediate view which we discussed in the previous section.

Here, please note that we are using calculated column Hierarchy Name for the field 'Hierarchy Name Column' which is a duplicate of column GLAccountHierarchy as mentioned in the previous data entity section. We need this because the original column GLAccountHierarchy is being used within the Node Type value section for Node Type values 'R' and 'N'  and can't be reused in the field 'Hierarchy Name Column'. 

Then, for 'Hierarchy Directory Entry' mapping we are using the view GL Account Hierarchy - HRF: G/L Account Hierarchy Directory (DIM), SAP_CC_FI_HRF_GLAccountHierDir. This is needed to fetch the valid hierarchy names for the external hierarchy. 

Further, for “NodeType”, we have following values coming from SAP S/4HANA:

  • L - Leaf Node
  • N - Parent Node
  • R - Root Node

Here, each node represents a hierarchy level, and we can use them to show the desired information as mentioned below.

Node Value - L (Leaf Node)

For leaf node, Chart of Accounts and GL Account serve as key in our External Hierarchy. Also, checkbox Set as leaf needs to be explicitly checked to make this hierarchy level as leaf node.

jaigupta_13-1706641224816.png

jaigupta_14-1706641224818.png

Fig 15: Node Type L i.e. 'Leaf Node'

Node Value – N (Member Node) and R (Root Node)

For both node values N and R, columns GLAccountHierarchy and Hierarchy Node are used to get the unique values..

jaigupta_15-1706641224822.png

Fig 16: Node Type N i.e. ' Intermediate/ Member Node'

jaigupta_16-1706641224825.png

Fig 17: Node Type R i.e. 'Root Node'

jaigupta_17-1706641224827.png

Fig 18: Node Type 'N' and 'R'  Data Preview

From the lineage diagram shown below, its source is intermediate view HRF: G/L Account Hierarchy Node (IL), SAP_CC_FI_HRF_IL_H_GLAccountHierNode with is also shared with the data entity - HRF: G/L Account Group (Hierarchy Node) (DIM), SAP_CC_FI_HRF_GLAccountHierNode, which we have already discussed in the previous data entity section.

jaigupta_18-1706641224831.png

Fig 19: GL Account External Hierarchy Lineage

Further, It has two associations, as shown below.

jaigupta_19-1706641224833.png

Fig 20: GL Account External Hierarchy Associations

  • GL Account Hierarchy - HRF: G/L Account Hierarchy Directory (DIM), SAP_CC_FI_HRF_GLAccountHierDir - This is the first data entity that we discussed and is used here to provide the valid Hierarchies names for building the GL Account External hierarchy.

jaigupta_20-1706641224836.png

Fig 21: Association 1

  • GL Account Hierarchy Node - HRF: G/L Account Group (Hierarchy Node) (DIM), SAP_CC_FI_HRF_GLAccountHierNode - This is the second data entity that we discussed and is used here to provide the valid Hierarchies Node information for building the GL Account External hierarchy.

jaigupta_21-1706641224839.png

Fig 22: Association 2

Further, these associations are required to build a link between the different Hierarchy data entities to realize the External Hierarchy within SAP Datasphere. 

 

GL Account Dimension - HRF: G/L Account (DIM), SAP_CC_FI_HRF_GLAccount

This data entity is used to provide a Master data view for the GL Account. It is used for association with GL Account Line Item Fact to make the GL Account External Hierarchy feature available for use within Analytic Model.

jaigupta_22-1706641224848.png

Fig 23: GL Account Master Data Dimension

Further, it has a compounded key on columns - ChartofAccounts and GL Account, as shown below.

jaigupta_23-1706641224851.png

Fig 24: Compounded Key

From the lineage diagram shown below, its source is a local table - HRF: G/L Account - Attr (LT) , SAP_CC_FI_HRF_IL_I_GLACCOUNTINCHARTOFACCOUNTS which get data from the ABAP CDS View - I_GLACCOUNTINCHARTOFACCOUNTS.

jaigupta_24-1706641224861.png

Fig 25: GL Account Master Data Dimension Lineage

Further, it has associations with GL Account External Hierarchy and GL Account Text, as shown below.

jaigupta_25-1706641224863.png

Fig 26: GL Account Master Data Associations

  • GL Account Master Data Text - HRF: G/L Account - Text (IL), SAP_CC_FI_H_IL_T_GLAccount - This is a text association and provides texts for the GL Account Master data. Further, this view gets data from the local table HRF: G/L Account - Text (LT), SAP_CC_FI_HRF_IL_I_GLACCOUNTTEXTRAWDATA via CDS view I_GLACCOUNTTEXTRAWDATA.

jaigupta_26-1706641224866.png

Fig 27:  Association 1

  •   GL Account External Hierarchy - HRF: G/L Account Hierarchy (Hierarchy with Directory), SAP_CC_FI_HRF_GLAccountHierarchyView - This is the data entity mentioned in the previous step. Here, we use new association type, Hierarchy with Directory association, to attach the GL Account External Hierarchy to the GL Account Master Data.

jaigupta_27-1706641224869.png

Fig 28: Association 2

Summary

Here, I provided you with the information about the different data entities which becomes available once we import the CSN of GL Account Master data dimension from the community content portal.

Also, we looked into some of the relevant objects in detail and understood how they help us in achieving the External Hierarchy Directory feature for GL Account within Datasphere.

Thanks for reading! I hope you find this blog helpful. For any questions or feedback just leave a comment.

Best wishes,
Jai Gupta

jaigupta_28-1706645486008.png

Find more information and related blog posts on the topic page for SAP Datasphere .