‎2008 Dec 05 1:08 PM
I need to find out the supervisor details for a particular pernr ( Personal number ).
I have an idea that I can use pa0001 , pa0008 tables but not exactly ..
Can some one tell me how to retrieve this data ?
Thanks
‎2008 Dec 05 1:11 PM
‎2008 Dec 05 7:01 PM
Not even PA0001.
You need to get PERNR of the supervisor first, this you can get using two select statements (or selecting the data in an internal table and then doing READ statement, as normal good practice).
1. Get the Org Unit (which will be in SOBID field) of the Employee, FROM Table HRP1001. ( OTYPE = 'O', SUBTY = 'A003')
2. Get the Manager (which will be in SOBID field) of that Org Unit From Table HRP1001. ( OTYPE = 'P', SUBTY = 'B012')
I hope you can translate above statements into SELECT statements, after that you will get the Supervisor Pernr. You can then get any details from any infotype that you are interested in. Like for Name etc, you can look for IT 0002 and for Addresses Look for IT 0006.
‎2008 Dec 05 7:16 PM
Go to se16 table hrp1001.
There in
sobid = pernrno of employee
relat = 008
rsign = A
now for the entry u get read the objid field
this is the position no. of the employee.
Go back to se16 hrp1001.
put the position no. in objid field and in relat = 002 and in rsign = B
and now check the entires read the sobid field.
now this is the position of the supervisor.
now go back to hrp1001 in objid put this new position no. and in rsign put A and relat = 008 and check the entry you will get the pernr of the supervisor.
You may also look inti this FM -
RH_GET_LEADER
RH_GET_LEADING_POSITION