Skip to Content

Invalid $top value when trying to bind TreeTable to oData service


I am currently trying to bind an oData service to a TreeTable object.
When I open the dialog with the TreeTable (created from a fragment.xml), the TreeTable is created and an oData call is made.

However in that oData call, the $top value is defaulting to $top=1.7976931348623157e+308 (which is javascript number.MAX_VALUE) and the HTTP request is returning the following error: "Invalid system query options value".

If I remove the $top value, the oData call is successful.

The following is the code I am using to bind:

var oServiceLinesModel = new sap.ui.model.odata.ODataModel(this.getModel().sServiceUrl, false);
var URL = "/VendorSet(Lifnr='"+ this._oLifnr + "',Ekorg='" + this._oEkorg + "')/PurDocF4(Ebeln='" + ebeln + "',Ebelp='" + ebelp + "')/ServiceNodes";<br>
    path : URL,
    parameters : {
	expand : "ServiceNodeToParent",
	navigation : {  
             'Nodes' : 'ServiceNodeToParent'

I have tried setting the threshold property for the TreeTable but this does not appear to do anything.

Does anyone know if I am doing something wrong in my code to cause this error or if this is a SAP UI issue? Note we are running SAP UI runtime version 1.36.15.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 11, 2016 at 10:58 PM

    Hi Everyone,

    Managed to get this working using sap.ui.model.odata.v2.ODataModel and annotations instead.

    Add comment
    10|10000 characters needed characters exceeded