Skip to Content
author's profile photo Former Member
Former Member


Hi experts,

Is there any function module similar to RH_DIR_ORG_STRUC_GET, which will provide the information of all the sub-ordinate pernrs if the pernr of the chief is given.

If not a function module is there a way to retrieve all the sub-ordinate perns of a supervisor pernr.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 10:05 AM



    check this

    The below code shows how RH_PM_GET_STRUCTURE is used. You pass it an Organisation

    Unit(OBJID) and it will retrieve all the units below it in the org. tree (including idividual personnel). Also

    'RH_DIR_ORG_STRUC_GET' is an alternative but seems to be much slower.

    The OBJECT_TAB table stores all the objects within the org structure zorg_unit (including all sub levels).

    The key for these objects is stored within the 'OTYPE' field. Therefor if you loop through the table you can

    retrive the objects you require.

    i.e. The following code will loop around all the personnel numbers:

    • Loops around personnel numbers within Org. Unit.

    LOOP AT objec_tab where otype = 'P'.

    • Processing....


    data: objec_tab like objec occurs 0 with header line.

    data: zorg_unit type p0001-orgeh.

    data: t_org_tab like rhldapp occurs 0 with header line.

    call function 'RH_PM_GET_STRUCTURE'


    plvar = '01' "p0000-plvar

    otype = 'O' "0001-otype

    objid = zorg_unit

    begda = pn-begda

    endda = pn-endda

    status = '1'

    wegid = 'SBESX'

    77aw_int = ' '


    objec_tab = objec_tab


    not_found = 1

    ppway_not_found = 2

    others = 3.


    Alternative, but very slow*


    • call function 'RH_DIR_ORG_STRUC_GET'

    • exporting

    • act_orgunit = zorg_unit

    • act_plvar = '01'

    • act_date = pn-begda

    • tables

    • org_units = t_org_tab

    • exceptions

    • no_active_plvar = 1

    • others = 2.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.