Skip to Content
avatar image
Former Member

Org structure hierarchical function module with input as pernr number

Hi experts, I have a requirement to find out the organization structure ie hierarchical function module while input an employee no(pernr no) we need to get reporting manager, reporting manager's superior etc... and employees under the input pernr). Is there a function module that would fit the requirement.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 13, 2017 at 11:43 AM

    Hi Georwill:

    Yes there is a standard FM for this; actually there are plenty but the one I usually refer to us RH_STRUC_GET.

    You use it together with an evaluation path (WEGID) that you have to choose. WEGID are available in table T778A (go to SM30), so you choose carefully the one that best fit your need. Some WEGIDs start from a PERNR as input other from an Organizational Unit, other from other type of OM object.

    You can also make one, but since you ask for this kind of basic HR programing I would recommend go for the standard option.

    For the reporting manager you can use for instance WEGID BOSSONLY Chief of organizational unit starting with the organizational unit of your PERNR, or use first P-S-O Direct organizational assignment of a person starting with PERNR to get the organization unit and then BOSSONLY... or also skip PSO and use P0001-ORGEH field... many options; many threads on this subject out there to help you.

                  act_otype        = "object type you start with
                  act_objid        = "object ID you start with
                  act_wegid        = "your chosen evaluation path
                  act_int_flag     = abap_false
                  act_plvar        = "your active plan variant -> usuario "01"
                  act_begda        = "your validity startdate
                  act_endda        = "your validity enddate
                  text_buffer_fill = abap_true
                  buffer_mode      = abap_true
                  result_struc     = "your result
                  no_plvar_found   = 1
                  no_entry_found   = 2
                  OTHERS           = 3.
    Add comment
    10|10000 characters needed characters exceeded