Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP Database Accesses →  Open SQL →  Open SQL - Read Accesses →  SELECT →  SELECT - result →  SELECT - select_list →  SELECT - col_spec →  SELECT - sql_exp 

sql_exp - sql_cast

Other versions: 7.31 | 7.40 | 7.54


... cast( operand AS dtype ) ...


Modifies the type in Open SQL. This SQL expression converts the value of the operand operand to the dictionary type specified by dtype. The result has the type dtype.

The following dictionary types can be specified for dtype:

  • fltp
For the operand operand, columns col of database tables or views plus host variables dobj and literals of all numeric types except decimal floating point numbers are possible. The result is a representation of the numeric value of the operand in the dictionary type FLTP. No expressions can be specified as an operand.
  • dec(len,frac)
under construction

If the operand of the expression has the null value, the result of the expression is also the null value.


Type modifications can by used in arithmetic expressions, for example to specify operands of types other than FLTP in floating point expressions.