Skip to Content

Error: Send http request with huge $top query value by UI5

I add an <sap.m.Tree>. When I click the subnode, it sent http request to fetch data with huge $top value, which makes failure. How can I solve it?


<Tree id="subtaskTree" > <StandardTreeItem title="{object_id}"/> </Tree>


	path: location.hash.split("&")[1],
	// template: new sap.m.StandardTreeItem(),
	template: this.getView().byId("subtaskTree").getItems()[0].clone(),
	parameters: {
		expand: "to_subtask",
		navigation: {
			'z11_c_task_tp': 'to_subtask'


The problem is, when I click node"13",it send http request:

GET z11_c_task_tp(guid=guid'00505682-87ad-1ee7-9eeb-7f3d5b1203cc',IsActiveEntity=true)/to_subtask?$expand=to_subtask&$skip=0&$top=9007199254740991&$inlinecount=allpages

it caused error:

2017-08-16 13:44:47.172195 The following problem occurred: HTTP request failed400,Bad Request,{"error":{"code":"005056A509B11EE1B9A8FEC11C22F78E","message":{"lang":"en","value":"Invalid system query options value"},"innererror":{"transactionid":"B86FC2D254A64C818715D7D04F0E0229","timestamp":"20170816054446.7395070","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis ("}}}} -

result.png (3.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 16, 2017 at 04:14 PM

    Hi Daisy,

    That's the result of Number.MAX_VALUE.

    Check out this post:

    It's a known issue and was fixed this year:

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks. I tried it and it's doable.

      ], function(Controller, Tree, ListBase) {
      	"use strict";
      	Tree.prototype.updateAggregation = function(sName) {
      		if (sName != "items") {
      			return ListBase.prototype.updateAggregation.apply(this, arguments);
      		// Reuse the ListBinding from ManagedObject.updataAggregation
      		var oBindingInfo = this.getBindingInfo("items"),
      			oBinding = this.getBinding("items"),
      			fnFactory = oBindingInfo.factory,
      		// Update a single aggregation with the array of contexts. Reuse existing children
      		// and just append or remove at the end, if some are missing or too many.
      		function update(oControl, aContexts) {
      			var aChildren = oControl.getItems() || [],
      			if (aChildren.length > aContexts.length) {
      				for (var i = aContexts.length; i < aChildren.length; i++) {
      			for (var i = 0; i < aContexts.length; i++) {
      				oContext = aContexts[i];
      				oClone = aChildren[i];
      				if (oClone) {
      					oClone.setBindingContext(oContext, oBindingInfo.model);
      				} else {
      					oClone = fnFactory(oControl.getId() + "-" + i, oContext);
      					oClone.setBindingContext(oContext, oBindingInfo.model);
      		// Get all nodes.
      		aContexts = oBinding.getContexts(0, 1000);
      		// If factory function is used without extended change detection, destroy aggregation
      		if (!oBindingInfo.template) {
      		update(this, aContexts);