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

problem in IF statement

Former Member
0 Likes
433

I am writing this particular if statement under Loop. Here s_sgsart is an input parameter. But when i gives 51A in input parameter i.e in s_sgsart then also error message is displayed.

Plz help

LOOP AT s_sgsart.

IF s_sgsart-low NE '51A' OR

s_sgsart-low NE '52A' OR

s_sgsart-low NE '53A' OR

s_sgsart-low NE '54A' OR

s_sgsart-low NE '55A'.

MESSAGE e001(t4) .

ENDIF.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
414

hi Anurodh,

replace all ORs with ANDs.

ec

3 REPLIES 3
Read only

JozsefSzikszai
Active Contributor
0 Likes
415

hi Anurodh,

replace all ORs with ANDs.

ec

Read only

Former Member
0 Likes
414

What error message you are getting?

Read only

Former Member
0 Likes
414

Because even though first condition is failed.... reamining all conditions are satisfying condition...

tha's why you are getting error message