2007 Mar 27 5:28 PM
All,
I am trying to find all nodes for a given profit center. when I use KSH3 transaction, I am able to enter the hierarchy and get to the profit centers. Similarly, I should be able to enter the profit center and derive the nodes above this profit center. I dont want to use G_SET_TREE_IMPORT as this is top-down and takes lot of time.
Could anybody please help me in this regard.
Regards
Kasi
2007 Mar 27 5:31 PM
Hi,
Look at the below function moduels
BX_AGR_READ_ALL_NODES
BX_FAVOS_READ_ALL_NODES
Regards
Sudheer
2007 Mar 27 5:31 PM
Hi,
Look at the below function moduels
BX_AGR_READ_ALL_NODES
BX_FAVOS_READ_ALL_NODES
Regards
Sudheer
2007 Mar 27 5:31 PM
Hi,
1. Use BAPI BAPI_PROFITCENTERGRP_GETDETAIL
2. The table HIERARCHYNODES of the above bapi will return accordingly and you can loop at that and write.
Regards,
Ferry Lianto
2007 Mar 27 7:11 PM
All I know is just the profit center. the FM's you have suggested would work if I know the top node of the profit center. I wanted it bottom up rather than top bottom.
Any response would be much appreciated.
Regards
Kasi
2007 Apr 03 3:57 PM
2007 Jun 19 11:02 AM
hello kasi Murthy,
If you do not mind could you please share that code please.
I need it urgently or if u can email it to me at pank0906@yahoo.com
Many thanks
Pankaj
2007 Jun 19 3:39 PM
Tabele CEPC will have immediate hierarchy one level above profit center. this is CEPC-KHINR. use this KHINR and goto SETNODE-SUBSETNAME = CEPC-KHINR and get the SETNODE-SETNAME which will be 2 levels above the profit center. Use this SETNAME again with SETNODE-SUBSETNAME = SETNODE-SETNAME and get another level up. keep doing this until you get to the top node.
Hope this helps.
Get SET Hierarchy details from CEPC and SETNODE tables
READ TABLE I_CEPC WITH KEY PRCTR = I_GLPCA-RPRCTR.
IF SY-SUBRC = 0.
MOVE I_CEPC-KHINR TO I_PROFIT-KHINR.
READ TABLE I_SETNODE WITH KEY SUBSETNAME = I_CEPC-KHINR.
IF SY-SUBRC = 0.
MOVE I_SETNODE-SETNAME TO I_PROFIT-SETNAME.
ENDIF.
ENDIF.
2007 Jun 19 7:39 PM
hi thanx kasi for your help.
I hope this will take me to the my destination.
regards
Pankaj