<?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: Adding multiple lines in sap.m.Table with deferred request groups in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532390#M108341</link>
    <description>&lt;P&gt;To facilitate easier handling of data, load the oData data to a local JSON model. &lt;/P&gt;
  &lt;P&gt;Manage the local JSON model to add multiple entries. Validate user input and prepare the JSON which is to be updated to backend. &lt;/P&gt;
  &lt;P&gt;On Save, push the local JSOn model by passing it to the oData service which updates the data. &lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2017 16:33:01 GMT</pubDate>
    <dc:creator>Sharathmg</dc:creator>
    <dc:date>2017-08-25T16:33:01Z</dc:date>
    <item>
      <title>Adding multiple lines in sap.m.Table with deferred request groups</title>
      <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaq-p/532387</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I have implemented a very simple app for testing purposes with a simple responsive table containing Usernames and E-Mail Addresses:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/64595-2017-08-25-14-02-06-app-title.png" /&gt;&lt;/P&gt;
  &lt;P&gt;The controller logic is very simple, too. It just contains the button event handlers.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/64596-2017-08-25-14-06-23-sap-web-ide.png" /&gt;&lt;/P&gt;
  &lt;P&gt;The table data is coming from an ABAP Back-End and I used an Odata Model with Two-Way binding to bind the list. When updating single properties of the existing lines (e.g. E-Mail Address) the Back-End update works fine. My Save Button Event handler simply submits all changes (see listing above). Now I want to add several lines at once and submit them all together. No Record in the back-end can be created before at least the key field "Username" was entered by the user. When pressing the "Add" button my logic actually adds new lines:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/64599-2017-08-25-14-09-09-app-title.png" /&gt;&lt;/P&gt;
  &lt;P&gt;When I enter new data in these new lines and submit the changes everything is persisted correctly. &lt;STRONG&gt;But: If I apply any changes to the old lines (originally coming from the BE) the lines vanish. &lt;/STRONG&gt;I did some debugging and the model update caused by the changes of the existing lines triggers a refresh of the&lt;STRONG&gt; &lt;/STRONG&gt;list binding of the table. All table lines that did not come originally from the BE are removed. &lt;STRONG&gt;The same happens when I change the odata service to One-Way Binding and I call any setProperty Method at the model. So, it's not an issue with the Two-Way Binding.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Does anyone have an idea how to overcome this issue?&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 12:17:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaq-p/532387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-25T12:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple lines in sap.m.Table with deferred request groups</title>
      <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532388#M108339</link>
      <description>&lt;P&gt;directly adding a line to the table is not supported by odatamodel, if my memory is right.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 12:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532388#M108339</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2017-08-25T12:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple lines in sap.m.Table with deferred request groups</title>
      <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532389#M108340</link>
      <description>&lt;P&gt;Hi Jun,&lt;/P&gt;
  &lt;P&gt;Does that actually mean I have to create a single entity in back-end line by line?&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 12:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532389#M108340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-25T12:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple lines in sap.m.Table with deferred request groups</title>
      <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532390#M108341</link>
      <description>&lt;P&gt;To facilitate easier handling of data, load the oData data to a local JSON model. &lt;/P&gt;
  &lt;P&gt;Manage the local JSON model to add multiple entries. Validate user input and prepare the JSON which is to be updated to backend. &lt;/P&gt;
  &lt;P&gt;On Save, push the local JSOn model by passing it to the oData service which updates the data. &lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 16:33:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532390#M108341</guid>
      <dc:creator>Sharathmg</dc:creator>
      <dc:date>2017-08-25T16:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple lines in sap.m.Table with deferred request groups</title>
      <link>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532391#M108342</link>
      <description>&lt;P&gt;Hi Sharath M G,&lt;/P&gt;
  &lt;P&gt;that was exactly my thought, too. I just didn't want to mention that in my initial post to maybe get different approaches. The main problem with that in my productive App (not the app I showed above) is that I am using a Smart Table control. It's heavily based on OData metadata and I am not sure if I can get it working with JSON Model. Moreover, this apporach can be quite cumbersome because I need to keep track of all changes. I exactly need to know which records were created/deleted/changed to know which OData Method needs to be called.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 22:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/adding-multiple-lines-in-sap-m-table-with-deferred-request-groups/qaa-p/532391#M108342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-25T22:07:29Z</dc:date>
    </item>
  </channel>
</rss>

