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

what is wrong with this if statement

Former Member
0 Likes
421

If

ELSEIF   ((rcust[] is not initial)      "Customer # Range
 OR   (rdate[] is not initial)      "Creation Date Range
 OR   (rvkorg[] is not initial)      "Sales Organizatiopn
 OR   (rspart[] is not initial)     "Division
 OR   (rktagr[] is not initial)     "Reason code Range
 OR   (rktaer[] is not initial)      "Outcomme Code Range
 OR   (rktaeb[] is not initial)     "Analysis Code range
 OR   (rernam[] is not initial)     "Created by
 OR   (rktaar[] is not initial))     "Activity type

select *

**********

**********

**********

else

*******

endif.

It says incorrect logical expression;

when i change it to this

ELSEIF   (rcust[] is not initial)      "Customer # Range
 OR   (rdate[] is not initial)      "Creation Date Range
 OR   (rvkorg[] is not initial)      "Sales Organizatiopn
 OR   (rspart[] is not initial)     "Division
 OR   (rktagr[] is not initial)     "Reason code Range
 OR   (rktaer[] is not initial)      "Outcomme Code Range
 OR   (rktaeb[] is not initial)     "Analysis Code range
 OR   (rernam[] is not initial)     "Created by
 OR   (rktaar[] is not initial)     "Activity type

It says cannot have more than one line in a logical expression.

***************************************

I just want to check that none of these values coming from select options are blank, before I trigger the code

If

ELSEIF   ((rcust[] is not initial)      "Customer # Range
 OR   (rdate[] is not initial)      "Creation Date Range
 OR   (rvkorg[] is not initial)      "Sales Organizatiopn
 OR   (rspart[] is not initial)     "Division
 OR   (rktagr[] is not initial)     "Reason code Range
 OR   (rktaer[] is not initial)      "Outcomme Code Range
 OR   (rktaeb[] is not initial)     "Analysis Code range
 OR   (rernam[] is not initial)     "Created by
 OR   (rktaar[] is not initial))     "Activity type

select *

**********

**********

**********

else

*******

endif.

It says incorrect logical expression;

when i change it to this

ELSEIF   (rcust[] is not initial)      "Customer # Range
 OR   (rdate[] is not initial)      "Creation Date Range
 OR   (rvkorg[] is not initial)      "Sales Organizatiopn
 OR   (rspart[] is not initial)     "Division
 OR   (rktagr[] is not initial)     "Reason code Range
 OR   (rktaer[] is not initial)      "Outcomme Code Range
 OR   (rktaeb[] is not initial)     "Analysis Code range
 OR   (rernam[] is not initial)     "Created by
 OR   (rktaar[] is not initial)     "Activity type

It says cannot have more than one line in a logical expression.

***************************************

I just want to check that none of these values coming from select options are blank, before I trigger the code

1 REPLY 1
Read only

Former Member
0 Likes
377

Sorry, some white spaces were missing with the braces, thats why it was not working. The second if statement worked fine