<?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 in database table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158075#M1821046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you said you want to update a primary key. Well, you can't. Primary key fields cannot be changed in classical databases. You need to delete the existing one and insert the new one&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2014 12:55:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-03-20T12:55:56Z</dc:date>
    <item>
      <title>update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158074#M1821045</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 an issue regarding the update query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to insert data in a Z table.&lt;/P&gt;&lt;P&gt;The table consists of 4 Primary key.&lt;/P&gt;&lt;P&gt;In which I am trying to update one of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;it_reg&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp; it_final1-schno&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = v_schnumber.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it_final1-regio&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = it_reg-regio.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it_final1&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kostl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;it_reg&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;kostl&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;APPEND &lt;/SPAN&gt;it_final1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;wa_rebhed_final &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;/vcrebate/rebhed&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MOVE-CORRESPONDING &lt;/SPAN&gt;it_final1 &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;wa_rebhed_final&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*&amp;nbsp; UPDATE&amp;nbsp; /vcrebate/rebhed FROM wa_rebhed_final&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;*&amp;nbsp; UPDATE /vcrebate/rebhed&amp;nbsp; SET schno = it_scheme-schno WHERE schno = it_scheme-schno..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;UPDATE &lt;/SPAN&gt;/vcrebate/rebhed &lt;SPAN class="L0S52"&gt;SET &lt;/SPAN&gt;schno &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;it_final1&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;schno&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;this is my code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;But I am unable to update the table.. I also tried using Modify but the modify statement is adding a row with updated field.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158074#M1821045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T12:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158075#M1821046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you said you want to update a primary key. Well, you can't. Primary key fields cannot be changed in classical databases. You need to delete the existing one and insert the new one&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158075#M1821046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T12:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158076#M1821047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jozef,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually the field which I want to update is not there in db. I mean the field is empty. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158076#M1821047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T12:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158077#M1821048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Empty" is also a value, depending on format, e.g. spaces for character fields. You still need to delete and re-insert with changed values, as Jozef suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158077#M1821048</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2014-03-20T13:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158078#M1821049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't modify any data of key fields, instead of that, you have to create a new record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158078#M1821049</guid>
      <dc:creator>adrian_mejido</dc:creator>
      <dc:date>2014-03-20T13:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158079#M1821050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys for the reply..&lt;/P&gt;&lt;P&gt;I got your point.&lt;/P&gt;&lt;P&gt;But another thing which I want to ask is: &lt;/P&gt;&lt;P&gt;Is the code is true? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158079#M1821050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158080#M1821051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;LOOP AT it_final1 INTO wa_rebhed_final.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;UPDATE TA&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;BLE &lt;/SPAN&gt;/vcrebate/rebhed &lt;SPAN class="L0S52"&gt;SET &lt;/SPAN&gt;schno &lt;SPAN class="L0S55"&gt;= 'any value'&lt;/SPAN&gt; WHERE "Put your primary key fields = wa-prim_key_fields&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158080#M1821051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158081#M1821052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your logic but it is not updating the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158081#M1821052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158082#M1821053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because he did not understand that you want to update a field contained in the primary key.&lt;/P&gt;&lt;P&gt;Why don't you try the other proposal, and what do you mean with "is the code is true" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:16:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158082#M1821053</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2014-03-20T13:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158083#M1821054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you code is wrong because.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-If you will&amp;nbsp; update data from table then you need&amp;nbsp; use the clausure 'where' for indicate the line that will be updated , your command update all data in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2-You must use the update with where and in where pass all keys of table then with complete key it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158083#M1821054</guid>
      <dc:creator>ronaldo_aparecido</dc:creator>
      <dc:date>2014-03-20T13:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158084#M1821055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you will update data from key table you have delete record and after update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:22:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158084#M1821055</guid>
      <dc:creator>ronaldo_aparecido</dc:creator>
      <dc:date>2014-03-20T13:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158085#M1821056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is solved. I was wrong that I was trying to update the primary field.&lt;/P&gt;&lt;P&gt;Okay then can I modify the primary key or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158085#M1821056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158086#M1821057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ronaldo,&lt;/P&gt;&lt;P&gt;I tried your suggestion but system is giving me an error.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;UPDATE &lt;/SPAN&gt;/vcrebate/rebhed&amp;nbsp; &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;it_final1 .. """"" Original Code&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;UPDATE &lt;/SPAN&gt;/vcrebate/rebhed&amp;nbsp; &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;it_final1 where schno = it_final1-schno """""" Another code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the Another code but when I press cntrl+space system doent not give me the suggestions even.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:31:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158086#M1821057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158087#M1821058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;UPDATE &lt;/SPAN&gt;/vcrebate/rebhed SET schno = 'ABC' where schno = it_final1-schno """""" Another code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158087#M1821058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158088#M1821059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sachin your code is updating the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try "&lt;SPAN class="L0S52" style="font-size: 12px; color: #333333;"&gt;UPDATE &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;/vcrebate/rebhed&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 12px; color: #333333;"&gt;FROM &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;it_final1&lt;/SPAN&gt;" this updates the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158088#M1821059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T13:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158089#M1821060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a myth that we can't change the primary key of a table using update statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can't change, only if there is checktable or matchcode associated with the primary key field.&amp;nbsp; For reference check the link below:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_45b/helpdata/en/34/8e73d06df74873e10000009b38f9b8/content.htm" title="http://help.sap.com/saphelp_45b/helpdata/en/34/8e73d06df74873e10000009b38f9b8/content.htm"&gt;UPDATE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Few years back, an ABAP beginner while practising database updates using update statement, showed me it can be done. I only believed him once he showed me a live example. It works only for some cases, not for all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose our table structure looks like this and we want to update the seqno field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a)&amp;nbsp; Docno&amp;nbsp;&amp;nbsp; Document number ( primary key )&lt;/P&gt;&lt;P&gt;b)&amp;nbsp; Seqno&amp;nbsp;&amp;nbsp; Sequence number ( primary key ) . ( no check table )&lt;/P&gt;&lt;P&gt;c) any other non primary field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Create an entry by filling only the document number (1st field ) and the non primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Now try to update the seqno field using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update Ztable set seqno = '0001'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where docno = '1010010001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commit work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 14:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158089#M1821060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T14:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158090#M1821061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="781657" __jive_macro_name="user" class="jive_macro_user jive_macro" data-orig-content="Yash Acharya" href="https://community.sap.com/"&gt;&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you need to update the primary key alone mean it is not possible but indirectly you can do this using field symbol.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Move the required row to internal table from data dictionary by specifying where condition with primary key value.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Eg.&amp;nbsp;&amp;nbsp; Select * from zdemo_table into table it_demo.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;2. delete the row by specifying primary key .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. Now assign field symbol for your internal table.&lt;/P&gt;&lt;P&gt;Eg.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;FIELD-SYMBOLS &lt;/SPAN&gt;&amp;lt;fs_itab&amp;gt; &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;it_demo&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT it_demo&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;ASSIGNING &lt;/SPAN&gt;&amp;lt;fs_itab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;fs_itab&amp;gt;-oldprimary key = 'new value for primary key'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. now use insert statement by specifying &amp;lt;fs_itab&amp;gt; instead of internal tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you find any inconsistencies &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 14:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158090#M1821061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158091#M1821062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a more recent reference, as 45b and synchronous matchcode are getting old&amp;nbsp; : UPDATE &lt;A href="http://help.sap.com/abapdocu_740/en/abapupdate_source.htm#!ABAP_ALTERNATIVE_1@1@"&gt;SET set_expression [WHERE sql_cond]&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;The content of primary key fields can only be changed if the respective database table is not linked with a search help and if &lt;A class="grey" title="Glossary Entry"&gt;pool&lt;/A&gt; and &lt;A class="grey" title="Glossary Entry"&gt;cluster tables&lt;/A&gt; are not accessed&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;AFAIK this is the only correct syntax of update statement allowed to change primary keys as other options use the primary key to identify the record to update, so usually in a LOOP/ENDLOOP and not FROM TABLE itab option is valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158091#M1821062</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-03-20T15:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158092#M1821063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a case of RTFM for the OP. &lt;SPAN __jive_emoticon_name="plain" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/plain.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158092#M1821063</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-03-20T15:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: update in database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158093#M1821064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And how will your field-symbol and insert update the existing rows? Isn't insert only inserting? It was some time ago &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 16:07:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-in-database-table/m-p/10158093#M1821064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T16:07:28Z</dc:date>
    </item>
  </channel>
</rss>

