<?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: Additional GET commands in a batch operation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362699#M24445</link>
    <description>&lt;P&gt;Hello Venky,&lt;/P&gt;&lt;P&gt;            Whenever there is an aggregation binding in UI5 , the framework will automatically trigger the count call , so that controls like table ,list can provide a paging , growing functionality. This is precisely the reason why the $top and $skip keep getting appended to your request. &lt;/P&gt;&lt;P&gt;            I would suggest you to set the defaultCountMode to Inline in either &lt;/P&gt;&lt;P&gt;            1. Manifest.json &lt;/P&gt;&lt;P&gt;            2. In the component or view hook method by using javascript code model.setDefaultCountMode("Inline") .&lt;/P&gt;&lt;P&gt;            The use of "Inline" appends one more parameter to your request $inlineCount=allpages which makes only request (instead of 2 requests) but also retrieves the count and everything else works seamlessly.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Veera&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2017 03:49:15 GMT</pubDate>
    <dc:creator>former_member228602</dc:creator>
    <dc:date>2017-03-03T03:49:15Z</dc:date>
    <item>
      <title>Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaq-p/362693</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When i make a read call for an odatamodel for one entity, in the chrome console, if i check that $batch operation, there are &lt;STRONG&gt;2 additional calls &lt;/STRONG&gt;which i never included as part of filters or parameters:&lt;/P&gt;&lt;P&gt;GET Entity1/$count HTTP/1.1 &lt;/P&gt;&lt;P&gt;GET Entity1?$skip=0&amp;amp;$top=100 HTTP/1.1 &lt;/P&gt;&lt;P&gt;Not sure why these calls are made via $batch request.&lt;/P&gt;&lt;P&gt;Anybody knows how to avoid these calls ?&lt;/P&gt;&lt;P&gt;BR,&lt;BR /&gt;Venky&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 05:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaq-p/362693</guid>
      <dc:creator>venkatesha_n</dc:creator>
      <dc:date>2017-02-23T05:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362694#M24440</link>
      <description>&lt;P&gt;Update model settings in manifest.json and use the property '&lt;B&gt;defaultCountMode&lt;/B&gt;' as 'None', this will avoid the call for $count.&lt;/P&gt;&lt;P&gt;I think second request is still required. Show me your batch request and XML view binding.&lt;/P&gt;&lt;P&gt;Below is the code for 'manifest.json'&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"sap.app": {
    "dataSources": {
	  "invoiceRemote": {
		"uri": "https://services.odata.org/V2/Northwind/Northwind.svc/",
		"type": "OData",
		"settings": {
		  "odataVersion": "2.0",
                  "defaultCountMode": "None"      //--&amp;gt; this removes count mode in batch request
		}
	  }
}

"sap.ui5": {
    "models": {
         "dataSource": "invoiceRemote"
     }
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 17:07:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362694#M24440</guid>
      <dc:creator>former_member365727</dc:creator>
      <dc:date>2017-02-23T17:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362695#M24441</link>
      <description>&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;I tried it, but it wont accept, giving syntax error--&amp;gt; &lt;STRONG&gt;Schema error: Manifest Json: "sap.app".dataSources[keys5.0].settings-  has additional properties&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any idea why am i receiving this error.&lt;/P&gt;&lt;P&gt;BR,&lt;BR /&gt;Venky.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 07:54:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362695#M24441</guid>
      <dc:creator>venkatesha_n</dc:creator>
      <dc:date>2017-03-01T07:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362696#M24442</link>
      <description>&lt;P&gt;Can you show your manifest.json file?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 16:38:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362696#M24442</guid>
      <dc:creator>former_member365727</dc:creator>
      <dc:date>2017-03-01T16:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362697#M24443</link>
      <description>&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;Here i have attached manifest.json &lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/23192-capture.png"&gt;capture.png&lt;/A&gt;   &lt;A href="https://answers.sap.com/storage/temp/23193-2nd-half.png"&gt;2nd-half.png&lt;/A&gt;  &lt;/P&gt;&lt;P&gt;BR,&lt;BR /&gt;Venky.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 06:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362697#M24443</guid>
      <dc:creator>venkatesha_n</dc:creator>
      <dc:date>2017-03-02T06:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362698#M24444</link>
      <description>&lt;P&gt;My mistake. Property "defaultCountMode" should be set in "sap.ui5". Refer below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"sap.app": {
    "dataSources": {
	  "invoiceRemote": {
		"uri": "https://services.odata.org/V2/Northwind/Northwind.svc/",
		"type": "OData",
		"settings": {
		  "odataVersion": "2.0"
		}
	  }
}

"sap.ui5": {
    "myModel": {
        "models": {
               "type": "sap.ui.model.odata.v2.ODataModel",
                "dataSource": "invoiceRemote",
                "settings": { 
                       "defaultCountMode": "None"     //Place it here
                 }
         }
     }
}

&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/23366-manifest.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 17:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362698#M24444</guid>
      <dc:creator>former_member365727</dc:creator>
      <dc:date>2017-03-02T17:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362699#M24445</link>
      <description>&lt;P&gt;Hello Venky,&lt;/P&gt;&lt;P&gt;            Whenever there is an aggregation binding in UI5 , the framework will automatically trigger the count call , so that controls like table ,list can provide a paging , growing functionality. This is precisely the reason why the $top and $skip keep getting appended to your request. &lt;/P&gt;&lt;P&gt;            I would suggest you to set the defaultCountMode to Inline in either &lt;/P&gt;&lt;P&gt;            1. Manifest.json &lt;/P&gt;&lt;P&gt;            2. In the component or view hook method by using javascript code model.setDefaultCountMode("Inline") .&lt;/P&gt;&lt;P&gt;            The use of "Inline" appends one more parameter to your request $inlineCount=allpages which makes only request (instead of 2 requests) but also retrieves the count and everything else works seamlessly.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Veera&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 03:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362699#M24445</guid>
      <dc:creator>former_member228602</dc:creator>
      <dc:date>2017-03-03T03:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362700#M24446</link>
      <description>&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;After implementing your solution, it took away only this call : &lt;/P&gt;&lt;P&gt;GET Entity1/$count HTTP/1.1&lt;/P&gt;&lt;P&gt;But still there is one more call, which is still occuring: i have no idea which setting would remove this call :&lt;/P&gt;&lt;P&gt;GET Entity1?$skip=0&amp;amp;$top=100 HTTP/1.1 &lt;/P&gt;&lt;P&gt;Anyways, thanks again for your help.&lt;/P&gt;&lt;P&gt;BR,&lt;BR /&gt;Venky.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362700#M24446</guid>
      <dc:creator>venkatesha_n</dc:creator>
      <dc:date>2017-03-14T12:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362701#M24447</link>
      <description>&lt;P&gt;Hi Veera,&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;I wanted to get rid of these calls, so i tried setting defaultCountMode to 'None'--&amp;gt; it removes only one call GET Entity1/$count HTTP/1.1&lt;/P&gt;&lt;P&gt;But still there is another call which is still getting called:&lt;/P&gt;&lt;P&gt;GET Entity1?$skip=0&amp;amp;$top=100 HTTP/1.1&lt;/P&gt;&lt;P&gt;Any idea how do i get rid of it ?&lt;/P&gt;&lt;P&gt;BR,&lt;BR /&gt;Venky.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362701#M24447</guid>
      <dc:creator>venkatesha_n</dc:creator>
      <dc:date>2017-03-14T12:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362702#M24448</link>
      <description>&lt;P&gt;second request GET C_ProcMonE2EChain?$skip=0&amp;amp;$top=100 HTTP/1.1 mostly refers to binding to table which have the &lt;A target="_blank" href="https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.table.Table.html#getThreshold"&gt;default threshold&lt;/A&gt; of 100, without this request data will not be populated into the table.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362702#M24448</guid>
      <dc:creator>former_member365727</dc:creator>
      <dc:date>2017-03-14T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Additional GET commands in a batch operation</title>
      <link>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362703#M24449</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;To disable 2nd request you can add&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;refreshAfterChange: false&lt;/STRONG&gt; in settings. But of course there will be side effect based on your use case.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Regards,&lt;BR /&gt;Vinod Patil&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 14:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/additional-get-commands-in-a-batch-operation/qaa-p/362703#M24449</guid>
      <dc:creator>PaV11</dc:creator>
      <dc:date>2018-05-28T14:15:46Z</dc:date>
    </item>
  </channel>
</rss>

