ABAP CDS - cast_expr Syntax ... CAST( operand AS dtype[PRESERVING TYPE]) ... Effect Casting in aSELECTstatementof aCDS view. The cast expressionconvertsthe value of the operandoperandto the dictionary type specified bydtype. The result has the typedtype. The following can be specified ...
If SQL expressions other than operands are used in a cast expression or if a data type other than FLTP is specified asdtype, the syntax check is run instrict mode from Release 7.50. This mode handles the statement more strictly than the normal syntax check. ...
A single expression not followed by the object component selector->can be specified as a standalone statement. This makes it possible to test the feasibility of a down cast by catching the associated exception CX_SY_MOVE_CAST_ERROR.