cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Hierarchy to Flat structure

09-19-2013 1:57 PM
3815 views 5 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

We have a requirement where we want to convert hierarchical structure to a flat structure. e.g. we have a hierarchy master data Org Unit. in transactional data we got a Org Unit A, now i want to have a attributes for this Org Unit which will show the layer of this Org Unit A. In this case if Org Unit is at level 3, then attributes will be Level1, Level2, Level3 and from top node till we navigate it should put values in level1, level2 & level3.

So my data is like

Org Unit Level1 Level2 Level3

A            B        C        A

Is it possible to get with existing data.

Regards,

Ganesh

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

umashankar_poojar
Active Contributor

Hi Ganesh,

         I didn't get requirement clearly, can you please give pictorial representation or with example at report/ in excel?

Thanks,

Umashankar

Former Member
0 Likes

Hi UmaShankar,

Below is something which we are looking for Left Hand side shows hierarchy structure which we are converting to flat one.

Regards,

Ganesh

Answers (3)

Answers (3)

former_member182470
Active Contributor
0 Likes

Hi Ganesh,

This is very much possible. All you need to do is either download data to a Flat File and upload this data to your transaction infoobject by creating separate transformation from this FF to your Infoprovider.

Otherwise, you have to write a ABAP code to flatten your hierarchy in the field routine of your DSO transformation.

There are lot of codes available in SCN. Please search with "Flatten Hierarchy Structure" in google or in SCN search.

Regards,

Suman

MGrob
Active Contributor
0 Likes

Hi

The fastest way is you use this helper: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc44284...

and then upload the flatfile back into a dso. If you add it all in a processchain you can fill the dso with one click and you don't need to abap code it.

If you are on 7.3 you can directly create a transformation from a hierarchy to a dso.

Hope it helps

Martin

RamanKorrapati
Active Contributor
0 Likes

Hi,

For me also unable to understand. if you need to have hierarchy str on flat file format.

With abap program you can download. check the below one.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc44284...

Thanks