03-05-2009 6:28 AM
Dear all,
We can not use READ TABLE with LOGICAL operators like LT, LE,GT,GE ..........
Is there any alternative to read a particular line from an internal table with the logical operators......
Thanks in advance...............
03-05-2009 6:30 AM
03-05-2009 6:30 AM
03-05-2009 6:32 AM
HI,
you can use Loop WIth Where clause.
LOOP AT ITAB WHERE <COND>.
.....
....
ENDLOOP.
03-05-2009 6:32 AM
Hi,
U can loop the particular internal table as:
loop at itab into wa where filedname LT '200'.
do ur coding..
endloop.
check for sy-subrc.
if sy-subrc = 0...that means there is a record r more than one record.
hoe this will help u
Keerthi
03-05-2009 6:32 AM
hiii
i think using LOOP statement with condition you can achieve this.
or you can use read statement and if sy-subrc eq 0 then use condition for LT or GT.
regards
twinkal.
03-05-2009 6:38 AM
Hi Ubhka,
You can read the Internal table by two way 1) Using the Loop and 2) Using the Read statement.
1) Loop at itab into wa_itab.
If wa_itab-A LT = '200'
* the action that you would like to perfrom like moving data from one table to another or appending
*data
endif.
endloop.
2) Read table itab into wa_itab.
if wa_itab-A LT = '200'
* the action that you would like to perfrom like moving data from one table to another or appending
*data
endif.
I my view you can try with the loop. Using loop would be a good idea.
Regards,
Kittu
03-05-2009 6:39 AM
read table into work area and then apply logical test for this value in work area.
03-05-2009 6:43 AM
Hi,
Instead of read, in this case you can do a loop
loop at i_tab where field LE value.
do processing.
exit.
Endloop.
Regards.
03-06-2009 4:13 AM
08-17-2015 9:05 PM
you can also do a "DELETE itab WHERE condition" and then do your "READ TABLE", that way you won´t worry for your data being out of your range