Ansicht
Dokumentation
ABENCDS_F1_SEARCHED_CASE_EXPR - CDS F1 SEARCHED CASE EXPR
BAL_S_LOG - Application Log: Log header data RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
- searched_case_expr
... CASE WHEN cond_expr1 THEN result1
$[WHEN cond_expr2 THEN result2$]
$[WHEN cond_expr3 THEN result3$]
...
$[ELSE resultn$]
END ...
Effect
Complex case distinction (searched case) in a SELECT statement of a CDS view. The case distinction evaluates the conditions cond_expr1, cond_expr2, ... 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 zero value. Special rules apply when specifying the conditions. The same applies for result1, result2, ... as for simple case distinction.
Notes
Example
The following CDS view has a complex case distinction in the SELECT list.
The program DEMO_CDS_SEARCHED_CASE uses SELECT to access the view and shows the result.
Fill RESBD Structure from EBP Component Structure BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 2760 Date: 20240419 Time: 233402 sap01-206 ( 49 ms )