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: 

Alternative to READ table

Former Member
0 Kudos

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...............

1 ACCEPTED SOLUTION

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Better read table and then use IF condition.

9 REPLIES 9

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Better read table and then use IF condition.

Former Member
0 Kudos

HI,

you can use Loop WIth Where clause.

LOOP AT ITAB WHERE <COND>.

.....

....

ENDLOOP.

keerthy_k
Active Participant
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

read table into work area and then apply logical test for this value in work area.

dev_parbutteea
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

isue solved.........thanks for your replies.......

julio_cabrera
Discoverer
0 Kudos

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