cancel
Showing results for 
Search instead for 
Did you mean: 

Exceptions in Fox foreach statement

arjun_subhash
Active Participant
0 Kudos

Hello ,

Is it possible to prevent a Forloop to execute for a particular value?

For eg:

DATA PRODUCT TYPE ZPRODUCT.

FOREACH PRODUCT.

{KEYFIG,PRODUCT} = {KEYFIG,PRODUCT}*1.2

ENDFOR.

But i do not want this calculation to happen for a particular product. Lets say 0PRODUCT=X.

Is there any way like combining DO LOOP and IF Statement?

Thank you,

Arjun

Accepted Solutions (1)

Accepted Solutions (1)

cornelia_lezoch
Active Contributor
0 Kudos

FOREACH PRODUCT.

If PRODUCT <> x.

{KEYFIG,PRODUCT} = {KEYFIG,PRODUCT}*1.2.

endif.

ENDFOR.

Answers (1)

Answers (1)

Anand71
Active Contributor
0 Kudos

hi,

try with IF statement.

Regards,

Anand