I am new to HR-ABAP programming. My requirement is:
For a given pernr in date range, find all the managers with their names.
l have to access HRP1001 and find the position(S) for the pernr(P) and for the position, check if there is any manager, if no manager, then go one level up. Get the following info.
Employees dependent details
Employees Manager Details
How to find the relations?
this is to get the position of the person: Select sobid
otype = P, objid = pernr, rsign = A, relat = '008', sclas = S. this will give the position for the person(pernr).
then for getting the supervisor: select the sobid.
otype = P objid = pernr, rsign = A, relat = '002' , sclas = P.
if sy-subrc = 0.
to get the supervisor's position: select the sobid.
otype = P , objid= sobid(of the supervisor), rsign = A, relat = '008', sclas = S.
supervisor not found