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

Function module or Bapi for retriving Manager Name and Instructor Name.

Former Member
0 Likes
405

Hi All,

I am modifying a standard report RHXTEILN and i need to add two new fields to that report one is "Manager Name" of the employee and the other is "Instructor Name" of the course which he attended. Could any one help me out by giving the hints or the function modules which we can use to retrive these fields.

Regards,

Rajashekhar.

2 REPLIES 2
Read only

Former Member
0 Likes
380

Hi,

By the way do you have the SAP standard TABLE-FIELD of these fields you mentioned?

Read only

Former Member
0 Likes
380

Go thru the code for getting the Manager's name ..

DATA: ls_sobid1 TYPE sobid,

ls_sobid2 TYPE sobid,

ls_sobid3 TYPE sobid,

vorna type PAD_VORNA,

nachn type PAD_NACHN.

SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid1

WHERE otype = 'P'

and plvar = '01'

AND objid = pernr

AND endda >= sy-datum

AND begda <= sy-datum

AND rsign = 'B'

AND relat = '008',

AND SCLAS = 'S'.

IF sy-subrc EQ 0.

SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid2

WHERE otype = 'S'

and plvar = '01'

AND objid = ls_sobid1

AND endda >= sy-datum

AND begda <= sy-datum

AND rsign = 'A'

AND relat = '002'

AND sclas = 'O'.

IF sy-subrc EQ 0.

SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid3

WHERE otype = 'S'

and plvar = '01'

AND objid = ls_sobid2

AND endda >= sy-datum

AND begda <= sy-datum

AND rsign = 'A'

AND relat = '008'.

IF sy-subrc EQ 0.

SELECT SINGLE vorna nachn from pa0002 INTO (vorna , nachn)

WHERE pernr = ls_sobid3

AND endda >= sy-datum

AND begda <= sy-datum.

IF sy-subrc EQ 0.

Concatenate vorna nachn into name separated by SPACE.

condense name.

Endif.

To get Instructor : use FM : LSO_CRP_REC_INSTRUCTOR