2007 Nov 07 11:54 AM
Hello All,
I have a date field in the SSCRN as select-options.
Now I want to give a default value to the date-low and date-high.
Those default values must be :
1. For s_date-low the value must be the START DATE of the current Week ( MONDAY )
2. For S_date_high the value must be the END DATE of the Week ( SUNDAY )
Eg: today is 07.11.2007 then my s_date-low must be 05.11.2007 (Monday) and my s_date-high must be 11.11.2007 (Sunday).
Can anyone know how to pass these as default values ?
Regards,
Deepu.K
Hello All,
I have a date field in the SSCRN as select-options.
Now I want to give a default value to the date-low and date-high.
Those default values must be :
1. For s_date-low the value must be the START DATE of the current Week ( MONDAY )
2. For S_date_high the value must be the END DATE of the Week ( SUNDAY )
Eg: today is 07.11.2007 then my s_date-low must be 05.11.2007 (Monday) and my s_date-high must be 11.11.2007 (Sunday).
Can anyone know how to pass these as default values ?
Regards,
Deepu.K
2007 Nov 07 12:01 PM
Hi,
this will solve your porblem..
SELECT-OPTIONS : s_date FOR sy-datum.
DATA : pdat LIKE sy-datum.
INITIALIZATION.
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
date = sy-datum
IMPORTING
monday = pdat.
s_date-low = pdat.
s_date-high = pdat + 6.
APPEND s_date.
2007 Nov 07 12:11 PM
Hello Sudhakar and Rajesh,
Thanks for the help.
But I'm not able to award points for u as I'm unable to see the Radiobuttons for awarding.
Is the awarding procedure changed ?
Regards,
Deepu.K
2007 Nov 07 12:03 PM
Check this code
report ztets.
SELECT-OPTIONS:
s_date for sy-datum.
data:
monday type sy-datum,
sunday type sy-datum.
INITIALIZATION.
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
DATE = SY-DATUM
IMPORTING
WEEK = WEEK
MONDAY = MONDAY
SUNDAY = SUNDAY
.
s_Date-low = monday.
s_Date-high = sunday.
append s_date.
2007 Nov 07 12:15 PM
Hi Deepu,
Try the following code.
SELECT-OPTIONS : s_date FOR sy-datum.
DATA : l_date LIKE sy-datum.
DATA : h_date LIKE sy-datum.
INITIALIZATION.
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
DATE = SY-DATUM
IMPORTING
WEEK =
MONDAY = l_date
SUNDAY = h_date.
s_date-low = l_date.
s_date-high = h_date.
append s_date.
If it is usefull pls reward it.
Regards
Srimanta