Do you have a column in your table structure that contains the hierarchy level?
On what criteria should the hierarchy be built?
After you got the nodes reference from the ALV_tree you can start adding nodes, basically how you like, but any kind of differentiation is needed to determine where an element shall be placed