‎2008 Jan 18 10:45 AM
Hi frnds,
Can anyone hlep me how to write the selection screen for the stuff below.
Zavail(program name) , create parameter selection to run by travel dates. Must have ability to run nightly (travel date range: tomorrows date to 60 days later) and weekly (travel date range: 61days after of tomorrow to 6 month after of todays date).
help me frnds.
regards,
sanjay
‎2008 Jan 18 11:07 AM
Try this code...
"nightly (travel date range: tomorrows date to 60 days later) and
"weekly (travel date range: 61days after of tomorrow to 6 month after of todays date).
SELECT-OPTIONS : s_nigtly FOR sy-datum.
SELECT-OPTIONS : s_weekly FOR sy-datum.
INITIALIZATION.
s_nigtly-sign = 'I'.
s_nigtly-option = 'BT'.
s_nigtly-low = sy-datum + 1. "tommorrows date
s_nigtly-high = sy-datum + 60. "60 days later.
APPEND s_nigtly.
s_weekly-sign = 'I'.
s_weekly-option = 'BT'.
s_weekly-low = s_nigtly-low + 61 . "61days after of tomorrow
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = '6'
olddate = sy-datum
IMPORTING
NEWDATE = s_weekly-high. "6 month after of todays date
APPEND s_weekly.