10-16-2008 8:26 AM
Hi All,
Is there any function module which gives me the last twelve month details from the current date.
Suppose we enter the date as 15 Oct 2008 .. the result should be as below
Oct 2008
Sep 2008
Aug 2008
July 2008
June 2008
May 2008
April 2008
March 2008
Feb 2008
Jan 2008
Dec 2007
Nov 2007
Regards
Lalit
10-16-2008 8:36 AM
Hello,
I dont think so we have these type of FM but u can do it programicatly its very easy.
Just take the entered date and decrease it my 12 then u will get one number then u can check it which month and year it is.
10-16-2008 8:31 AM
hi,
use these function module.
MONTH_PLUS_DETERMINE
RP_CALC_DATE_IN_INTERVAL.
10-16-2008 8:36 AM
Hello,
I dont think so we have these type of FM but u can do it programicatly its very easy.
Just take the entered date and decrease it my 12 then u will get one number then u can check it which month and year it is.
10-16-2008 9:03 AM
Hi,
Use FM OIL_GET_PREV_MONTH as follows;
Data : lv_date_tmp type d.
lv_date_tmp = '20081015'.
do 12 times.
CALL FUNCTION 'OIL_GET_PREV_MONTH'
EXPORTING
i_date = lv_date_tmp
IMPORTING
E_DATE = lv_date_tmp.
WRITE : / lv_date_tmp.
ENDDO.
Instead of WRITE create an internal table and append the date(lv_date_tmp) in it.
Revert back if u have doubts.
Regards
Karthik D
12-08-2008 6:54 AM