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.
Showing results for 
Search instead for 
Did you mean: 

Displaying output as same as cost element group hirearchy

Former Member
0 Kudos

Hi all

Actually there is one set for cost element groups. I am trying to display a report output , which should mirror the cost element hirearchy. I am facing problem  in implementing the logic to display the output in the same manner as in cost element group.

Because , the cost element group is a tree structure having nodes at different levels and cost element at the lower level.

please help me out with any suggestions that u have.


Developer Advocate
Developer Advocate
0 Kudos

I am not familiar with the cost element hierarchy.  I try to avoid things that even remotely sound financial in nature. However I have faced reports that sounds like they have a similar structure. You didn't say what release you were on. If you are at the 46C or higher you have a few options that aren't too hard to implement.

If I were you, I would look at either an ALV Tree or building a List Tree.  The ALV Tree has many of the advantanges of the ALV Grid combinded with a key hierarchy like a tree. However all nodes on the tree have to have the same line structure. Check out the programs that begin CBALV_TREE* for many good examples.

Now if you need different line structures at different node levels, you probably want to look at a list tree or a column tree.  I suggest looking at the tree model classes. They provide extra functionality such as Print and Find functions that the cl_gui_tree* classes lack. They also have an easier node key structure. Check out programs SAPCOLUMN_TREE_MODEL_DEMO or SAPTLIST_TREE_MODEL_DEMO for good examples.