09-14-2008 9:43 PM
Hello abapers...
i'm quite new to abap development an actually use it to create bapis for portal use. I would like to retrieve the name of an employee out of the HR. As input-parameter i have the employee-number. What tables do i have to query to get the needed information?
Greets,
Jochen
09-14-2008 10:16 PM
Hello Jochen
I would recommend to use the methods IF_PT_EMPLOYEE:
DATA: go_employee TYPE REF TO if_pt_employee,
gd_fullname TYPE emnam.
go_employee = cl_pt_employee( i_pernr = <your pernr> ).
gd_fullname = go_employee->get_ename( ).
Regards
Uwe
09-14-2008 10:16 PM
Hello Jochen
I would recommend to use the methods IF_PT_EMPLOYEE:
DATA: go_employee TYPE REF TO if_pt_employee,
gd_fullname TYPE emnam.
go_employee = cl_pt_employee( i_pernr = <your pernr> ).
gd_fullname = go_employee->get_ename( ).
Regards
Uwe
09-14-2008 10:16 PM
If it is just the Employee Name , you can get it by reading infotype 0001either from the the db table PA0001 ro using the function call HR_READ_INFOTYPE.. For additional info like Last Name. First Name, title etc you can use infotype 0002.. db table is PA0002.
~Suresh
09-15-2008 1:58 AM
Hi Jochen
If you have pernr number ,then go to PA0002 table and you take NORNA,VOCHNA fields ..
These are first and last name.
09-15-2008 4:10 PM