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
- 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
- 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)
- 2523709 Shortdump DBSQL_DUPLICATE_KEY_ERROR in RRHI_CORRECT_OSID_KTAB
- 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/
- 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)