yup hierarchy framework customization is the way to go. but it is complex for one, and well, I wouldnt recommend it to change a std relationship like the a/b-002, it is more for teh pupose of integrating new objects and relationships,... thats my two pence,....
would suggest you start by copying the sap std hierarchy framework into z-name space and customize that to suit your purpose instead of trying to modify the std one,.. that way you can revert back to the std one quickly if you have to.
cheers