cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

Hello,

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);
oTreeTable.setModel(oServiceLinesModel);
		
var URL = "/VendorSet(Lifnr='"+ this._oLifnr + "',Ekorg='" + this._oEkorg + "')/PurDocF4(Ebeln='" + ebeln + "',Ebelp='" + ebelp + "')/ServiceNodes";<br>
oTreeTable.bindRows({
    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.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Everyone,

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

Answers (0)