‎2008 Feb 18 12:06 PM
Hi all,
In selection screen have parameter field date. When i used select statement it should pick the data before 90 days
of the selection screen . It should take each and every value
in the internal table.
Please suggest it
please give code.
thanks
venkat
‎2008 Feb 18 12:15 PM
Hi Venkat,
Have an field of ldate and subtract the current date with 90 days. and use that in your where condition range (from date i.e ldate to sy-datum) in select statement .
Regards,
JMB
‎2008 Feb 18 12:20 PM
ranges : r_date for sy-datum.
date_low = p_date - 90.
r_date-sign = 'I'.
r_date-option = 'BT'.
r_date-low = date_low.
r_date-high = p_date ..
Now use r_date in your select statement to get the data ..
select * from <table> into <itab>
where <date> in r_date.
‎2008 Feb 18 12:26 PM
Hi,
tables : vbak.
data : it_vbak like vbak occurs 0,
w_date type sy-datum.
parameters: p_date type sy-datum.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = p_date "'20080218'
days = '90'
months = '00'
SIGNUM = '-'
years = '00'
IMPORTING
CALC_DATE = w_date.
select * from vbak into table it_vbak where ERDAT < w_date.