Dear Kittu
Lets play with system, assigned the variable you have created in both sections From as well as TO, as i have assigned in the last message screen shot. than check explode function. hope it will work.
and if you want to assigned hierarchy than you have to copy it from account group to cost element group use program RGSCPY50.
Regards
MUR