04-25-2007 6:29 AM
hi
suppose i have a date range where the starting date is 01.03.2002 and the end date is 31.12.9999
and if i have to retrive the data of a particular year say of 2007 then what code i should write.
thanks and regards
04-25-2007 6:32 AM
Hi Ashish,
You can try like this,
Just give one more date range in Selection Screen and the user can give the date values which he/she want to retrive data.
Regards,
Suresh
Message was edited by:
SureshKumar Ramamoorthy
04-25-2007 6:33 AM
hi
build a range like this and use it in select.
ranges r_date for mkpf-budat.
r_date-low = '20070101'.
r_date-high = '20071231'.
r_date-sign = 'I'.
r_date-option = 'BT'.
append r_date.
select a b c into table itab
where date in r_date.
if helpful, reward
Sathish. R
04-25-2007 6:34 AM
Hi,
Get the Year (first 4 characters) date+0(4) from the date range and use that as comaprison to get that year data.or you can use the criteria
like if date-low >= 01.01.2007 and date-high <= 31.12.2007 like that and use
to get all the info for that year
reward if useful
regards,
Anji
04-25-2007 6:36 AM
If your date range is FROM 01.03.2002 TO 31.12.9999; any date in year 2007 will be coming in this range.
Select ... Where <b>Datefield >= 01.03.2002</b> AND <b>Datefield <= 31.12.9999</b>
Can you give more details for specific answer?
Regards,
Vishal