Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

released function module for difference in date

Former Member
0 Likes
584

Hi,

Can anyone suggest me a suitable released function module for finding the number of working days between two dates, given the factory calender key.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
485

Hi ,

Try using DAYS_BETWEEN_TWO_DATES

2.HR_99S_INTERVAL_BETWEEN_DATES

3.sd_datetime_difference

3 REPLIES 3
Read only

Former Member
0 Likes
485

I am not sure if there is one using Factory calender key , chk these 2 FMs

HR_HK_DIFF_BT_2_DATES

and

PARAMETER:p_date1 TYPE dats,
p_date2 TYPE dats.

DATA:lv_diff TYPE i.

CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = p_date1
i_datum_von = p_date2
IMPORTING
e_tage = lv_diff
EXCEPTIONS
days_method_not_defined = 1
OTHERS = 2.
IF sy-subrc = 0.
WRITE:/ lv_diff.
ENDIF.

Read only

0 Likes
485

Sorry That two are not released

Read only

Former Member
0 Likes
486

Hi ,

Try using DAYS_BETWEEN_TWO_DATES

2.HR_99S_INTERVAL_BETWEEN_DATES

3.sd_datetime_difference