Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Organization Units in Organization Structure

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hi Mayank,

You can try searching for function modules with RSTREE.

Sudha

Former Member
0 Kudos

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

0 Kudos

Did you try RH_STRUC_GET?

Good Luck,

Suresh Datti

Former Member
0 Kudos

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