cancel
Showing results for 
Search instead for 
Did you mean: 

Looking up BW-Hierarchy with ABAP

Former Member
0 Kudos

Hi,

I have a hierarchy on InfoObject 0COSTELEMNT. In an UR I wand to remove all documents with a cost elements which ate not contained in this hierarchy. Do you know any standard FM or Method allowing to check if an item fulfills the hierarchy conditions. Or you have other ideas for this issue.

Thanks

Wojtek

Accepted Solutions (1)

Accepted Solutions (1)

former_member183777
Active Contributor
0 Kudos

I have used the following code to read Fund Center Hierarchy. Hope it helps:

w_nodebyname-iobjnm = '0FUNDS_CTR'.

w_nodebyname-nodename = '1500157810'.

CALL FUNCTION 'RSNDI_SHIE_STRUCTURE_GET3'

EXPORTING

  • I_S_HIEKEY =

i_s_hiesel = w_hiesel

i_s_subtreesel = w_nodebyname

  • I_T_NODENAME =

  • I_NO_NODENM_TABLE = RS_C_FALSE

IMPORTING

  • E_S_HIEDIR =

e_subrc = lsubrc

TABLES

  • E_T_HIEDIRT =

e_t_hierstruc = fund_hier_157810

  • E_T_MHIERNODE =

  • E_T_THIERNODE =

  • E_T_HIERINTVL =

  • E_T_NODENAMES =

  • E_T_NODEATTR =

  • E_T_LEVEL =

  • E_T_MESSAGE =

.

Thanks

Vineet

Answers (4)

Answers (4)

athavanraja
Active Contributor
0 Kudos

you could use FM RSSH_HIERARCHY_READ to read the hierarchy once .

and read the itab returned by the FM to check whether the Cost element in question exists within the hierarchy,

Regards

Raja

Former Member
0 Kudos

Hello experts, I have a requirement to dynamically add two dynamically add 2 hierarchies from sap ecc  and load them into sap bw 7.x . I'm very new to abap, can anyone tell me how I can get this done? Thanks. John

former_member183777
Active Contributor
0 Kudos

Hi Wojtek,

Looking at your points award, it seems that you were not able to use the solutions posted here.

Please post your solution if you found a better way to do it so that the entire community can benefit.

Thanks

Vineet

Former Member
0 Kudos

Hi Vineet,

I have closed this thread becouse I'v finished work on this topic. My solution is looking direct in the tables.

I had a look in you solution. I thought that this FM is to complex in processing and must be to slow for sequential execution for each record.

Now i had a look again and I think i must not be. And on the other hand, I think there can't be anything alse what is general and faster.

Thanks

Wojtek

Former Member
0 Kudos

Hello Wojtek,

Please check the Function Module RSNDI_SHIE_STRUCTURE_GET.

It may help you.

Regards,

Praveen

Former Member
0 Kudos

Hi,

have a lookup at table: /BI0/HCOSTELMNT (e.g. with ABAP).

/manfred

Former Member
0 Kudos

Hi,

Yes, /BI0/HCOSTELMNT AND /BI0/JCOSTELMNT is a way. But isn't there any standard method (FM, class mathod) ?

Wojciech

Former Member
0 Kudos

Hi,

there are a lot of functionmoduls (> 200) for hierarchies, like e.g. RSAR_HIERARCHY_GET

/manfred

Former Member
0 Kudos

Hi,

I don't need 200 FM, I need only one which will do what i have described. And i'm sure it isn't RSAR_HIERARCHY_GET ;-).

Wojciech

Former Member
0 Kudos

Hi,

don't know, could it be: RSDPW_HIERARCHY_EXISTS ?

/manfred

Former Member
0 Kudos

No, it isn't.

Wojciech