Google Search - Blog...........

Employee Data Using Function Module In HR ABAP

*--instead of reading many infotypes 0000,00001,0002,0006,0105
* 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