Hai Ravi,
Try this fm
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = S_SELDT-low
i_date_to = S_SELDT-high
- I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
Then we will get no of months in 'EMONTHS'.
If EMONTHS > 12.
message 'please enter dates between 12 months' type 'E'.
endif.