2006 Sep 20 5:34 AM
hi
i lok for FM that do the next thing:
i have two date and i want to know how much month there are between those date
for example
01/2005 04/2006 (format mm/yyyy)
the answer will be 16 month
thanks
2006 Sep 20 5:38 AM
Hi,
Check these fm.
MONTHS_BETWEEN_TWO_DATES
MONTHS_BETWEEN_TWO_DATES_NEW
HR_99S_MONTHS_BETWEEN_DATES
HR_MONTHS_BETWEEN_TWO_DATES
Regards,
Senthil
Message was edited by: senthil kumar
hi
i lok for FM that do the next thing:
i have two date and i want to know how much month there are between those date
for example
01/2005 04/2006 (format mm/yyyy)
the answer will be 16 month
thanks
2006 Sep 20 5:36 AM
2006 Sep 20 5:38 AM
Hi,
Check these fm.
MONTHS_BETWEEN_TWO_DATES
MONTHS_BETWEEN_TWO_DATES_NEW
HR_99S_MONTHS_BETWEEN_DATES
HR_MONTHS_BETWEEN_TWO_DATES
Regards,
Senthil
Message was edited by: senthil kumar
2006 Sep 20 5:40 AM
Hi,
Use F.M
<b>MONTHS_BETWEEN_TWO_DATES_NEW</b>
to get the months between two dates..
Cheers,
Simha.
2006 Sep 20 5:47 AM
Check this code it may help u.
parameters:date1 like sy-datum,
date2 like sy-datum.
data:mon(10) type c.
CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = date1
i_datum_von = date2
I_KZ_INCL_BIS = ' '
IMPORTING
E_MONATE = mon.
.
Regards
2006 Sep 20 5:49 AM
hi yossi,
DATA : v_no_months type i.
DATA : v_date_low like sy-datum,
v_date_high like sy-datum.
v_date_low = s_date-low
v_date_high = s_date-high
CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = v_date_low
i_datum_von = v_date_high
IMPORTING
e_monate = v_no_months.
v_no_months : will give u the number of months.
hope this helps,
do reward if it helps,
priya.