SAP Knowledge Base Article - Public

2541485 - SQL Syntax error in Analysis for Office

Symptom

One of the errors below occur in Analysis for Office when the query/workbook/report was executed using a range for a variable:

SQL error.png SQL error 2.png

-----------------------------
An exception occurred in one of the data sources. SAP BI Add-in has disconnected all data sources.
Nested exception. See inner exception below for more details
sql syntax error: incorrect syntax near ")": line 1 col 434 (at pos 434)
Operation could not be carried out for
An error occurred when getting data from the processor.
Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
-----------------------------
An exception occurred in one of the data sources. SAP BI Add-in has disconnected all data sources. 
Nested exception. See inner exception below for more details
sql syntax error: incorrect syntax near "BETWEEN": line 1 col 370 (at pos 370)
Operation could not be carried out for
An error occurred when getting data from the processor.
Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
-----------------------------

The RSTT trace shows the following entries:

Error in >> Execution of function module BICS_PROV_GET_MEMBERS
sql syntax error: incorrect syntax near ")": line 1 col 434 (at pos 434)
Operation could not be carried out for
An error occurred when getting data from the processor.
CL_SQL_STATEMENT >> Row: Inc: 36 Prog: EXECUTE_QUERY

or

Error in >> Execution of function module BICS_PROV_GET_MEMBERS
sql syntax error: incorrect syntax near "BETWEEN": line 1 col 370 (at pos 370)
Operation could not be carried out for
An error occurred when getting data from the processor.
CL_SQL_STATEMENT >> Row: Inc: 36 Prog: EXECUTE_QUERY

Environment

SAP Analysis for Microsoft Office

Reproducing the Issue

  • Execute query/workbook/report in Analysis for Office;
  • Enter a range for a variable in variable screen;
  • Expand the members in Design Panel as shown below:
    Expand members.png

Resolution

Check and implement the SAP note 2447727 if applicable.

See Also

2447727 - SAP HANA view: Problems with range restrictions

Keywords

error, range, exception, sql, backend, BETWEEN, parentheses , KBA , BI-RA-AO-XLA , Excel Addin , BW-BEX-OT-F4 , MasterData read services , Problem

Product

SAP Analysis for Microsoft Office all versions