Application Development and Automation 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 only

Read Statement

Former Member
0 Likes
1,214

Hi,

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,003

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
Read only

Former Member
0 Likes
1,004

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

Read only

Former Member
0 Likes
1,003

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.

Read only

former_member386202
Active Contributor
0 Likes
1,003

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

Read only

Former Member
0 Likes
1,003

hii shruthi

sry it is not possible

regards

Jaipal

Read only

Former Member
0 Likes
1,003

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.