2008 Aug 07 12:06 PM
hi
i am using offset indicator on date field, i.e.
select single * from vbak into wvbak where erdat+0(3) = '2000'.
but querry does not fetch data, what could be the solution for this.
thanx in adv
manoj
2008 Aug 07 12:13 PM
Plz change ur code as per below.
Data wvbak1 like wvbak with header line.
select single * from vbak into wvbak.
Loop at wvbak
If wvbak-erdat+0(4) = '2000'.
move wvbak to wvbak1.
append wvbak1.
Clear wvbak1.
Endif.
Endloop.
rgds
rajesh
hi,
select all the data into one internal table and use the following code.
loop at itab into wa.
if wa-date+0(4) eq '2000'.
move-corresponding wa to final_itab.
clear wa.
endif.
endloop.
Regards,
Satish Reddy.
2008 Aug 07 12:07 PM
2008 Aug 07 12:08 PM
select single * from vbak into wvbak where erdat0(3) = '2000'.+
we cannot use offset in query.
first fetch data than compare with offset and delete unwanted data.
2008 Aug 07 12:09 PM
select single * from vbak into wvbak
WHERE ERDAT <= '20001231'
or ERDAT > '20000101'.
I think you should be using SELECT UP TO 1 ROWS .. ENDSELECT as ERDAT is not key field in the table.
BR,
Suhas
Edited by: Suhas Saha on Aug 7, 2008 1:14 PM
2008 Aug 07 12:12 PM
hi,
select all the data into one internal table and use the following code.
loop at itab into wa.
if wa-date+0(4) eq '2000'.
move-corresponding wa to final_itab.
clear wa.
endif.
endloop.
Regards,
Satish Reddy.
2008 Aug 07 12:13 PM
Plz change ur code as per below.
Data wvbak1 like wvbak with header line.
select single * from vbak into wvbak.
Loop at wvbak
If wvbak-erdat+0(4) = '2000'.
move wvbak to wvbak1.
append wvbak1.
Clear wvbak1.
Endif.
Endloop.
rgds
rajesh
2008 Aug 07 12:19 PM
Hello Satish & Rajesh,
What if we restrict the data fetch @ the time of selection )
WHERE ERDAT <= '20001231'
OR ERDAT > '20000101'.
I guess this will be more efficient performance-wise.
BR,
Suhas
2008 Aug 07 12:24 PM
hiii
select query will not work with OFFSET...
LOOP AT i_marc INTO wa_marc.
if wa_marc-date+0(4) = '2000'.
.....
endif.
endloop.regards
twinkal
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |