Symptom
- Using the odata api to retrieve a ServiceRequest object over its ObjectID returns the expected results.
- Attempting to retrieve the same object using a GET call filtering by InstallationPointID doesn't return the object:
- Attribute is marked as Filterable=True in the OData console.
- No error message is returned by the framework; the call simply does not return any record when filtering by the InstallationPointID attribute.
Environment
SAP Cloud for Customer
Reproducing the Issue
- Execute an OData GET Call to /sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection to retrieve a ServiceRequest object over its ObjectID. The call returns the expected object.
- Trying to get the same object using the Attribute 'InstallationPointID', which is marked as filterable, returns no results:
Cause
Service Requests and Installation Points are two separate business objects. When an Installation Point is added to a ticket or a ticket is created from an Installation Point, a reference node is created to establish the relationship between them. A single Installation Point can be referenced in multiple Service Requests. The entity ServiceRequestServiceReferenceObjectCollection represents the relationship between the Service Request and the corresponding associated objects. The data is successfully returned when using the reference node ID because it contains the link between the two objects. Filtering by the attribute 'InstallationPointID', does not return the object due to the structure of the data in the entity.
Resolution
- To retrieve the actual Installation Point details, use the dedicated entity for Installation Points.
- To retrieve all reference objects associated with a specific Service Request, pass the Service Request UUID directly in the GET call.
See Also
Refer to: [SAP OData API Documentation](https://help.sap.com/viewer/product/SAP_CLOUD_FOR_CUSTOMER/).
Keywords
odata api, filterable attribute, ServiceRequestServiceReferenceObjectCollection, Installation Point, Service Request UUID, GET API call, Filterable=True, reference node, relationship entity, data retrieval, SAP C4C , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem
SAP Knowledge Base Article - Public