08-22-2007 7:12 AM
Hi,
For selection option 'date', I have to restrict a user such that date range should be of 7 days only.How can I do it?
Thanks.
08-22-2007 7:15 AM
In AT SELECTION SCREEN OUTPUT check the date entered and throw the error accordingly.
Regards,
Amit
Reward all helpful replies.
08-22-2007 7:15 AM
In AT SELECTION SCREEN OUTPUT check the date entered and throw the error accordingly.
Regards,
Amit
Reward all helpful replies.
08-22-2007 7:17 AM
Hi,
check these fms in se37.
'CALCULATE_DATE'
'FIMA_DAYS_AND_MONTHS_AND_YEARS'
'HR_ECM_ADD_PERIOD_TO_DATE'
or
data: diff type i.
at selection screen on so_date.
read table so_date index 1.
if sy-subrc = 0.
diff = so_date-high - so_date-low .
if diff gt 7.
" Error message
endif.
endif.
<b>reward if useful.</b>
pritha.
08-22-2007 7:20 AM
Hi..
Try this:
DATA : V_DIFF TYPE I.
SELECT-OPTIONS : S_DATE FOR SY-DATUM.
AT SELECTION-SCREEN ON S_DATE.
V_DIFF = S_DATE-HIGH - S_dATE-LOW.
IF V_DIFF > 7.
Message 'Date Range not allowed ' type 'E'.
ENDIF.
<b>Reward if Helpful</b>