Skip to Content
Jul 05, 2016 at 04:26 AM

Question about Odata Query option ($top)


Hi SAPUI5 experts.

I need your assistance regarding the Odata Query option ($top) which restricts the resulting number of rows passed back in the Odata service for a specific collection, I am using the EPM Model standard Odata Service and I am going from Supplier to -> Sales Orders, And during issuing the “Expand” query option for the Odata Query I would like to also specify how many records should be returned, My SAPUI5 code is as follows where sObjectPath = BusinessPartnerSet(‘0500000000’) binding context for example:

_bindView : function (sObjectPath) {

var oViewModel = this.getModel("salesOrderView"),

oDataModel = this.getModel();


path: sObjectPath,

parameters: {

expand: "ToSalesOrders"


Could you please assist in how to pass the query option for $top?

Many Thanks