SAP Knowledge Base Article - Public

3735518 - SurveyResponseCollection OData Filter Returns All Records When No Match Found

Symptom

Odata Query in ‘SurveyResponseCollection’ entity set returns all available records instead of an empty response if the filter applied on 'BusinessTransactionDocumentUUID' does not match any available entry.

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to the Administrator work center
  2. Go to the OData Service Explorer work center view
  3. Select c4codataapi
  4. Click Test
  5. It opens OData Console
  6. Search for SurveyResponseCollection in the Entity Sets
  7. Select Test
  8. Method = GET and put a search link in the Method (e.g. https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SurveyResponseCollection?$format=json&$inlinecount=allpages&$select=BusinessTransactionDocumentUUID&$filter=BusinessTransactionDocumentUUID eq 'YYYYYY') *YYYYYY is an UUID that is not maintained in the system
  9. Click Execute
  10. Check Response in JSON

Result: All queries are returned

Expected Result: No queries returned.

Cause

This is the current standard behaviour of the OData service for ‘SurveyResponseCollection’ entity set. The additional filters are designed specifically for BusinessTransactionDocumentUUID. This behavior has been developed by design for the SurveyResponseCollection.

Resolution

If the feature/functionality is required urgently, please refer to KBA 3475641 - Functionality Currently not Available.

An alternative option may be to check the corresponding SAP Customer Influence Site to submit an idea:

See Also

KBA 3475641 - Functionality Currently not Available (C4C)

Keywords

odata, SurveyResponseCollection, BusinessTransactionDocumentUUID, filter, no match, returns, all records, empty result, c4codataapi , KBA , LOD-LE-SUR-EXE , Survey execution = runtime , Problem

Product

SAP Cloud for Customer core applications all versions