<?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: Regarding modifying database from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315701#M1225455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Sy-Subrc after modify statment. If sy-Subrc equals to Zero then use commit statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Md.MahaboobKhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Mar 2009 11:53:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-02T11:53:25Z</dc:date>
    <item>
      <title>Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315698#M1225452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAP Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing an issue regarding modifying DB table from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the records of itab are not getting reflected in DB table using Modify statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax is as follows - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Locking DB table using enque FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY abc FROM TABLE i_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unlocking DB table using deques FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest what could be wrong with this. Helpful suggestion will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in adv,&lt;/P&gt;&lt;P&gt;Akash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 11:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315698#M1225452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T11:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315699#M1225453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;it will works n=based on primary key&lt;/P&gt;&lt;P&gt;Plese check u r primary key of the tabe with internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 11:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315699#M1225453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T11:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315700#M1225454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Delete entries from the table(hope it is a custom table),&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for example&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DELETE  FROM &amp;lt;DatabaseTable name&amp;gt; WHERE &amp;lt;primarykey = 'somevalue'&amp;gt;.

'After deleting those records.....then use insert statement

 IF sy-subrc = 0.
   INSERT &amp;lt;DatabaseTable name&amp;gt; FROM TABLE  &amp;lt;InternalTable name&amp;gt; ACCEPTING DUPLICATE KEYS.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; REgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 11:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315700#M1225454</guid>
      <dc:creator>Mohamed_Mukhtar</dc:creator>
      <dc:date>2009-03-02T11:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315701#M1225455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Sy-Subrc after modify statment. If sy-Subrc equals to Zero then use commit statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Md.MahaboobKhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 11:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315701#M1225455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T11:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315702#M1225456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODIFY &amp;lt;db_table&amp;gt; FROM TABLE &amp;lt;itab&amp;gt;.

IF sy-subrc = 0.
  "sy-dbcnt will contain the number of records effected in db table
  COMMIT WORK.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 11:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315702#M1225456</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-02T11:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315703#M1225457</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;Already tried by checking sy-subrc and doing commit work but no success. Also SY-DBCNT contains the value as total number of entries of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Akash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 12:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315703#M1225457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T12:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding modifying database from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315704#M1225458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the primary key fields have same value as the records present in internal table then for these records the modify statement is not worked. We can check it using SY-SUBRC &amp;amp; SY-DBCNT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 12:35:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-modifying-database-from-internal-table/m-p/5315704#M1225458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T12:35:30Z</dc:date>
    </item>
  </channel>
</rss>

