math api to add all children at all levels under parent

Hi

is there any api available to add all children under a parent row even if it is grand or grandgrand child. [=sum] gives only immediate children sum. my requirement is to have sum of children of immediate children n so on recursively. like if hierarchy is like

**************valuesum
a_________________________100_______________200
—b______________________80 _______________ 0
—c______________________20 ______________ 120
------d____________________30 ________________90
---------e__________________40_________________0
---------f__________________50 ________________0

Thanks
Sherry

Built-in summ ability can’t be used in such use-case.
It possible to create a custom solution, which will use onCellChanged event as trigger, iterate through all sub-rows and calculate necessary value.