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

hr abap technical

Former Member
0 Likes
1,596

Hi all,

how can we know the relation between an emplyee and his superior ? (hrp1000 ,hrp1001 )

can any one give me the reply with exaple(code)?

Thanks in advance

charan

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
1,516

The "reports to" relataion is maintained between the employee's position & supervisor's position.There are a couple of function modules to get the supervisor's info directly..

Regards,

Suresh Datti

Hi all,

how can we know the relation between an emplyee and his superior ? (hrp1000 ,hrp1001 )

can any one give me the reply with exaple(code)?

Thanks in advance

charan

10 REPLIES 10
Read only

suresh_datti
Active Contributor
0 Likes
1,517

The "reports to" relataion is maintained between the employee's position & supervisor's position.There are a couple of function modules to get the supervisor's info directly..

Regards,

Suresh Datti

Read only

venkata_ramisetti
Active Contributor
0 Likes
1,516

Hi,

YOu can use combination of fields PLVAR ,OTYPE, OBJID for linking HRP1000 and HRP1001.

Thanks,

Ramakrishna

Read only

Former Member
0 Likes
1,516

hi all,

can u give any example coe to checket plz

thanks

charan

Read only

0 Likes
1,516

Suppose you have the employee's position.. here is the code to get the supervisor's position..


data w_objid type hrobjid.  "Employee's position
data w_sobid type sobid. "Supervisor's position

select sobid into w_sobid 
   from hrp1001 up to 1 rows
where otype  = 'S'
  and objid   = w_objid
  and plvar = '01'
  and istat = 1
and begda le sy-datum
and endda ge sy-datum
and rsign = 'A'
and relat = '002'.
endselect.
if sy-subrc eq 0.
* w_sobid holds the Supervisor's position
endif.

Regards,

Suresh Datti

Read only

0 Likes
1,516

thanks suresh.

can u name the function modules which are usefull for me now?

charan

Read only

0 Likes
1,516

hi,

You can pass the employee's 0001 record to this function module RPAQ_GET_AF_0001 & get back thye Supervisors' info..

Regards,

Suresh Datti

Read only

0 Likes
1,516

Hi sureh, th fm is as follows.

CALL FUNCTION 'RPAQ_GET_AF_0001'

  • EXPORTING

  • C_IT0000 =

  • C_IT0001 =

  • BEGDA_IT = SY-DATUM

  • ENDDA_IT = SY-DATUM

  • BEGDA_SEL = SY-DATUM

  • ENDDA_SEL = SY-DATUM

  • TCLAS =

  • MOLGA =

  • C_OBJEC =

  • IMPORTING

  • AF_VALUES =

TABLES

AF_FIELDS =

  • IT0000 =

  • IT0001 =

Whic field shoud i uncomment. can u explain me?

thannks

charan

Read only

0 Likes
1,516

Hi Ravi,

Pl check the follwoing code..


data : rec_p0001   like p0001. "Org Info
data: rec_af_values like p0001_af. "Manager info
data: t_af_fields like rhtext_field occurs 0 
                        with header line.
data: w_pernr type pernr_d,
w_supname like p0001-ename.
* assuming you have employee's 0001 record in p0001
  read table p0001 index 1.
  if sy-subrc <> 0.
    clear p0001.
  endif.
  move p0001 to rec_p0001.
* retrieve the supervisor employee number and name.
  t_af_fields-fieldname = 'OMNGR_NR'.
  append t_af_fields.
  t_af_fields-fieldname = 'OMNGR_NA'.
  append t_af_fields.

  call function 'RPAQ_GET_AF_0001'
    exporting
      c_it0001  = rec_p0001
      begda_it  = sy-datum
      endda_it  = sy-datum
      begda_sel = sy-datum
      endda_sel = sy-datum
      tclas     = 'A'
      molga     = '10'
    importing
      af_values = rec_af_values
    tables
      af_fields = t_af_fields.

 w_pernr = rec_af_values-omngr_nr. "Supervisor's pernr
 w_supname = rec_af_values-omngr_na. "Supervisor's Name

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,516

Hi,

If i want to delete my queries form the posted list, how could is?

can u tell me the path.

Thanks

charan

Read only

0 Likes
1,516

HI,

You can close them by clicking on the radiobutton solved on my own..

regards,

Suresh Datti