You are trying to use the Odata queries below, but system shows the error message: "Operands of logical operator 'and' are not valid".
ge and lt.
gt and le.
gt and lt.
SAP Cloud for Customer
SAP Business ByDesign
Reproducing the Issue
Open the internet browser and use a query, such as: https://<myTenantURL>/sap/c4c/odata/v1/c4codata/OpportunityCollection?$filter=AccountID ge '1234' and AccountID lt '1240'
This is the expected system behavior. Logical operator AND only works when used between different properties.
$filter=OpportunityID ge 'YYYY' and Name/content eq 'Test'
$filter=PartyID ge 'ZZZZ' and PartyID le 'XXXX'
(YYYY represents the ID of the Opportunity, ZZZZ represents one Party ID and XXXX represents another Party ID)
Logical operator OR only works when used between same properties.
$filter=PartyID ge 'ZZZZ' or PartyID le 'XXXX'
$filter=PartyID ge 'ZZZZ' or OpportunityID le 'XXXX'
Odata Filters, Query, Logical operator , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem