Skip to Content
0

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

Oct 10, 2016 at 01:26 PM

168

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mitchell Chapman Oct 11, 2016 at 10:58 PM
0

Hi Everyone,

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

Share
10 |10000 characters needed characters left characters exceeded