01-25-2008 12:09 PM
Need to know how I can get 10 days subtracted from the current date before the report is excuted. This needs to appear in the selection screen before the report is excuted.
The select option contains two fields the first field is the date which is 10 days subtracted from the current date and the next field is the current date.
Please suggest.
Thanks.
01-25-2008 12:15 PM
SELECT-OPTIONS : s_date FOR sy-datum.
INITIALIZATION.
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low = sy-datum - 10.
s_date-high = sy-datum.
APPEND s_date.
01-25-2008 12:11 PM
01-25-2008 12:11 PM
Hi Dolly
In the initialization event of your program, if say P_DATE_FROM is your from date parameter add this code
P_DATE_FROM = Sy-DATUM - 10.
Regards
Ranganath
01-25-2008 12:12 PM
Hi,
select-options:
s_date for date.
initialization.
s_date-low = sy-datum - 10.
s_date-high = sy-datum.
append s_date.
Plzz reward points if it helps.
01-25-2008 12:14 PM
Hi Dolly
I had a same req before check that code:
*----------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
*----------------------------------------------------------------------*
IF pa_older = 'X'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = pa_end "<<<<< date or in ur case sy-datum
days = '10'
months = '00'
signum = '-'
years = '00'
IMPORTING
calc_date = pa_end1. " <<< subtracted date
ENDIF.
01-25-2008 12:15 PM
SELECT-OPTIONS : s_date FOR sy-datum.
INITIALIZATION.
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low = sy-datum - 10.
s_date-high = sy-datum.
APPEND s_date.