Hi Yash,
Use these FMs.
To get the payroll period for the dates.
CALL FUNCTION'HRAR_GET_PAYROLL_PERIOD'
EXPORTING
permo = v_permo
date = h_date
IMPORTING
begda = v_datum1
endda = v_datum1
pabrj = v_abrj1
pabrp = v_abrp1.
*--Read the time cluster for the employee
CALLFUNCTION'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = wa_pernr-pernr
get_pabrj = v_abrj
get_pabrp = v_abrp
TABLES
get_zes = i_zes[]
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5
OTHERS = 6.
In the i_zes internal table, check the number of hours for each day corresponding to the overtime time type