Skip to Content

Unfortunately,  I have seen generally that there is no proper standard FM provided by SAP where you can get the subordinates of a manager to directly. So, I got curious enough to explore more on this one & started debugging & troubleshooting different set of services like Team Calendar, Team Viewer etc. in backend. And I indeed 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 complicated to 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 used as 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 the evaluation path of O-S-P.

                     2. MSS_TMV_EE_ALL-> This will give ALL EMPLOYEES  coming under the manager , as per the evaluation path of O-S-P

                    (Both the above parameter values are based on OADP- Object and Data Provider  structures used in 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 .

or str.png

Passing object selection “MSS_TMV_EE_DIR”

Untitled.png

 

Passing object selection “MSS_TMV_EE_ALL”

/wp-content/uploads/2013/10/dfd_297433.png

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

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

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Sarath Babu

              Thank you very much for providing a one time solution to the problem which we were facing for quite some 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 presume the entries in the parameter ‘OBJSEL’ corresponds to the ‘Selection’ parameter maintained in the view ‘V_TWPC_OBJSEL’.

    (0) 

Leave a Reply