Symptom
- When searching or filtering records by a
displayIdfield in an SAP Sales Cloud and SAP Service Cloud, Version 2 (SSv2) Custom Service UI backed by an SAP CAP (OData v4) backend, the following error is returned:
Parsing URL failed at position 65: Expected "(", "eq", "ge", "gt", "in", "le", "lt", or "ne" but "s" found.
- The error occurs on any search or filter action that targets the
displayIdfield through the Custom Service.
Environment
- SAP Sales Cloud and SAP Service Cloud, Version 2
- SAP Cloud Application Programming Model (SAP CAP) as the backend service
Cause
- The Custom Service metadata has
apiStyleset toRESTon one or more API definitions. - When
apiStyleisREST, SSv2 generates a non-standard filter operatorsw(starts with) for search queries. - SAP CAP only supports standard OData v4 filter syntax and does not recognise the
swoperator, causing the parsing error.
Resolution
Set apiStyle to OdataV4 on all API definitions in the Custom Service metadata. SSv2 will then generate valid OData v4 filter functions (startswith(), contains()) that SAP CAP can process correctly.
Steps
- Export the metadata JSON from SSv2 Custom Services.
- For each entry in the
apisarray, change:-
"apiStyle": "REST" to "apiStyle": "OdataV4"
-
- Re-upload the updated metadata JSON to SSv2 Custom Services.
Keywords
apiStyle, REST, OdataV4, sw operator, OData v4 filter, displayId, Custom Services, CAP backend, parsing URL failed, filter operator, startswith, contains , KBA , CEC-CRM-CZM-EXT , Extensibility for SAP Sales/Service Cloud , Known Error
Product
SAP Sales Cloud and SAP Service Cloud Version 2 all versions
SAP Knowledge Base Article - Public