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

HR Functions - To find Managers in a Organisation


I'm trying to locate the best functions to use , to find managers in an Organisation.

Not sure if there is just one function or I need to use a few of them togather.

I could get the data using select statements - not sure if this is the best way of doing things.

Many Thanks

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 28, 2008 at 11:30 AM


    There are two way to retrieve the manager based on what you want to retrieve,

    1) If you want to retrieve based on the personnel number, you can use the FM SWX_GET_MANAGER

    2) Say if you want to retrieve it based on the organizational unit, then use the FM "RH_STRUC_GET by passing the below parameters,

    ACT_OTYPE = 'O'

    ACT_OBJID = <Organization unit ID>


    The return internal table RESULT_TAB will have the manager's employee number.

    Hope this helps.



    PS : Reward points for all useful answers.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      Here you go,


      data : i_result type standard table of objec,

      wa_result type objec.

      Call function 'RH_STRUC_GET'


      ACT_OTYPE = 'O'

      ACT_OBJID = PA0001-ORGEH


      ACT_PLVAR = '01'

      ACT_BEGDA = '18000101'

      ACT_ENDDA = '99991231'



      Read table I_RESULT into WA_RESULT with key OTYPE = 'P'.

      if sy-subrc = 0.

      v_manager_name = WA_RESULT-STEXT.



      The above logic will provide you with the name of the manager for the given organization coming for an employee from infotype 0001 i.e. the table PA0001 and fields ORGEH.

      Hope this helps !

      Kind Regards


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.