Thank you for the script for viewing the hierarchy. But I am still suspicious about the outcome that I am getting after executing the Script. Can you please explain the working of the script? Because there are lots of places where the same stored procedure is called, but its hierarchy is not being displayed. So either the script is having something missing or the script is not 100% correct.
If you can explain me the script, we both can work on it together and make the script work as expected.