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

If statement

Former Member
0 Likes
1,030

Hi,

I have 3 constants c1,c2,c3.

I have to check

<b>IF wa_temp NE c1 OR c2 OR c3</b>.

.........do something

i want to achieve the above functionality.

Thanks in advance.

Regards,

Ratna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,010
IF not wa_temp eq C1 or
    not wa_temp eq C2 or
    not wa_temp eq C3 .

ENDIF.
11 REPLIES 11
Read only

Former Member
0 Likes
1,010

Hi....

Write like this......

IF wa_temp NE c1 OR wa_temp NE c2 OR wa_temp NE c3.

.........do something

Reward points if useful......

Suresh......

Read only

Former Member
0 Likes
1,011
IF not wa_temp eq C1 or
    not wa_temp eq C2 or
    not wa_temp eq C3 .

ENDIF.
Read only

Former Member
0 Likes
1,010

hi,

i think u can use <b>CASE</b> stm

ravi

Read only

Former Member
0 Likes
1,010

hi,

If wa_temp ne c1.

do something

elseif wa_temp ne c2.

do something

elseif wa_temp ne c3.

do something.

endif.

regards

Kannaiah

Read only

Former Member
0 Likes
1,010

hi,

write the code in this way:

if wa_temp ne c1 or wa_tem ne c2 or wa_temp ne c3.

//....

endif.

Read only

Former Member
0 Likes
1,010

Hi,

Do like this.

if wa_temp NE c1 OR

wa_temp NE c2 OR

wa_temp NE c3.

(Write your logic here)

else.

(write logic here if needed)

endif.

Kindly Reward points if helpful

Thanks

Pranati

Read only

anversha_s
Active Contributor
0 Likes
1,010

hi,

do this.

IF wa_temp NE c1 

     if wa_temp NE c2 

         if wa_temp NEc3.

         " do what u want.

          endif.

    endif.

endif.

rgds

Anversha

Read only

Former Member
0 Likes
1,010

u will code like this

IF wa_temp NE c1 OR wa_temp NE c2 OR wa_temp NE c3

do something

endif.

in case u want something else do elaborate ur ques

regards

navjot

Read only

Former Member
0 Likes
1,010

IF wa_temp not in (c1, c2, c3).

endif.

Read only

Former Member
0 Likes
1,010

If wa_temp ne c1 and

wa_temp ne c2 and

wa_temp ne c3.

do something

endif.

Read only

Former Member
0 Likes
1,010

Hi Ratna,

Please check this:

if wa_temp <> c1 or

wa_temp <> c2 or

wa_temp <> c3.

endif.

Thanks&Regards,

Siri.