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: 

IF FOR CEHCKING 3 CONDITIONS

Former Member
0 Kudos

Hi experts,

I need to check the value of Return order with 3 differnt values,please Advice

1 ACCEPTED SOLUTION

former_member387317
Active Contributor
0 Kudos

hi

use AND operator for this purpose..

something like this...

IF value = '100' and value2 = '70' and value3 = '102'.

        • ur logic here ****

ENDIF.

Thanks & Regards

ilesh 24x7

8 REPLIES 8

Former Member
0 Kudos

Hi,

Not sure what you are looking for..Do you want IF condition??

Thanks,

Naren

former_member387317
Active Contributor
0 Kudos

hi

use AND operator for this purpose..

something like this...

IF value = '100' and value2 = '70' and value3 = '102'.

        • ur logic here ****

ENDIF.

Thanks & Regards

ilesh 24x7

0 Kudos

THANKS,

I need to check only one value not value 1 or value 2 only one variable with 3 values

0 Kudos

Hi

As you want the single variable to be checked for three different values...

So for this case you have to use OR operator instead of AND operator.

IF variable1 = '100' <b>OR</b> variable1 = '20' <b>OR</b> variable1 = '230'.

        • UR LOGIC HERE ******

ENDIF.

I hope your problem is solved now.

Thanks & Regards

ilesh 24x7

Former Member
0 Kudos

Use IF...ENDIF with AND operator or CASE...ENDCASE statement....

Former Member
0 Kudos

hi,

use case endcase statement.

CASE GI_SALES-VKORG.

WHEN 'BDN'.

MOVE '4033' TO GI_SALES-VKORG.

WHEN 'CNAJ'.

MOVE '4122' TO GI_SALES-VKORG.

WHEN 'CNAM'.

MOVE '4011' TO GI_SALES-VKORG.

endcase.

regards

siva

Former Member
0 Kudos

Hi,

IF VAL = '10' OR VAL = '12' OR VAL = '13'.

                  • do the appropriate logic here.

ENDIF.

Thanks

Naren

Former Member
0 Kudos

Hi Karthick,

Refer this code :

suppose d_value can contain three values :

v1,v2,v3.

case d_value.

when 'v1'.

do whatever u want.

when 'v2'.

do whatever u want.

when 'v3'.

do whatever u want.

endcase.

Regards,

Hemant