Activate Fixed Point Arithmetic Flag for Open SQL Statement
ABAP developer who wants to use Open SQL statements with new additions of ABAP 7.40 ABAP program fixed point arithmetic attribute should be activated. Otherwise during ABAP program activation an error will display message "This Open SQL statement uses additions that can only be used when the fixed point arithmetic flag is activated"
When a programmer creates a new ABAP report, on the initial screen where ABAP program attributes are first set like title and type attributes by default fixed point attribute flag is marked. If this ABAP program attribute is cleared, it will cause problems when the developer tries to code using new ABAP syntax enhancements introduced with ABAP 7.40
Let's assume the programmer cleared or unmarked the fixed point attribute flag and code following SELECT statement where an inline table declaration is executed at the same time.
Here is the ABAP code block of the Open SQL Select statement with inline internal table declaration.
As you see the selected column list is a comma seperated list of table columns.
Besides lt_vbap target internal table is first declared and used at the same time right after INTO TABLE in the SELECT statement which is considered as an inline variable declaration in Open SQL.
Although the ABAP code syntax is correct, since ABAP program attribute fixed point arithmetic flag is not activated, the ABAP editor will throw following error when report is being compiled or activated.
This Open SQL statement uses additions that can only be used when the fixed point arithmetic flag is activated (such as CASE expressions or host variables in expressions).
Developers can also experience this error while developing in ABAP report includes. In such cases to activate fixed point arithmetic flag, they have to go up in the code hierarchy till the main report for checking this program attribute.
When you reach the main ABAP report, using the top menu on ABAP Editor SE38 follow menu options: Goto > Attributes.
Then make sure you mark or check the Fixed point arithmetic on the Program Attributes screen of the main ABAP report as seen in below screenshot.
Afterwards, ABAP programmers can use new Open SQL enhancements in their ABAP program and includes without any error