10-03-2005 10:49 AM
Hi All,
I want to have all the child org unit no's under a particular Org unit in the oganization structure tree.
Can anyone help me with the function module ?
For example : we have a tree like
A
/ \
B E
/ \ \
C D L
/
M
I should be able to get B, C , D , M , E , L if i am passing orgunit no 'A' to the Function Module.
Thanks in advance.
Mayank
10-03-2005 10:59 AM
Hi Mayank,
You can try searching for function modules with RSTREE.
Sudha
10-03-2005 12:10 PM
Hi Mayank,
There is no standard FM, specific to ur requirements.
n I have created one but rite now I can't give because company policy but I can tell the logic.
There r 2 tables HRP1001 n HRP1000
You create one FM with Object Id as a import parameter and
tree as an output
You have to select the data first from HRP1001 table based on provided Object Id and other where clause.
If sy-subrc = 0.
Then select from HRP1000..
If sy-subrc = 0.
Then u need to call same FM u created again..
We call it recursive functionality to get tree.
I hope, you have got some idea. Inform me if not clear.
Reg,
Arpit
10-03-2005 5:38 PM
Did you try RH_STRUC_GET?
Good Luck,
Suresh Datti
10-03-2005 9:54 PM
You need the PCH logical database
Then define
tables: gdstr, objec.
Select the eavluation path standard O-O_ZDOWN
Last use get objec .This sentence obtain all organizational units of the tree