SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

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

create new ABAP program with Fixed Point Arithmetic attibute marked

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.

SELECT vbeln, posnr, matnr
 FROM vbap
 INTO TABLE @DATA(lt_vbap)
 UP TO 10 ROWS.
Code

Open SQL Select statement with inline internal table declaration

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.

menu steps for ABAP program 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.

activate ABAP program attribute fixed point arithmetic flag

Afterwards, ABAP programmers can use new Open SQL enhancements in their ABAP program and includes without any error



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.