Function Module to Get Subordinates of a Manager

Embed Size (px)

DESCRIPTION

SAP - Function Modules to get subordinates

Citation preview

  • Generated by Jive on 2014-08-06+02:001

    SAP ERP HCM Employee Self-Service:Function Module to get subordinates of amanager

    Posted by Dhiraj Pednekar Oct 14, 2013Unfortunately, I have seen generally that there is no proper standard FM provided by SAP where you canget the subordinates of a manager to directly. So, I got curious enough to explore more on this one & starteddebugging & troubleshooting different set of services like Team Calendar, Team Viewer etc. in backend. And Iindeed found one which could be used more realistically for getting subordinates related data.

    Although there are other FM's like RH_STRUC_GET which can also be used, but they are more complicatedto use by way of passing input & changing parameters to them. So, one FM that can be queried very easily &get the required set of data is 'HRWPC_RFC_OADP_GET_OBJECTS'. This FM has been primarily been usedas a wrapper FM for most of the services in MSS viz., Team Calendar , Team Viewer to name a few.

    Parameters that needs to be passed to this FM are :-

    OBJSEL -> Either of the two values can be passed depending on the business needs. 1. MSS_TMV_EE_DIR -> This will only give DIRECT REPORTS to the manager , as per theevaluation path of O-S-P. 2. MSS_TMV_EE_ALL-> This will give ALL EMPLOYEES coming under the manager , as perthe evaluation path of O-S-P (Both the above parameter values are based on OADP- Object and Data Provider structures usedin MSS)

    BEGDA -> SY-DATUM

    ENDDA -> SY-DATUM

    USER-> Username of the manager stored in info type 0105.

    An example to depict the working of this FM is shown from the below Organization Structure .

  • SAP ERP HCM Employee Self-Service: Function Module to get subordinates of a manager

    Generated by Jive on 2014-08-06+02:002

    Passing object selection MSS_TMV_EE_DIR

  • SAP ERP HCM Employee Self-Service: Function Module to get subordinates of a manager

    Generated by Jive on 2014-08-06+02:003

    Passing object selection MSS_TMV_EE_ALL

    As you can see, in the last result an additional employee is outputted as "Bryan Adams" , as he not being thedirect employee of the manager.

  • SAP ERP HCM Employee Self-Service: Function Module to get subordinates of a manager

    Generated by Jive on 2014-08-06+02:004

    Hope this blog was helpful for those who usually gets baffled for getting subordinates data of a managerthrough various discussion forums.

    1785 Views Tags: enterprise_resource_planning, sap_erp_human_capital_management

    Saurabh GuptaMay 20, 2014 12:33 PMExcellent Work Dhiraj..

    Pradyp ParakalaMar 24, 2014 8:22 AMGr8 work Dheeraj

    keep coming with more such docs..

    Cheers Pradyp

    Sarath BabuMar 11, 2014 11:31 AM Thank you very much for providing a one time solution to the problem which we were facing for quitesome time. Most the times we needed to traverse along the org hierarchy to bring out employees reporting

    to a manager. Now this FM provides an easy solution and seems like a great time saver . I presumethe entries in the parameter 'OBJSEL' corresponds to the 'Selection' parameter maintained in the view'V_TWPC_OBJSEL'.

    Siddharth Rajora in response to Steve Oldner on page 4Dec 3, 2013 10:24 PMdid you try these FMs RH_GET_ORG_ASSIGNMENTor RH_GET_MANAGER_ASSIGNMENT?

    Steve OldnerDec 3, 2013 7:12 PMVery nice writing and good, clear examples.