Hierarchies are maintained in human resources system in order to establish grouping of employees in an organization based on the position/role. Hierarchies are updated in the system daily through process chain load in SAP BW.
After every hierarchy load, whenever there is an inconsistency in hierarchies an entry is created in SAP standard table, also number range value is increased. Number range is the range value used to check the uniqueness, for hierarchies number range accepts a maximum value of ‘999’.
This white paper provides insight on solving hierarchy activation failure issue with help of custom report program.
Loading hierarachy data is important when maintaining the human resource related information. In a company different hierarchies are maintained such as Director, CEO and so on. Similarly hierarchy data has to be maintained such that a node exists and below which leafs are maintained to form a head – subordinate relationship.
Hierarchy data is loaded in system most often on daily basis so as to ensure proper data. Hierarchy data can be updated using flat file or with R/3 system data. Whenever hierarchy data is loaded into system and if inconsistency is observed then an entry is created in RSRHIEDIR_OLAP(standard SAP table), also for every load ‘NRLEVEL’ value for the field ‘RRHISIDRNG’ in NRIV(standard SAP table) will increased by ‘1’.
2. Business case
Hierachy data are loaded daily along with other HR details. Currently for two objects hierarchy data are loaded in system(SWISSRE process), hence two entries are added daily in the table RSRHIEDIR_OLAP also number range is increased in NRLEVEL daily by ‘2’ values in NRIV table.
On a scenario where NRLEVEL reaches its threshold maximum of ‘999’, it will not accommodate any more entries and this will affect the daily hierarchy activations.
Activation of Organisational Unit fails and there by most of the HR reports will be down. Due to Organisational unit failure, the follow on dependent process chains will be delayed and there by the availability of the reports to all the stakeholders are impacted.
2.1. Solution Design
We create and run a program which checks for the number range value in NRIV table. During program execution it will check for the value and when the value crosses the custom threshold ‘300’ (Changed to 300 so that it will be checked constantly and also to ensure the value doesn’t reach till 900), it will clear all the entries from RSRHIEDIR_OLAP table and will reset the NRLEVEL value back to ’01’.
The custom program will have necessary access to perform read & write operations in SAP standard table. This activity has to be scheduled to run once in three months so that it checks for the NRLEVEL before it exceeds ‘300’.
During the execution, the program checks for number range and when it crosses ‘300’, the program delets table entries from OLAP table also updating the NRLEVEL value back to ’01’ in NRIV table. Incase of the value being less than ‘300’, the program does nothing. On the next run of this program after three months the value will be again checked and the table operations will be performed even before the NRLEVEL reaching ‘999’.