‎2007 Jun 07 12:02 PM
I have to give date option as input parameter. and over there I have also need to give options like CURRENT,WEEK,MONTH,YEAR also related to date.
For example: I have given date like this. What else do I need to add for above mentioned requirement.
PARAMETER : ondate TYPE sy-datum DEFAULT sy-datum.
How I will do that.
Please do let me know.
Thanks
‎2007 Jun 07 12:11 PM
Hi Abhay,
Here is the solution to your query. Hope this helps you analyse any kind of date issues.
SELECT-OPTIONS: s_date FOR sy-datum. "Select option during selection screen.
DATA: x_date LIKE s_date.
INITIALIZATION.
x_date-low = sy-datum - 730. "Two years from the day the Report is run for low data.
x_date-high = sy-datum + 365. "One year beyond the day the Report is run for high data
APPEND x_date TO s_date.
Reward points.
Thanks,
Tej..
‎2007 Jun 07 12:11 PM
Hi Abhay,
Here is the solution to your query. Hope this helps you analyse any kind of date issues.
SELECT-OPTIONS: s_date FOR sy-datum. "Select option during selection screen.
DATA: x_date LIKE s_date.
INITIALIZATION.
x_date-low = sy-datum - 730. "Two years from the day the Report is run for low data.
x_date-high = sy-datum + 365. "One year beyond the day the Report is run for high data
APPEND x_date TO s_date.
Reward points.
Thanks,
Tej..
‎2007 Jun 07 12:12 PM
Hi,
You have the current date in "ondate"
Current week:
use the FM :
DISP_WEEK_GET
pass :
I_DATUM = ondate
get
E_WEEK - current week and currnet year in the format "WW.YYYY"
current year is pretty simple:
the first 4 chars of the date
current month the next 2 characters of the date
Kindly be generous with points if you find it useful.
Regards,
Gaurav
‎2007 Jun 07 12:15 PM
Hi,
try with
PARAMETER : ondate TYPE sy-datum DEFAULT sy-datum,
month type T247-MNR,
week type T248-WEKNR.
---Patil