Skip to Content
Author's profile photo Kiran Israni

Aggregation Binding using Northwind URL and functionality

Hello Folks

Another blog of aggregation binding.

The following example is created in eclipse. To run the sample code in SAP WEBIDE, there will be minor changes. If your basics are clear, then surely, you will spot the change. If you face any challenge while using the sample code in SAP WEBIDE, feel free to comment, and I will help you.

  1. Create a project in Eclipse. My project structure is as shown below:

2. Sample Code in Home.View.xml

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="charts.Home" xmlns:html="">
<Page title="Products List">
<List id="idProducts" items="{ProductModel>/results}" noDataText="Loading...">
<StandardListItem title="{ProductModel>ProductName}"/>

3. Sample Code in Home.controller.js

onInit: function() {
		// local proxy for cross-domain access
		// create OData model from Northwind URL
		var oModel = new sap.ui.model.odata.ODataModel("proxy/http/", true);"/Products", null, null, true, fSuccess, fError);
		//If data is successfully read
		function fSuccess(productdata){
			var oProducts = new sap.ui.model.json.JSONModel();
		//If fails to read data
		function fError(oEvent){
		 console.log("Error occured while reading Product Data!")


Note : If you are getting error “XMLHttpRequest cannot load$metadata. Invalid HTTP status code 501”  then use url as proxy/http/services……………else, http://services……… will work.


Please revert for any query.





Kiran Israni



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Zaigham Zaidi
      Zaigham Zaidi

      Hi Kiran,

      Could you please provide any link to learn the basics, samples step by step... for covering all topics i'm a newbie in sap ui5.



      Author's profile photo Bibhu Behera
      Bibhu Behera

      Please follow this SAPUI5 course in openSAP

      Developing Web Apps with SAPUI5