‎2017 Nov 25 7:18 PM
Hello,
I have problem during checking below code. Error msg like on below screen. I have checked 'fixed point arithmetic' checkbox so I don't have any idea how to solve this issue. Thank you in advance for help.

‎2017 Nov 25 9:19 PM
Make sure that the variable SCANNED is of type I (integer). I guess that this message occurs when you use a variable of type P with number of decimals greater than zero (syntax error message "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 ...")
‎2017 Nov 25 9:19 PM
Make sure that the variable SCANNED is of type I (integer). I guess that this message occurs when you use a variable of type P with number of decimals greater than zero (syntax error message "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 ...")
‎2017 Nov 26 9:47 AM
unfortunately I have changed on Integer and it still doesn't work.
‎2017 Nov 26 12:27 PM
Then maybe the form is only valid for the strict SQL syntax, so you should add a @ in front of variables ("host variables") i.e. use INTO @ SCANNED . Or do SELECT COUNT(*) INTO scanned FROM ... to use the non-strict syntax.
‎2017 Nov 26 3:19 PM
Thanks a lot. It works in this way:
So the solution is to change data type for Integer(I) and write code as follow.

‎2017 Nov 26 3:51 PM
Aff, I have antoher problem during group by... I was trying in many ways, with INTO @variable, @var... and with INTO at the end of select statement but it doesn't work. I would be appreciate if you have some tips. Thank you in advance.

‎2017 Nov 26 5:17 PM
I understand that the syntax is complex, and you should definitely read the ABAP documentation: SELECT. Look at the many examples, that will help you understand how "Open SQL" (the SQL in ABAP) works.
Using a comma for separating fields is allowed only in "strict syntax". The strict syntax means that the variables must be written as host variables (with leading @ ).
If the SELECT returns several lines then you must store the result into an internal table (INTO TABLE).
‎2018 Jul 25 1:15 PM
Hi,
Please replace COUNT(*) by COUNT ( * ). If you are selecting multiple columns, then move it to variables within brackets ( v1, v2 ) or use internal table for storing it.