2007 Dec 06 11:21 AM
My issue is I am giving i/p 200609 as period.
Then I am giving month i/p as 4.
I am having o/p field startmonth and Endmonth.
In startmonth i should get 200605 &
In endmonth I will get obviously 200609.
How can I do this. Is there any fm for this.
Plz help me..
My issue is I am giving i/p 200609 as period.
Then I am giving month i/p as 4.
I am having o/p field startmonth and Endmonth.
In startmonth i should get 200605 &
In endmonth I will get obviously 200609.
How can I do this. Is there any fm for this.
Plz help me..
2007 Dec 06 12:44 PM
Hi, declare l_startmonth and l_endmonth
l_endmonth = i/p (200609)
l_startmonth = i/p (2000609 - 04)
then try this way
or take the month in input value and subtract from the given input month value
2007 Dec 06 12:50 PM
Hi,
use FM to add months
CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
EXPORTING
months = '2'
olddate = lv_date
IMPORTING
newdate = lv_newdate.
Regards,
prashant
2007 Dec 06 1:03 PM
Hi veera,
Please use the FM below.
You can use the FM RE_ADD_MONTH_TO_DATE
DATA: V_DATE TYPE SYDATUM.
V_DATE = SY-DATUM.
CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
EXPORTING
MONTHS = '-6'
OLDDATE = V_DATE
IMPORTING
NEWDATE = V_DATE.
WRITE: / 'BEFORE SIX MONTHS', V_DATE.
Thankx.
reward if useful.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |