Application Development and Automation 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: 
Read only

Function to find organization unit

0 Likes
2,537

Hi all,

I'd like to know if functions exist in R/3 to find easily an organizational unit in the tree of the relationship between organizational unit.

For example, you have the id of an OU and you need to know the top of the list of this OU in the hierarchical structure (the list of the OU depending between them).

I'd appreciate very much if anyone could provide some help regarding this topic.

Thanks in advance.

Daniel

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,358

Use Function Module RHPH_STRUCTURE_READ with parameters

PLVAR 01

OTYPE 0U (Business Unit) OBJID 50050001 (example)

WEGID Z-0U-O (Custom Eval Path)

BEGDA 12/06/2005

ENDDA 12/06/2005

This will return an internal table of all Orgs under the Business Unit. You should sort the table by SEQNR & get the first Object type O record. Thats your Chief Org Unit for the Business Unit.

8 REPLIES 8
Read only

Former Member
0 Likes
1,359

Use Function Module RHPH_STRUCTURE_READ with parameters

PLVAR 01

OTYPE 0U (Business Unit) OBJID 50050001 (example)

WEGID Z-0U-O (Custom Eval Path)

BEGDA 12/06/2005

ENDDA 12/06/2005

This will return an internal table of all Orgs under the Business Unit. You should sort the table by SEQNR & get the first Object type O record. Thats your Chief Org Unit for the Business Unit.

Read only

0 Likes
1,358

Thanks a lot. Your answer solved my problem.

Read only

Former Member
0 Likes
1,358

Hi,

Try with the FM RH_STRUC_GET

Thanks

Eswar

Read only

Former Member
0 Likes
1,358

Hi Daniel,

Please try the FM HRUS_GET_ADD_ORGDATA.

Hope it helps...

Please reward appropriate points, if it helps

Lokesh

Read only

Former Member
0 Likes
1,358

Hi Daniel,

Also try the FM HR_ECM_GET_EMP_ORGUNIT_REL.

Hope it helps..

Lokesh

Pls. Reward appropriate points

Read only

Former Member
0 Likes
1,358

Hi Daniel,

Also try the FM HR_ECM_CHECK_ORGUNIT_LEADER....

Lokesh

Read only

Former Member
0 Likes
1,358

Hi Daniel,

Try using the fucntion module

<b>RP_PNP_ORGSTRUCTURE</b>.

Pass the endda,begda and PLVAR = '01'.

It will diplay the Org structure in tree format.

Hope this will helpful to you.

Thanks&Regards,

Siri.

Kindly award points if the answer is useful.

Read only

Former Member
0 Likes
1,358

just give the top level hierarchy (setid)

call function 'G_SET_TREE_IMPORT'

exporting

setid = setid

tables

set_values = itab_hierarchy

exceptions

set_not_found = 1

illegal_field_replacement = 2

illegal_table_replacement = 3

others = 4.

but here we will have to filter out the data.

which is easy.

Thanks,

Murali.