‎2007 Dec 07 11:45 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 200606 &
In endmonth I will get obviously 200609.
How can I do this. Is there any fm for this.
Plz help me..
‎2007 Dec 07 11:48 AM
DATA:
zlv_period TYPE N length 6.
zlv_period4(2) = zlv_period4(2) + <input>.
Regards,
John.
‎2007 Dec 07 11:53 AM
Hello,
Use this FM - HR_PT_COMPUTE_MONTHS
set the modify_interval parameter to P, + or -
Or
Use F.M. HR_HK_DIFF_BT_2_DATES and put Output format as '04'.
Date 1 is the higher date and Date2 is Lower date.
Cheers,
Chandra Sekhar.
‎2007 Dec 07 11:54 AM
Hi,
Data : st_month type month,
en_month type month.
st_month = <i/p month>
en_month = (<i/p period>(4)+2) + <i/p month>
Hope it works
‎2007 Dec 07 11:54 AM
Hi,
Use the FM CCM_GO_BACK_MONTHS
data : gv_datum like sy-datum.
CALL FUNCTION 'CCM_GO_BACK_MONTHS'
EXPORTING
currdate = p_date(6) "Selection screen parameter
backmonths = '4' "Parameter for back months.
IMPORTING
newdate = gv_datum.
write : 'start month' gv_datum(6),
'End date' p_date(6) " Give selection parameter define to give date ex ; 200806.Thanks,
Sriram Ponna.
‎2007 Dec 07 12:00 PM
at selection-screen output.
cut the month part
then subtract it from 4.
check whether its negative value then add with 12
ans subtract 1 from year
then concatenate it and store in the startmonth field
rewad if usefull