2003 Dec 02 3:17 PM
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.
2003 Dec 02 4:25 PM
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.