Get Example source ABAP code based on a different SAP table
ABAP_SQLEXP > - Arithmetic Calculations This example demonstrates arithmetic calculations in SQL expressions>.
ABAP_SOURCE_CODE DEMO CL_DEMO_SQL_EXPR_ARITH
ABAP_DESCRIPTION Calculations are made and functions called in a list of columns specified after SELECT>.
To perform floating point division> with integer columns, these columns are updated to the type DECFLOAT34> using cast>>.
Integer divisions with the functions DIV>>, MOD>>, and DIVISION>> do not require this update.
A host variable> is added to the absolute value of a difference between column values. Using the alias names defined after AS>, the results are assigned to identically named columns of an internal table results> declared inline. The result of the final calculation is used as a sort criterion.