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

HR fm to calculate employees in org. unit

Hai...

Is ther any fm to calculate the no. of employees in the organization unit.

Also give me example for this fm if possible.

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 09:05 AM

    TRY USING RH_DIR_ORG_STRUC_GET

    IT WILL LIST U ALL THE PERSONNEL NOS THAT ARE THER IN THE ORG UNIT!!

    AND BY DESCRIBING THAT INTERNAL TABLE ..U CAN GET THE COUNT!!

    pLZ REWARD POINTS IF IT HELPS BY CLICKING ON STAR MARK

    !!

    rEGARDS

    gUNJAN

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 09:06 AM

    Hi Hari,

    Try with the FM HRCM_ORGUNIT_EMPLOYEE_LIST_GET.

    You will get all the emp's under orgunit, then capture that count into the variable.

    Thanks

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 09:21 AM

    Hi,

    Check in the function group 'HRCMP00ADMIN', as this has many function modules for your requirement,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 09:28 AM

    Hi,

    Example :

    call function 'HRCM_ORGUNIT_EMPLOYEE_LIST_GET'

    exporting

    plvar = p_plvar

    otype = 'O '

    objid = s_orgeh-low

    begda = p_effdt

    endda = p_effdt

    • PATH_ID = 'O-S-P'

    tables

    pernr_table = i_pernr

    exceptions

    path_error = 1

    root_error = 2

    no_employees_found = 3

    others = 4

    Thanks,

    GSR.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 11:38 AM

    call function 'RH_DIR_ORG_STRUC_GET'

    exporting

    act_orgunit = orgunit

    act_plvar = '01'

    act_date = pdate

    sort_flag = ''

    add_flag_pdata = ''

    tables

    org_units = orgunits

    • PERSON_TAB = person_tab

    org_pers_rel = org_pers_rel

    exceptions

    no_active_plvar = 1

    others = 2

    .

    if sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    internal table person_tab will give you the list of employees in that particular org. unit!!

    Hope this helps!!

    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.