<?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: Updating database table from an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841318#M665471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are right, the field which I am trying to change is a part of primary key.&lt;/P&gt;&lt;P&gt;Because, sy-subrc = 4. says,&lt;/P&gt;&lt;P&gt;No line with specified primary key exits in the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Z-tabel, with Kunnr Vkorg Matnr Bzirk Bztxt Split_percentage&lt;/P&gt;&lt;P&gt;In this table primary key consists of Kunnr&lt;EM&gt;Vkorg&lt;/EM&gt;Matnr+Bzirk.&lt;/P&gt;&lt;P&gt;I am able to change the Split_percentage using UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, my client want to change Bzirk, Bztxt also in the table.&lt;/P&gt;&lt;P&gt;How can I Go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kalyan Chandramouli&lt;/P&gt;&lt;P&gt;SAP ABAP Consultant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2007 14:09:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-04T14:09:07Z</dc:date>
    <item>
      <title>Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841315#M665468</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;I am updating a database table from an internal table.&lt;/P&gt;&lt;P&gt;I am changing the non-key fields in that table.&lt;/P&gt;&lt;P&gt;when I check sy-subrc = 4.&lt;/P&gt;&lt;P&gt;Record already exists, because I am changing non-key fields of the&lt;/P&gt;&lt;P&gt;database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any addition like to accept the duplicate keys with update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, I have used Modify, It is adding new record,&lt;/P&gt;&lt;P&gt;Again, I have search the old record and use Delete on the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kalyan Chandramouli&lt;/P&gt;&lt;P&gt;SAP ABAP Consultant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 12:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841315#M665468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T12:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841316#M665469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that you changed key fields, else MODIFY wont create new records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at your Z-table (I hope this is a Z-table, no?) is there an alternative index with unique key?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 13:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841316#M665469</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-10-04T13:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841317#M665470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;You can use the UPDATE statment, but as we know, if the key fields are same then it will update that record, if the key fields are not same then it will add a record to the database table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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; Sudher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 13:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841317#M665470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T13:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841318#M665471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are right, the field which I am trying to change is a part of primary key.&lt;/P&gt;&lt;P&gt;Because, sy-subrc = 4. says,&lt;/P&gt;&lt;P&gt;No line with specified primary key exits in the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Z-tabel, with Kunnr Vkorg Matnr Bzirk Bztxt Split_percentage&lt;/P&gt;&lt;P&gt;In this table primary key consists of Kunnr&lt;EM&gt;Vkorg&lt;/EM&gt;Matnr+Bzirk.&lt;/P&gt;&lt;P&gt;I am able to change the Split_percentage using UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, my client want to change Bzirk, Bztxt also in the table.&lt;/P&gt;&lt;P&gt;How can I Go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kalyan Chandramouli&lt;/P&gt;&lt;P&gt;SAP ABAP Consultant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 14:09:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841318#M665471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T14:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841319#M665472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can not update when changing primary key, so you need to delete the database from the &amp;lt;b&amp;gt;old&amp;lt;/b&amp;gt; values of your internal table and then insert from the &amp;lt;b&amp;gt;new&amp;lt;/b&amp;gt; values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 14:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841319#M665472</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-10-04T14:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841320#M665473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Update we can change only non-key fields,&lt;/P&gt;&lt;P&gt;Kalyan Chandramouli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 15:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841320#M665473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T15:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Updating database table from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841321#M665474</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;This is the way to update ur Table in this Scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From internal table to DB table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type table of &amp;lt;ur Ztable&amp;gt; with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Fill the Data into the itab&amp;gt;&amp;gt; . "Key fields must also be filled &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE &amp;lt;ZTABLE&amp;gt; FROM TABLE ITAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF HELPFUL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 06:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table-from-an-internal-table/m-p/2841321#M665474</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-05T06:19:21Z</dc:date>
    </item>
  </channel>
</rss>

