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: 

Read Statement

Former Member
0 Kudos
335

Hi,

Is it possible to use Not Equalto(NE) operator in the Read statement.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
124

No...

u cannot use 'EQ' symbol even..

you can only use '=' in read statement !!

use this piece of code....

<b>loop at itab into work_area where field1 ne value1.

exit.

endloop.</b>

now WORK_AREA contains the required value....

Regards,

Sai Ramesh

5 REPLIES 5

Former Member
0 Kudos
125

No...

u cannot use 'EQ' symbol even..

you can only use '=' in read statement !!

use this piece of code....

<b>loop at itab into work_area where field1 ne value1.

exit.

endloop.</b>

now WORK_AREA contains the required value....

Regards,

Sai Ramesh

Former Member
0 Kudos
124

Hi,

you can not use NE, GT, GE, LT, LE while reading the internal table with read statement.

you can loop through that table and in where clause you can use all the above operators.

reward if needful.

Thanks,

Sreeram.

former_member386202
Active Contributor
0 Kudos
124

Hi,

No its not possible but u can do like that

Loop at itab.

read table itab2 with key

if sy-subrc eq 0.

then check ur condition here (if not equal to)

statement

endif

endif.

endloop.

Regards,

Prashant

Former Member
0 Kudos
124

hii shruthi

sry it is not possible

regards

Jaipal

Former Member
0 Kudos
124

Hi Shruti,

You cannot use these special operators with read stmt.but you can do like this with the help of work area(wa).

Plz do reward if useful.

Thankx.

loop at itab into wa where field1 ne value1.

exit.

endloop.

wa contains the required value....Apply all conditions on work area.