‎2006 Dec 08 6:02 AM
Hi all,
I wanted to know the function module which will return the number of months between the given years .......
Also if you can give me the parameters which are necessary to pass......
‎2006 Dec 08 6:04 AM
Jayant
MONTH_PLUS_DETERMINE
Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
‎2006 Dec 08 6:04 AM
Jayant
MONTH_PLUS_DETERMINE
Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
‎2006 Dec 08 6:08 AM
data: duration_in_months type i.
parameters: s_date type sy-datum,
e_date type sy-datum.
call function 'DURATION_DETERMINE'
exporting
unit = 'MON'
factory_calendar = 'IN' " Your factory calendar
importing
duration = duration_in_months
changing
start_date = s_date
end_date = e_date
exceptions
factory_calendar_not_found = 1
date_out_of_calendar_range = 2
date_not_valid = 3
unit_conversion_error = 4
si_unit_missing = 5
parameters_not_valid = 6
others = 7.
write:/ duration_in_months.