on 06-03-2014 11:05 AM
Dear SAP Experts,
I want to get the list of months between two months.
for example,
from month (01.2014)
to month (06.2014)
result :
01.2014
02.2014
03.2014
04.2014
05.2014
06.2014
Please help me, how can I achieve above results
Regards,
hi Tariq,
can you write logic in the program...
E_MONTHS will give the months using FM FIMA_DAYS_AND_MONTHS_AND_YEARS
split the start and end date into variable lv_start_month ,lv_end_month ,lv_start_year,,lv_end_year
then
lv_year = e_months/12.
lv_remainder = e_months mod 12.
do (lv_year*12) times.
write:
lv_start_month,lv_start_year
lv_start_month = lv_start_month +1.
if lv_start_month =13.
lv_start_year = lv_start_year+1.
lv_start_month =0.
endif.
end do.
hope it helps....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using FM: FIMA_DAYS_AND_MONTHS_AND_YEARS.
Pass the start date(I_DATE_FROM) and end date(I_DATE_TO).
The export parameter E_MONTHS will give you the number of months between these two dates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.