Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Link to Content's target Space :

https://wiki.sdn.sap.com/wiki/display/BI/Learning+Map+by+Topic

Applies to:

SAP Netweaver BW 7.0.

Summary

This wiki gives user an overview of hierarchy and all the basic details about the hierarchy nodes. 

Author(s): Vikrant Mahajan  

 
Company:     Infosys Ltd
Created on:   1/17/2012
Author(s) Bio
Vikrant Mahajan is working at Infosys Ltd and has worked on various implementation projects. He has a rich experience in SAP BW 7.0.

Introduction

In SAP BW there are different options for modeling hierarchical structures. Which modeling is better suited depends on the individual case. The modeling types differ, for example, with regard to the type of data stored in the source system, the performance, the authorization check, the use of aggregates, or whether parameters can be set.

Functions in the hierarchy

1} Creating hierarchies

      We can create characteristic hierarchies in your BW system.

2} Editing hierarchies

      In the hierarchy maintenance for the BW system, we can change, copy, delete hierarchy attributes in characteristic hierarchies.

3} Loading hierarchies

     Wecan load hierarchies into BW system.

4} Activating hierarchies

     To use hierarchies at reporting level we need to activate them

List of Useful Tables for Hierarchy

K table - Hierarchy SID table
This K table has following fields:-

  • SID for hierarchy ID
  • Info Object type of node
  • Name of hierarchy node
  • Link number
  • SID of node within hierarchy  

I table - Hierarchy structure table
This I table has following fields:-

  •  SID for hierarchy ID
  • Master data ID
  • Internal ID for node type
  • Level of hierarchy node

RSTHIERNODE - Texts of Non-Postable Hierarchy Nodes
RSEHIERNODE - Master Data: Hierarchy Nodes that Cannot Be Posted To

RSMHIERNODE - Master data: Hierarchy nodes that cannot be posted to

RSHIEDIR - Hierarchy Catalog

RSHIEDIRT - Hierarchy directory texts

RSREQHIER - Data Request hierarchy

RSROLEHIERARCHY - Role hierarchy

Use of  Hierarchy tables while creating a Program to get hierarchy details

In many situation there is always a need to get all the hierarchy details created on particular Info Object. We can use RSH1 to see all hierarchies in system. But we can make use of hierarchy tables to write a program which will give all the details of all hierarchies created on particular Info Object.

Scenario:

 Suppose a developer wishes to see all the hierarchy details created on 0PLANT. Then using simple SELECT statements we can get all the details of hierarchy created on 0PLANT.

SELECT  HIEID NODEID NODENAME TLEVEL PARENTID CHILDID NEXTID
  FROM (K table of 0PLANT)
  INTO CORRESPONDING FIELDS OF TABLE (internal table)
  WHERE IOBJNM = 0PLANT
    AND OBJVERS = 'A'.

 SELECT RSHIEDIR~HIEID RSHIEDIR~HIENM RSMHIERNODE~NODENAME
                 RSHIEDIR~MAXNODEID RSHIEDIR~NUMBERLEVEL
                 RSHIEDIRT~TXTSH RSHIEDIRT~TXTMD RSHIEDIRT~TXTLG
            INTO CORRESPONDING FIELDS OF TABLE IT_DISPLAY
            FROM ( ( RSHIEDIR JOIN RSMHIERNODE ON RSHIEDIR~HIEID = RSMHIERNODE~HIEID )
                JOIN RSHIEDIRT ON RSHIEDIR~HIEID = RSHIEDIRT~HIEID )
            FOR ALL ENTRIES IN IT_RSHIEDIR
            WHERE RSHIEDIR~HIEID = IT_RSHIEDIR-HIEID.

 These will give us all the necessary details for hierarchy created on 0PLANT. Here HIEID is an important key.

Related Content

help.sap.com

sdn.sap.com