I was facing challenges, while getting activity number and then get all estimation as well child activity in WBS in Project accounting module.
I found found some relation between different tables. you can track them These are SQL server level queries which help me to understand how these relationship works. You can track back these tables in AOT.
select * from SMMACTIVITIES where ACTIVITYNUMBER= ‘SMEM-000356’
select * from HierarchyTreeTable where REFRECID =5637156637
select * from ProjPlanVersion where HIERARCHYTREETABLEREFRECID =5637156638 and HIERARCHYID =’SMEM-00231′