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: 

ifelse stmt in smartforms

Former Member
0 Kudos

The ifelse conditions given below:

the control is not passing into nxt condition.

elseif ( w_likp-vstel = '2011' or w_likp-vstel = '2013' or

w_likp-vstel = '2015' or w_likp-vstel = '2018' ) and

( w_lips-matkl = '130' or w_lips-matkl = '140' or

w_lips-matkl = '150' or w_lips-matkl = '200' or

w_lips-matkl = '190' ) and

( w_lips-matkl = '120' or

w_lips-matkl = '160' or w_lips-matkl = '210' or

w_lips-matkl = '230' or w_lips-matkl = '220').

move 'PUFOAM/RCMATTRESSES' to des1.

elseif ( w_likp-vstel = '2011' or w_likp-vstel = '2013' or

w_likp-vstel = '2015' or w_likp-vstel = '2018' ) and

( w_lips-matkl = '120' or w_lips-matkl = '160' or

w_lips-matkl = '210' or w_lips-matkl = '230' or

w_lips-matkl = '220')." and ( w_lips-matnr = 'PD*' ) .

move 'RCMATTRESSES' to des1.

ELSEif ( w_likp-vstel = '2011' or w_likp-vstel = '2013' or

w_likp-vstel = '2015' or w_likp-vstel = '2018' ) and

( w_lips-matkl = '130' or w_lips-matkl = '140' or

w_lips-matkl = '150' or w_lips-matkl = '200' or

w_lips-matkl = '190').

  • and ( w_lips-matnr = 'PU*' ).

move 'PUFOAM' to des1.

endif.

3 REPLIES 3

Former Member
0 Kudos

Hi Malini -

The IF-ELSE-ELSEIF doesnt not work inside smartform.

Instead of coding in the command line, try using the option called 'Alternatives' provided.

-Aarthi.

Former Member
0 Kudos

If else conditions don't work.

Put conditions.

Former Member
0 Kudos

I think your problem is in this AND statement

elseif ( w_likp-vstel = '2011' or w_likp-vstel = '2013' or

w_likp-vstel = '2015' or w_likp-vstel = '2018' ) and

( w_lips-matkl = '130' or w_lips-matkl = '140' or

w_lips-matkl = '150' or w_lips-matkl = '200' or

w_lips-matkl = '190' ) <b>and</b>

( w_lips-matkl = '120' or

w_lips-matkl = '160' or w_lips-matkl = '210' or

w_lips-matkl = '230' or w_lips-matkl = '220').

The matkl cannot be 130 and 120.