* we can use this function module to read the complete data of
* an employee
REPORT ztest.
parameters: p_pernr type pa0001-pernr.
start-of-selection.
data: l_pernr LIKE OBJEC-OBJID,
wa_data LIKE PERSON.
l_pernr = p_pernr.
CALL FUNCTION 'HR_GET_EMPLOYEE_DATA'
EXPORTING
person_id = l_pernr
SELECTION_BEGIN = SY-DATUM
SELECTION_END = SY-DATUM
IMPORTING
PERSONAL_DATA = wa_data
EXCEPTIONS
PERSON_NOT_FOUND = 1
NO_ACTIVE_INTEGRATION = 2
OTHERS = 3
.
end-of-selection.
write:/ 'Employee Name : ' , wa_data-pernr.
write:/ 'Start Date : ' , wa_data-begda.
write:/ 'End Date : ' , wa_data-endda.
write:/ 'Organization : ' , wa_data-Orgeh.
write:/ 'Cost Center : ' , wa_data-kostl.
write:/ 'Pisition : ' , wa_data-PLANS.
write:/ 'Job : ' , wa_data-stell.
write:/ 'First Name : ' , wa_data-vorna.
write:/ 'Last Name : ' , wa_data-nachn.
ALSO READ:
- HR TABLES.
- HR Tables & Infotypes.
- HR T-Codes.
- Sample HR Report Program On Macros.
- BDC For The Action Transfer Of Location In HR ABAP.
.....Back To Index On HR ABAP.
.....Back To MAIN INDEX.
No comments:
Post a Comment