Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

REGARDING DATE REANGE

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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