ABAP – Getting leaving date or termination date of an employee

In ABAP for getting the leaving date or termination date of an employee we can use the function module  HR_LEAVING_DATE.

CALL FUNCTION ‘HR_LEAVING_DATE’
EXPORTING
PERSNR                 = pernr-pernr
IMPORTING
LEAVINGDATE            = l_fire_date
EXCEPTIONS
LEAVING_DATE_NOT_FOUND = 1
PERNR_NOT_ASSIGNED     = 2
OTHERS                 = 3.

 
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

After passing the PERNR ane executing the function module we will get the fire date or termination date in the variable l_fire_date.

 

0 Comments

Leave A Reply