Hi Anuj,
Yes it would work if you know the orders and which is the superior order for a current order you could reconstruct the whole collective order tree.
Please develop this custom logic with help of your ABAP consultant and if the purpose of this thread is solved, please close the discussion.
Best Regards,
Ameya B.