‎2015 Jul 22 3:29 PM
Dear All
Is there any function module that gives the Manager of Employee by providing Pernr as input.
We are maintaining the relationship A/B 002 in infotype 1001.
Regards,
Venkat
‎2015 Jul 22 5:01 PM
Hi ,
Write the below custom code and you should be good.
1. SELECT FROM PA0001 WHERE PERNR = personnelpersnumber PLANS = position of employee
2. SELECT FROM HRP1001 WHERE RSIGN = A RELAT = 002 OTYPE = 'S' OBJID = position_of_employee SCLAS = 'S': SOBID = manager position
3. SELECT FROM HRP1001 WHERE RSIGN = A RELAT = 008 OTYPE = 'S' OBJID = sobid of prev step SCLAS = 'P'.
SOBID of the second SELECT is personnel number of the manager
Not sure if the FM: SWX_GET_MANAGER does the authorization check.
Regards,
Harsh
‎2015 Jul 22 3:38 PM
‎2015 Jul 22 5:01 PM
Hi ,
Write the below custom code and you should be good.
1. SELECT FROM PA0001 WHERE PERNR = personnelpersnumber PLANS = position of employee
2. SELECT FROM HRP1001 WHERE RSIGN = A RELAT = 002 OTYPE = 'S' OBJID = position_of_employee SCLAS = 'S': SOBID = manager position
3. SELECT FROM HRP1001 WHERE RSIGN = A RELAT = 008 OTYPE = 'S' OBJID = sobid of prev step SCLAS = 'P'.
SOBID of the second SELECT is personnel number of the manager
Not sure if the FM: SWX_GET_MANAGER does the authorization check.
Regards,
Harsh
‎2015 Jul 22 6:06 PM
As far as i know we have function module get manger details where it gives you the relationship 002 details i.e 002 is considered as manger Try with RH_GET_Manager(RH*) you will get the list of function modules.
Am not next to the system i could not able to give you the exact one try with RH* you will get them.
Regards
Venkatesh
‎2015 Jul 23 7:49 AM
Thank You all for the solution.
I used Harsh suggestion and implemented it in my local function and using it throughout..
Regards,
Venkat