Symptom
You are trying to use sorting with the $orderby option in an expanded navigation property from a collection, for example:
https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter=ID eq 'ZZZZZZZ'&$expand=ServiceRequestTextCollection&$orderby=ServiceRequestTextCollection/CreatedOn desc
(XXXXXX represents the number after 'my' in the tenant URL / ZZZZZZZ represents the service request ID)
But you are receiving an error that may be similar to this:
In the context of Data Services an unknown internal server error occured|An exception with the type CX_SY_MOVE_CAST_ERROR occurred, but was neither handled locally, nor declared in a RAISING clause|Source type \CLASS=CL_DS_EDM_NAV_PROPERTY is not compatible, for the purposes of assignment, with target type \INTERFACE=IF_DS_EDM_PROPERTY
Read more...
Environment
-
SAP Cloud for Customer.
Product
Keywords
sorting, orderby, text collection , KBA , AP-RC-ODF , OData framework (C4C Only) , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.