TABLES: pa0000.
PARAMETERS:p_pernr LIKE pa0000-pernr.
DATA: entrydate TYPE p0000-begda,
leavingdate TYPE p0000-begda.
DATA: BEGIN OF it_entry_dates OCCURS 0.
INCLUDE STRUCTURE hida.
DATA: END OF it_entry_dates.
START-OF-SELECTION.
CALL FUNCTION 'HR_ENTRY_DATE'
EXPORTING
persnr = p_pernr
begda = '18000101'
endda = '99991231'
IMPORTING
entrydate = entrydate
TABLES
entry_dates = it_entry_dates
EXCEPTIONS
entry_date_not_found = 1
pernr_not_assigned = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HR_LEAVING_DATE'
EXPORTING
persnr = p_pernr
begda = '18000101'
endda = '99991231'
IMPORTING
leavingdate = leavingdate
exceptions
leaving_date_not_found = 1
pernr_not_assigned = 2
others = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END-OF-SELECTION.
WRITE:/ 'entry date:', entrydate COLOR 6,
'leaving date:', leavingdate COLOR 5.
ALSO READ:
- Get All The Existing Organization Units.
- Obtain All The Sub Org Units Under An Organization Unit.
- Display Texts For Personnel Subarea, Employee Group, Employee Subgroup, Cost Center & Organizational Unit.
- Minimum & Maximum Salaries For The Employees.
- Handling User Exits In HR ABAP.
.....Back To Sub-Index On HR ABAP.
.....Back To MAIN INDEX.
No comments:
Post a Comment