Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Traversing

Former Member
0 Likes
505

Hi All,

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.

Employee Details

Employee Id

Employee Name

Employee’s address

Employee’s dependent details

Employee’s Manager Details

How to find the relations?

4 REPLIES 4
Read only

Former Member
0 Likes
476

Hi Swathi,

Refer this link:

Regards,

Ravi

Read only

0 Likes
476

U have given a link to ALV related stuff!!!!!

Read only

0 Likes
476

Hi Swati,

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.

else.

supervisor not found

endif.

regards,

madhu

Read only

Shafiq_Rehman1
Active Contributor
0 Likes
476

Here is the code for above algo: