<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Load huge data in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312585#M240</link>
    <description>&lt;P&gt;A user is going to spend time scrolling through 70,000 records?  I think they should get a medal for patience.  My best suggestion would be to review the business process instead of trying to handle it in code.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 14:26:09 GMT</pubDate>
    <dc:creator>Ryan-Crosby</dc:creator>
    <dc:date>2017-02-03T14:26:09Z</dc:date>
    <item>
      <title>Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaq-p/312581</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I have a server query with 70,000 records. This takes about 6 seconds. This data I insert into a m.Table. &lt;/P&gt;&lt;P&gt;My question is now, if I only want to display the first 100 records and only by scrolling another 100, I still have to load the complete data set (70,000) before? Or is it possible to query the files from the server only when scrolling? &lt;/P&gt;&lt;P&gt;Best regards &lt;/P&gt;&lt;P&gt;Yannick&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 21:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaq-p/312581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2024-01-21T21:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312582#M237</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/saphelp_nw75/helpdata/en/91/64ba7047b74a25a19baf9c5bb986ae/content.htm" target="test_blank"&gt;https://help.sap.com/saphelp_nw75/helpdata/en/91/64ba7047b74a25a19baf9c5bb986ae/content.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 17:26:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312582#M237</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2017-02-02T17:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312583#M238</link>
      <description>&lt;P&gt;Thank you! I have never worked with oData, so I still have some problems.&lt;/P&gt;&lt;P&gt;So I load all the data from the server. What do I have to do? I guess I need to change something in the XML view.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;List
     id="test"
     items ="{
         path: 'employees&amp;gt;/'}"
     headerText="Employees"
     growing="true"
     growingThreshold="4"
     growingScrollToLoad="true"&amp;gt;

     &amp;lt;StandardListItem
         title="{employees&amp;gt;USERID}"
     /&amp;gt;
&amp;lt;/List&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;      
onInit : function() {
      var oModel = new sap.ui.model.odata.ODataModel("EmployeeODataService.xsodata/", true);
      var jsonModel = new sap.ui.model.json.JSONModel();
      oModel.read("/Employee",null,null,true,function(oData,response){
             jsonModel.setData(oData.results)
      })
      this.getView().setModel(jsonModel, "employees");
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Feb 2017 11:34:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312583#M238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-03T11:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312584#M239</link>
      <description>&lt;P&gt;We could use $top &amp;amp; $skip approach. &lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;In onInit, we could fetch only the top 5 records and populate the table&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;onInit: function () {
   var oModel = new sap.ui.model.odata.v2.ODataModel("EmployeeODataService.xsodata/", true);
    oModel.read("/Employee?$top=5", null,null,true, function(oData){
        var jsonModel = new sap.ui.model.json.JSONModel();
        jsonModel.setData(oData);
        this.getView().setModel(jsonModel, "employees");
    }.bind(this));
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;
&lt;LI&gt;Store the value of total rows so far in a variable (eg: fetchedRecords)
&lt;/LI&gt;&lt;LI&gt;Rather than growing=true, Place a button at the footer to fetch more records &amp;amp; onPress call the function to fetch the next set and append that to the model&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;var oModel = sap.ui.getCore().getModel();
oModel.read("/Employee?$top=5&amp;amp;skip="+fetchedRecords, null,null,true, function(oData){
    var oTableModel = this.getView().getModel("employees"); //Get your table model
    var aTableData = oTableModel.getProperty("/modelData/data"); // Get entries
    aTableData.push.apply(aTableData, aData); // Add more entries
    oTableModel.setProperty("/modelData/data", aTableData); // // Update model
}.bind(this));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note: I haven't tested this approach. I have seen people using $top &amp;amp; $skip approach in paginations. However, I feel that we can use this for growing table as well.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 13:43:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312584#M239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-03T13:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312585#M240</link>
      <description>&lt;P&gt;A user is going to spend time scrolling through 70,000 records?  I think they should get a medal for patience.  My best suggestion would be to review the business process instead of trying to handle it in code.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 14:26:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312585#M240</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2017-02-03T14:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312586#M241</link>
      <description>&lt;P&gt;Thank you very much! I've changed it to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;onInit : function() {
    var oModel = new sap.ui.model.odata.ODataModel("EmployeeODataService.xsodata/", true);
    var jsonModel = new sap.ui.model.json.JSONModel();
    oModel.read("/Employee?$top=50",null,null,true,function(oData,response){
         jsonModel.setData(oData.results)
         this.getView().setModel(jsonModel, "employees");
         fetchedRecords = fetchedRecords + 50;
    }.bind(this));
},

grow : function() {
    var oModel = new sap.ui.model.odata.ODataModel("EmployeeODataService.xsodata/", true);
    oModel.read("/Employee?$skip="+fetchedRecords+"&amp;amp;$top=50", null,null,true, function(oData){
         var oTableModel = this.getView().getModel("employees"); //Get your table model
         var aTableData = oTableModel.getData(); // Get entries
         aTableData.push.apply(aTableData, oData.results); // Add more entries
         oTableModel.setData(aTableData); // // Update model
         fetchedRecords = fetchedRecords + 50;
    }.bind(this));
}
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Feb 2017 12:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312586#M241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-04T12:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312587#M242</link>
      <description>&lt;P&gt;No of course not! It's just for testing.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 12:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312587#M242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-04T12:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312588#M243</link>
      <description>&lt;P&gt;Ah ok, test on then... I think the others have given you some options to work with thus far.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2017 12:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312588#M243</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2017-02-05T12:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Load huge data</title>
      <link>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312589#M244</link>
      <description>&lt;P&gt;I'd strongly discourage using sap.m.Table over sap.ui.table.Table if you need to display more than about 100 items. Even Chrome will face performance issues. IE was unusable in my experience because of that. &lt;A target="_blank" href="https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.table.Table.html"&gt;sap.ui.table.Table&lt;/A&gt; solves the problem because its DOM element doesn't "grow" as List does. When scrolling occurs and your OData is bound to the table directly (without a JSONModel in between), UI5 will handle updating data automatically by sending requests with "top" &amp;amp; "skip", which enables dealing with a huge amount of data seamlessly.&lt;/P&gt;&lt;P&gt;The only disadvantage of sap.ui.table.Table is that its design is not responsive.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2017 16:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/load-huge-data/qaa-p/312589#M244</guid>
      <dc:creator>boghyon</dc:creator>
      <dc:date>2017-02-05T16:30:52Z</dc:date>
    </item>
  </channel>
</rss>

