cancel
Showing results for 
Search instead for 
Did you mean: 

Implement Sorting in SAP Gateway

Former Member
0 Kudos

Is there any recommended way to implement sorting functionality via ODAta in Gateway. Since using an OData model which is server side implementation for sorting a request is to be made now to gateway to fetch and bind the results in UI.

Are there any samples or tutorials to implement sorting at Gateway

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Steve,

Parameter on which we would like to sort can be sent as part of URL as below.

/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/FlightCollection?$orderby=carrid desc

Where result set is sorted on carrid in descending order.

We need to manual implement sorting logic in the DPC_EXT class by using importing parameter IT_ORDER of the method Get_EntitySet to get all the sort parameters which are sent as part of URL.

Regards,

Ashwin