‎2008 Jan 25 7:54 AM
Hi all,
My requirement is as follows.
select date : 01/01/2007
select no.of days : 5
output should display the records in the date range
01/01/2007 to 01/05/2007 similarly
if i give no.of days as 10 the output list should display the records in the range of 01/01/2007 to 01/10/2007
pls give a simple code..
thanks & regards,
mallika
‎2008 Jan 25 7:59 AM
Hi,
Do like this
Parameters: p_date type sy-datum,
p_days type i.
Data: r_date type range of sy-datum,
r_date_line like line of r_date.
Before selecting the data
r_date_line-sign = 'I'.
r_date_line-option = 'BT'.
r_date_line-low = p_date.
r_date_line-high = p_date + p_days.
append r_date_line to r_date.
Now
Select * from DBTABLE into table ITAB were date in r_date.
Regards,
Satish
‎2008 Jan 25 8:06 AM
parameters: sel_date type sy-datum,
no_days(8) type n.
data: filnaldate type sy-datum.
if no_days is not initial.
finaldate = no_days + sel_date.
endif.
now apply the logic to select data b/w sel_date and finaldate
reward points if its helpful