The CASE-ELSE statement is a conditional expression, which is very similar to IF-THEN-ELSE, except that it allows more than two choices of outcomes for the evaluation of the controlling expression. The syntax of the CASE-ELSE statement is as follows:
CASE <ExpressionToBeEvaluated> OF <Value Set 1> : <Action Statement 1>; <Value Set 2> : <Action Statement 2>; <Value Set 3> : <Action Statement 3>; ... ... <Value Set n> : <Action Statement n>; [ELSE <Action Statement n + 1>; END;
The ExpressionToBeEvaluated must not be a record. The data type of the Value Set must be able to be automatically converted into the data type of the ExpressionToBeEvaluated. Each Value Set must be an expression, a set of values, or a range of values. The following example illustrates a typical instance of a CASE-ELSE statement:
CASE Customer."Salesperson Code" OF '2','5',&apos...