‎2009 Sep 29 2:17 PM
hi
i have a req to use in a select statement two dates variables
eg variable dat1 and dat2 has some date for eg say 01-09-08 and 09-02-09 and i want to use select statement with both the dates
for eg say
SELECT * FROM table INTO table it_text
WHERE key1 = var1
date = date1.
now i want to use range for defining the dates as i have nw two dates. and i want to get records for both the dates.
pls suggest
rgds
Arora
‎2009 Sep 29 2:46 PM
hi,
check this code:
ranges: d for table-date.
d-sign = 'I'.
d-option = 'EQ'.
d-low = '20080101'.
append d.
d-sign = 'I'.
d-option = 'EQ'.
d-low = '20091001'.
append d.
SELECT * FROM table INTO table it_text
WHERE key1 = var1 AND
date IN d.
regards,darek
‎2009 Sep 29 2:46 PM
hi,
check this code:
ranges: d for table-date.
d-sign = 'I'.
d-option = 'EQ'.
d-low = '20080101'.
append d.
d-sign = 'I'.
d-option = 'EQ'.
d-low = '20091001'.
append d.
SELECT * FROM table INTO table it_text
WHERE key1 = var1 AND
date IN d.
regards,darek
‎2009 Sep 29 2:49 PM
I remember your all previous questions and following them closely.
I suspects if you read moderatoru2019s message or not? Yet your question should be forbidden because you must follow youu2019re below thread but updating your additional problem regarding ranges in select.
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Sep 9, 2009 10:14 AMTake care and yet you not deserve to reactive the answers anymore since you did not share your solutions with us.
Edited by: Amit Gujargoud on Sep 29, 2009 3:52 PM
‎2009 Sep 29 3:02 PM
here is the solution...
DATA r_netwr type range of table-netwr,
wa_datvr like line of r_netwr
Constants: lc_sign type C value 'I',
lc_options(2) type C Value 'BT'.
clear r_netwr.
wa_datvr-sign = lc_sign .
wa_datvr-option = lc_options.
wa_datvr-low = l_predat.
wa_datvr-high = gs_toav0_old-ar_date.
append wa_datvr to r_netwr
SELECT * FROM table INTO TABLE gt_table
AND datvr in r_netwr.
thanks
regards
Nishant
‎2009 Sep 29 2:50 PM