‎2007 Apr 18 7:23 AM
Hi Chakradhar here,
one doubt,
How to set the default vaue for the date fields in the selection screen exactly 30 days before from today. ie last month this day
‎2007 Apr 18 7:26 AM
hi,
patameters
p_date like sy-datum.
initialization.
p_date = sy-datum.
if p_date+4(2) ne 12.
p_date4(2) = p_date4(2) -1.
else.
p_date+4(2) = 1.
p_date0(4) = p_date0(4) - 1.
endif.
regards,
ananth
‎2007 Apr 18 7:29 AM
Hi
There is a function module CCM_GO_BACK_MONTHS, you can specify month parameter as 1.
Call this FM in INITIALISATION event & assigned the date from a variable to screen parameter
Thanks
Sandeep
Reward if helpful
‎2007 Apr 18 7:30 AM
even after giving Defalut days also user can change , so better options will be like this
1.report running date will be only for last 30 days if not raise error.
2.dont maintain date as input , in the program do calculations on its own.
Regards
Prabhu
‎2007 Apr 18 7:30 AM
Hi Chakradhar,
Parameters: P_DATE type SY_DATUM.
initialization.
P_Date = SY-DATUM.
P_DATE = P_DATE - 30. " This will give you the 30 days before dateRegards
Sudheer