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

How to repair Inconsistent Hierarchies

The definition of hierarchies are stored in the so called H-table(see BW Hierarchy Tables). During activation, other tables like the K and I table (used by the query) are filled by using the data of the H table (in addition the BWA index is created if required). Furthermore, during query runtime, the definition is also written into the buffer and Temporary Hierarchy Tables might be created on the data base.

Issues concerning Presentation Hierarchies like wrong query results (or program terminations), can be caused by inconsistent data records in the hierarchy tables and depending objects like the temporary tables..

There are the following possibilties to correct inconsistencies:

  • Hierarchy Activation (in RSH1/RSD1)
    • If you activate a hierarchy(you need at least a dummy change in the text field), the system adapts the K-table and then refills the I-table (with a new SVER); if required, BWA index is created
      • In case aggregates exists (which use the hierarchy), you get a popup that the aggregtes are deactivated (you can also decide to do the activation with the help of a changerun)
      • Since a new SVER is generated, corresponding 02/08 tables and the buffer are invalidated
      • The system only carries out necessayr changes in the K table, a total 'refresh' of the corresponding data records in the K table is not done
  • Special case: Remote Hierarchies
    • For remote hierarchies (in RSD1 - tab Hierarchies - Hierarchy Type: Own Implementation) no entries in the H- or I- table exist. The information normally stored in the H-table is delivered by the hierarchy remote class during runtime. But, the K-table entries get generated upon activation of the remote hierarchy as well. They serve as a buffer and will also only partially be refreshed.
  • Special case: 0INFOPROV and hierarchy INFOAREAHIER
    • as of SAP note 1984939 the report RSR_REPAIR_INFOAREA_HIERARCHY can be used to clean the artificial hierarchy INFOAREAHIER that is for example used in RSA1 or frontend tools to display the InfoArea Tree or in analysis authorization to assign rights to certain InfoProviders
  • Trouble Shooting Reports:  
    • Report RRHI_CORRECT_OSID_KTAB: corrects e.g. problems as described in note 2214027; corrects a large part of possible inconsistencies; it checks the K-table, refills the I-table and invalidates the temporary tables; in case relevant aggregates exist, they need to be refilled 'by hand'; BWA index is rebuilt (if it existed)
    • Report RRINCLTAB_REBUILD: similar to report RRHI_CORRECT_OSID_KTAB but it does not check the K-table
    • Report SAP_DROP_TMPTABLES: deletes the temporary hierarchy tables, see also Temporary Hierarchy Tables

In short, in case of issues with a certain hierarchy, run the report RRHI_CORRECT_OSID_KTAB (as described in note 2214027). Activate the checkbox "Delete old versions (i-Table)" (field DELVER) in the selection screen(see note 2523709) .In contrast to the hierarchy activation, this report has the advantage that the K-table is checked as well. In case relevant aggregates exist, they need to be refilled afterwards.                                                                                                  

  • If you know that 02/08 tables contain incorrect records you can run the report SAP_DROP_TMPTABLES(only with 02/08 flagged, see Temporary Hierarchy Tables). In case the issue persists, the report RRHI_CORRECT_OSID_KTAB should be run as well.
  • In case you know that the I-table is inconsistent, you can also run report RRINCLTAB_REBUILD or activate the hierarchy.
  • In case you want to run the report RRHI_CORRECT_OSID_KTAB for a Remote Hierarchy, you need the coding correction of note 2443311.
  • See also note 2433852  for a list of possible symptoms. As explained in this note the following corrections should be implemented on the system:
    • 2579310 Shortdump SAPSQL_ARRAY_INSERT_DUPREC in hierarchy activation (2)
    • 2497541 Enhancement of hierarchy correction report
    • 2497296 Shortdump DBSQL_DUPLICATE_KEY_ERROR during hierarchy activation

    • 2443311 Repair inconsistent node table entries for remote hierarchies

    • 2423937 Enhancement of the report RRHI_CORRECT_OSID_KTAB
    • 2404302 Inconsistencies in hierarchy node table
    • 2309691 Inconsistency in K table for unassigned nodes
    • 2214027 Correction report for K table
    • 2443311 Repair inconsistent node table entries for remote hierarchies
  •  Missing leaves in /ERP/ hierarchies (or, to synchronize a BW hierarchy with prefix /ERP/ with its ERP definition) is rather a CO-OM topic, see Note 2433659 Refresh buffer for BW hierarchies of InfoObjects with prefix /ERP/            

SAP Notes

  • 2423937 - Enhancement of the report RRHI_CORRECT_OSID_KTAB
  • 2214027 - Correction report for K table
  • 1139396 - Temporary database objects in BW 7.X
  • 2433659 - Refresh buffer for BW hierarchies of InfoObjects with prefix /ERP/
  • 2493403 - HIER: System error in program CL_RRHI_INCL_CREATOR_TID and form _FIND_DOUBLICATES-1-
  • 2635307 - Wrong data in query with hierarchy (CDS only) 
  • No labels

1 Comment

  1. Good information.

    SAP_DROP_TMPTABLES gratefully used for me.

    I have issue an GL account hierarchy data source.

    while executing gl account hierarchy data source in RSA3, I'm unable get GL account numbers and Chart of accounts data in respective columns.

    could you please help me on this.