SAP Knowledge Base Article - Public

3599079 - Error in OData Query

Symptom

You have created an OData Query which is based on filter using operator "OR".
When executed, an error is noticed as :-  "Operands of logical operator ' ' are not valid".

Environment

SAP Business ByDesign

Reproducing the Issue

For example, the query looks like this :-
https://myXXXXXX.businessbydesign.cloud.sap/sap/byd/odata/ana_businessanalytics_analytics.svc/RPXXXXXX_XXXXXQueryResults?........&$filter=(CDOC_UUID eq '1' or CACCDOCTYPE eq '2')&$top=1000
And it shows error on the screen as  : "Operands of logical operator ' ' are not valid".

Here :
myXXXXXX.businessbydesign.cloud.sap = Tenant URL
RPXXXXXX_XXXXX = Report ID
Taking example of 2 characteristics : CACCDOCTYPE and CDOC_UUID

Cause

"OR" operator cannot be used with 2 characteristics in the OData Query

Resolution

If you are using OR operator in filter then use same characteristic ID rather then different.

Keywords

OData query; operator "OR" , KBA , AP-RC-ANA-BYD , ByD Analytics , Problem

Product

SAP Business ByDesign all versions