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

ifelse stmt in smartforms

Former Member
0 Likes
640

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
Read only

Former Member
0 Likes
611

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.

Read only

Former Member
0 Likes
611

If else conditions don't work.

Put conditions.

Read only

Former Member
0 Likes
611

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.