HI Benjamin,
You could certainly run queries for each level, using output from level 1 as input to level 2, etc.
Having said that, I think SAP provides easier ways - and I'm always for the easiest way to get the job done. :)
For example, t-code CS12. They may also have a BAPI or FM for the same. Here's a link with some ideas:
https://archive.sap.com/discussions/thread/1972455 Hope that gives you some ideas.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle North America
------------------------------