Hi There,
I am stuck with a scenario where I need to find the count of direct and indirect reportees to a supervisor.
Here is the scenario
Source table :
EMP SUPERVISOR
Dev Divya
Yukta Dev
Vidya Jason
Ramya Vidya
Anu Vidya
I need to find the count of the direct and indirect reportees as below :
Emp No of reportees (Direct + Indirect)
Vidya 4 ( 3 direct one indirect )
Jason 5 ( 1 Direct 4 indirect )
Devi 1
and so on.
Please help me out with the logic for this.
I am trying to write a recursive loop but it isn't helping.
Let me know if any FM is there for the same.
Thanks,
Satyavrit