Showing posts with label hierarchy. Show all posts
Showing posts with label hierarchy. Show all posts

Tuesday, June 17, 2025

Loading hierarchies’ data between InfoObjects

Recently I have developed a BW flow to load hierarchies data from one InfoObject to another.

I have found a SAP documentation that discusses IO 0H_NORESRNO (Display assigned nodes only) usage in such a data transformations. Recommendation here is to do not map this IO at the transformation due to performance. The IO mentioned is present in the Hierarchy Header segment of the transformation. There is also other SAP official help page where the recommendation is opposite (to do a map it to 'X' value using a constant).

The 0H_NORESRNO IO is basically driving a behavior of master data attribute values. Values that are not assigned nodes (attribute values that occur in the attribute table of the InfoObject but not in the hierarchy) are not saved in the hierarchy SID table and do not have to be loaded into memory at runtime.

For me the transformation runtime was better in case that I do not map the mentioned IO.





Friday, July 24, 2020

Populating BW hierarchy description from custom ABAP code

I recently developed a transformation that generates BW hierarchy on top of InfoObject. I did it via hierarchy transformation type – means source object IO was type of hierarchy and target as well. BW transformation that generates the hierarchy used a custom ABAP code. Within that code I populated the tables for the hierarchy like below.

table1: Hierarchy header
table2: Hierarchy header description
table3: Hierarchy data itself – all the nodes and leaves
table4: Texts of hierarchy text nodes
table6: Text of hierarchy text levels


It took me some time to figure out that I have to use table 2 for these kind of BW hierarchy description. Before I was trying to use also table6 but the system just ignored it. Once I adjusted my ABAP code to populate the table2 there was one more error message.

More than one text specified for hierarchy header for language EN
Message No. RH608

This error was caused due to long text that I populated to some of the fields in the table 2. Once I shortened it, it work fine. Note that depending if you are using Start/End routine there will be either result_package_2 or source_package_2 only.

result_package_2 = VALUE #( BASE result_package_2 (
         objectid 
= 0
         langu    
= 'EN'
         txtsh    
= 'Hier1'
         txtmd    
= 'PARENTH1'
         txtlg    
= 'PARENTH1 hier'
         record   
= 1 ) ).

More information:


Sunday, February 2, 2020

BEx QD error: Hierarchy does not exist for InfoObject

BEx Query Designer may show a below error related to in consistent data in SAP BW hierarchy tables.

037(BRAIN) "The hierarchy &2 &3 &4 does not exist for InfoObject &1"

Issue typically lies within table RSRHIEDIR_OLAP. There might be an inconsistent entries in the table exit. Those entries can be fixed with a help of ABAP program RRHI_CORRECT_OSID_KTAB. 

In addition, depending on particular BW version root cause can be completely different. In case there is a hierarchy node variable that is used in the BEx Query and which is bound into hierarchy that does exist in development BW system but it doesn’t exit in target BW system (Q or P) the error may appear. Tricky part here is that simple re-assignment of the variable definition from non existing to existing hierarchy doesn’t help. Only way that solves the issue is to deletion of such hierarchy node variable and its recreation again from the scratch.



More information:

1900360 - BRAIN037 during query execution using a hierarchy with THJ
2177061 - Runtime Error RAISE_EXCEPTION in CL_RRHI_VIRT_HIER_SINGLETON - exception HIERARCHY_NOT_FOUND
2754938 - Enhancement of hierarchy correction report (rsrhiedir_olap)
2433852 - How to repair inconsistent Hierarchies

Wednesday, February 14, 2018

Texts of hierarchies on top of InfoObjects

Normally a database table (ABAP world) in SAP can have its text table. The text table can be created in ABAP workbench t-code like SE11 and there in Goto menu I item called Text Table available. By this a text table will be created. The text data needed for main table is stored in the text table.

Similarly in BW world an InfoObject can have a text table. In t-code RSA1 -> InfoObject section there in tab called Master Data if “With Text” flag is ticked off. This creates a new table (e.g. in naming convention /BIC/T*, where * represents name of the IO).

Similarly in BW hierarchy’s world the texts are stored in table RSTHIERNODE. This is common table for all hierarchies available in particular BW system. By specifying value in field HIEID where a technical ID of hierarchy goes all three text texts (short, medium, long) can be lookup.



Thursday, July 6, 2017

Hierarchy data export - job terminated in source system error

I encounter below issue while exporting hierarchy data from InfoObject to other systems. I had enabled my IO with settings “Characteristics is Export DS” available on Master Data/Texts tab of the IO maintenance screen. This means that characteristic is used as export data source. So its attributes, texts, and hierarchies of the IO can be extracted into other BW systems via Data Mart Interface.


Afterwards I created export DS via doing right click on the IO and choosing menu Additional Functions -> Create Export DataSource. Notice that the export DS for hierarchy are still working in 3.x version fashion. Also the version of such a DS is always only modified and the DS is self is Emulated. Same settings you can observe in t-code RSDS.



I replicated DS in my target system. Once I tried to load the data via InfoPackage there was a following error:

Job terminated in source system -> Request set to red.

There was an ABAP dump associated with the cancelled job. It was saying about termination in ABAP report SAPLRSSG, runtime error was type of SYNTAX_ERROR and error description was like follows:

The current ABAP program "SAPLRSSG" had to be terminated because it has come across a statement that unfortunately cannot be executed.
In include "GP00733D5CMRY7YE3D93SUE852V", in line 34 of program
 "GP00733D5CMRY7YE3D93SUE852", the following syntax errors have occurred:
Field "/BIC/C5DU8_IOname is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.

It was obvious that data element as described wasn’t present in the system and it even wasn’t supposed to be in there.


Actually issue was within method for loading of data. This information for particular DS is stored in table ROOSGEN - Generated Objects for OLTP Source. In my case it was set to T that means transactional RFC but once I corrected it into I (Idoc) my upload worked.



There are few forum posts about this issue in SDN like here and here but solution is not provided within the posts. I hope this blog will be useful for people who face same issue.

Thursday, May 25, 2017

Hierarchy activation syntax error

Recently I faced an error with regards to activate hierarchy related datasource. While trying to do that there was an error:


Syntax error in GP_ERR_RSAPTH3, row 30 (-> long text)



Issue is within data inconsistency for specific hierarchy in table ROOHIECAT. Luckily there are SAP Notes that can solve this issue. After implementing ABAP report ZROOHIECAT_REPAIR and running it for particular hierarchy issue is solved.

To get the ABAP report look for following SAP Notes:

484370 - Syntax error during activation of BW730 HIER data sources
2113639 - Activation of Hierarchy DataSource - GP_ERR_RSAPTH3