SAP CDS SEARCHED CASE EXPR V1



Get Example source ABAP code based on a different SAP table
  


• CASE WHEN ABAP_CDS_EXPR_V1

ABAP_CDS_DDL - DDIC-Based View, searched_case_expr

ABAP_SYNTAX
... CASE WHEN cds_cond1 THEN result1
$[WHEN cds_cond2 THEN result2$]
$[WHEN cds_cond3 THEN result3$]
...
$[ELSE resultn$]
END ...

What does it do?
Complex case distinction (searched case) in a SELECT statement of a ABAP_CDS_V1_VIEW . The case distinction evaluates the conditions cds_cond1, cds_cond2, ... and returns the operand result as the result after the first THEN for which the condition is true. If none of the conditions are true, the result specified after ELSE is selected. If ELSE is not specified, the result is the null value. For the operands, general and special rules apply when specifying the conditions. The same applies to result1, result2, ... as to simple case distinction .



Latest notes: