Hi,
you can do that with transaction PDN. Launch PDN and then click on the Tabular display button. Open the top node in the hierarchy and with right click you can choose Expand hierarchy. Then you can use the excel export functionality on the ALV table. So not any development is needed.
Best regards
Tamas