Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to merge hierarchies in SAP BW

oueslati_anis
Participant
0 Kudos

Hello,

I have a requirement, I have to merge tow hierarchies in SAP BW comming from different sources, can any one give me a hint ?

Kind Regards

Anis

1 ACCEPTED SOLUTION

matt
Active Contributor

I did this by writing a program. The starting point is function module RSNDI_SHIE_STRUCTURE_GETn, where n is the highest number of this function module in your system.

The end points is function modules RSNDI_SHIE_STRUCTURE_UPDATEn and RSNDI_SHIE_ACTIVATE.

You should also consider methods copy and check_and_activate of the class cl_rssh_hierarchy_func.

5 REPLIES 5

matt
Active Contributor

I did this by writing a program. The starting point is function module RSNDI_SHIE_STRUCTURE_GETn, where n is the highest number of this function module in your system.

The end points is function modules RSNDI_SHIE_STRUCTURE_UPDATEn and RSNDI_SHIE_ACTIVATE.

You should also consider methods copy and check_and_activate of the class cl_rssh_hierarchy_func.

0 Kudos

Do you have the source code of the program, I am interested .

Kind Regards

matt
Active Contributor

The source code doesn't belong to me - it belongs to my client.

oueslati_anis
Participant
0 Kudos

Hello,

I have tried loading the hierarchies one by one to a DSO and merging them to the existing one in DSO, the problem is that my example works for small hierachies but when it comes to big ones it does not generate the good child_id, next_id or parent_id, is there any way to calculate these fields automaticly while merging the hierarchies ?

I apreciate your help.

Kind Regards

oueslati_anis
Participant
0 Kudos

Hello Methiew,

I have done this using an other method if this is interesting for you, the key for this is to save the name of the parent, first child and next_id in the DSO before changing the ID of the node it self, once we change the id to add other hierarchies, we get the new ID using the name.

Kind Regards