<?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>topic UPDATE...SET syntax to update db table from import parameter. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-set-syntax-to-update-db-table-from-import-parameter/m-p/12331268#M1991601</link>
    <description>&lt;P&gt;So i want to update the fields on a db table, given a key. The code i'm showing works, it gets updated, but the issue is i don't want to do it inside a loop. Is there a more optimal way to do this without a loop?&lt;/P&gt;
  &lt;P&gt;I was thinking of using modify, maybe with transporting, but as you can see i'm taking just one field from the import parameter - "answer". What could be done this to improve the performance? Also - i'm sure that all of the i_tab records already exist in the db table and that there are no dublicate records or things like that. I'm not adding new records, i'm just updating existing ones.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  LOOP AT i_tab INTO DATA(temp).
        UPDATE zrs_dataclear SET status = 90
                                 answer = temp-answer
                                 answer_date = sy-datum
                                 answer_time = sy-timlo
                                 uname = sy-uname
                                 WHERE errornr = temp-errornr.
      ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Feb 2021 14:07:37 GMT</pubDate>
    <dc:creator>former_member727610</dc:creator>
    <dc:date>2021-02-02T14:07:37Z</dc:date>
    <item>
      <title>UPDATE...SET syntax to update db table from import parameter.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-set-syntax-to-update-db-table-from-import-parameter/m-p/12331268#M1991601</link>
      <description>&lt;P&gt;So i want to update the fields on a db table, given a key. The code i'm showing works, it gets updated, but the issue is i don't want to do it inside a loop. Is there a more optimal way to do this without a loop?&lt;/P&gt;
  &lt;P&gt;I was thinking of using modify, maybe with transporting, but as you can see i'm taking just one field from the import parameter - "answer". What could be done this to improve the performance? Also - i'm sure that all of the i_tab records already exist in the db table and that there are no dublicate records or things like that. I'm not adding new records, i'm just updating existing ones.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  LOOP AT i_tab INTO DATA(temp).
        UPDATE zrs_dataclear SET status = 90
                                 answer = temp-answer
                                 answer_date = sy-datum
                                 answer_time = sy-timlo
                                 uname = sy-uname
                                 WHERE errornr = temp-errornr.
      ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2021 14:07:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-set-syntax-to-update-db-table-from-import-parameter/m-p/12331268#M1991601</guid>
      <dc:creator>former_member727610</dc:creator>
      <dc:date>2021-02-02T14:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE...SET syntax to update db table from import parameter.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-set-syntax-to-update-db-table-from-import-parameter/m-p/12331269#M1991602</link>
      <description>&lt;P&gt;To "improve the performance", BUT did you experience any performance issue?&lt;/P&gt;&lt;P&gt;See ABAP documentation of &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapupdate.htm"&gt;UPDATE&lt;/A&gt; -&amp;gt; &lt;STRONG&gt;UPDATE ... FROM TABLE ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(note that UPDATE ... FROM TABLE ... may be converted into several UPDATE statements by the DBI/kernel so you won't see any performance improvement)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 14:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-set-syntax-to-update-db-table-from-import-parameter/m-p/12331269#M1991602</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-02-02T14:26:30Z</dc:date>
    </item>
  </channel>
</rss>

