<?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 Re: Update customised table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003918#M77178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what you are asking about. FM is different from commit after the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its always better that you update your table with all the records and then finally do a commit, whether you are doing in a program or a function module. If the number of records is too large, you can think of an intermediate commit after say n(1000) records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is the confusion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Sep 2005 09:26:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-19T09:26:31Z</dc:date>
    <item>
      <title>Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003917#M77177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 7000 records to be inserted/modified to a customized table. Program will be run everyday at night to update the customised table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best method to update it? Is it using FM or just put commit after the loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 09:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003917#M77177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T09:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003918#M77178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what you are asking about. FM is different from commit after the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its always better that you update your table with all the records and then finally do a commit, whether you are doing in a program or a function module. If the number of records is too large, you can think of an intermediate commit after say n(1000) records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is the confusion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 09:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003918#M77178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T09:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003919#M77179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use array command which will Insert / modiy in one database operation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;DBTAB&amp;gt; from ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Itab is internal table having same structure as database tables . Beofre doing the above database insert you may like to do all validations on ITAB . In above the Key will be matched . If it exists is db table record will be updated else new record will be inserted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No specific commit work is required . It will be triggered implicitly the moment the program ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 09:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003919#M77179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T09:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003920#M77180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry if my question is unclear. I am asking about how to update the customised table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking of putting commit after the loop, where inside the loop, right now I directly move value to the customised table, for example:&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;zso-matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using a functional module to update entire record:&lt;/P&gt;&lt;P&gt;UPDATE ZSTB_SO_LOG FROM i_logtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which one is the best? in term of performance impact etc etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks&lt;/P&gt;&lt;P&gt;alia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 09:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003920#M77180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T09:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003921#M77181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like your internal table is of the same structure as of the database table. In this case you can go with the ONE statement approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using a UPDATE statement. On the other hand if you have mix of new records as well as updated records you can go for MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please reward points if this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 09:40:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003921#M77181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T09:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update customised table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003922#M77182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;7000 records isn't really a lot. Since each commit has some overhead, I'd just update the records and commit at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2005 15:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-customised-table/m-p/1003922#M77182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-19T15:40:33Z</dc:date>
    </item>
  </channel>
</rss>

