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 condition

Former Member
0 Likes
989

Hi Friends,

I want to check two expression with one if conditions, I have coded it this way, But I am getting error,

if it_konv-kschl EQ 'ZLMR’ OR it_konv-kschl EQ 'ZLS1’

Can any one correct it.

Thanx in advance,

Venu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
955

Hi,

You can try this.

IF (it_konv-kschl EQ 'ZLMR’ OR it_konv-kschl EQ 'ZLS1’).

  • REWARD if this helps

9 REPLIES 9
Read only

Former Member
0 Likes
955

hi

write like this

if ( ( it_konv-kschl EQ 'ZLMR’ ) OR ( it_konv-kschl EQ 'ZLS1’ ) ).

....

endif.

NB: put one space among ( and( like this

if helpful reward points

regs

Manas Ranjan Panda

Message was edited by: MANAS PANDA

Read only

0 Likes
955

Hi,

I tried with that also

if ( ( it_konv-kschl EQ 'ZLMR’ ) OR ( it_konv-kschl EQ 'ZLS1’ ) ).

Thanx in advance,

Venu

Read only

Former Member
0 Likes
955

Exactly what error u are getting bcoz this if condition should work

Read only

0 Likes
955

Incorrect logical expression: Comparison / SELECT-OPTION can only be

followed by "AND", "OR" or ")".

Thanx in advance,

Venu

Read only

Former Member
0 Likes
956

Hi,

You can try this.

IF (it_konv-kschl EQ 'ZLMR’ OR it_konv-kschl EQ 'ZLS1’).

  • REWARD if this helps

Read only

Former Member
0 Likes
955

Hi,

Try this way..

If ( ( it_konv-kschl = 'ZLMR' )OR ( it_konv-kschl = 'ZLSI') ).

endif.

Please reward for usefull answers

Read only

Former Member
0 Likes
955

Hi,

if it is not working try like this

if it_konv-kschl EQ 'ZLMR’.

<do something>

elseif it_konv-kschl EQ 'ZLS1’.

<do the same thing here also>

endif.

Regards,

Sowjanya

Read only

Former Member
0 Likes
955

try this ..

if ( ( it_konv-kschl = 'ZLMR’ ) OR ( it_konv-kschl = 'ZLS1’ ) ).

Read only

Former Member
0 Likes
955

Hi ,

data: it_kschl like konv-kschl.

data a(4) type c value 'ZLMR'.

data b(4) type c value 'ZLS1'.

if ( it_kschl eq a ) or ( it_kschl eq b ).

write:/ 'hi'.

endif.

regards,

Vjay