sql_exp - sql_case
7.31 | 7.40 | 7.54
Simple case distinction
1. ... CASE sql_exp
WHEN sql_exp1 THEN result1
[WHEN sql_exp2 THEN result2]
Complex case distinction
2. ... CASE WHEN sql_cond1 THEN result1
[WHEN sql_cond2 THEN result2]
[WHEN sql_cond3 THEN result3]
- Specifying a case distinction always means specifying an SQL expression. Case distinctions can only be specified for operand positions for which SQL expressions are possible.
- A conflict between SQL language element
CASEand a column named CASE cannot occur because ABAP Dictionary does not permit a column with this name to be created. However, if a column with this name does exist, it must be prefixed with the escape character
!when it is specified in an ABAP SQL statements.
- A maximum of 10 case distinctions can be nested with