Skip to Content
0
Former Member
Feb 18, 2009 at 05:58 AM

How to display the date with in a range?

337 Views

Hi Experts,

I want to collect the data and display it, where date should be with in a range.

For that, I have declared the date as a data declaration as below:

data: wa_date like vbap,

r_date TYPE RANGE OF vbap-erdat WITH HEADER LINE.

r_date-low = '01.04.2005'.

r_date-high = '01.06.2005'.

r_date-sign = 'I'.

r_date-option = 'BT'.

and written the select query as below:

SELECT vbeln

posnr

ernam

werks

lgort

erdat

FROM vbap

INTO CORRESPONDING FIELDS OF TABLE itab_vbap

WHERE erdat in r_date.

However, i am getting data which is out of the above mentioned range. Kindly help me in this regard.

Thanks,

Murthy.