<?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: working of modify statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569354#M859080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modify .. this checks for the primary key, if a record has same primary key as in the internal it updates other wise a new row is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Mar 2008 15:54:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-19T15:54:46Z</dc:date>
    <item>
      <title>working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569347#M859073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hye folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  There is a scenario where there 4 fields in a data base. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Serial Number              PK&lt;/P&gt;&lt;P&gt; Article number&lt;/P&gt;&lt;P&gt; Article name&lt;/P&gt;&lt;P&gt; Price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have inserted the entry as 12...  123...  xyz... 100...&lt;/P&gt;&lt;P&gt;                                         13...  101...  abc... 120...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; now i wish to change the price of serial number 13 to 150 and also insert a new entry to table, i am getting the new entry created with modify and also a new entry for already existing row 13 with a changed price. there is a primary key violation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal table rows: 13...  ...   ...  150&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify dbtab from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the definiton of modify it should update the existing row with a price of 150 but it is not happening, instead a new row is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the definiton of Primary key (PK), it shuld not allow duplicate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does a modify statement work in this scenario, why is ti giving a new entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me in understanding the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 07:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569347#M859073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T07:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569348#M859074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here you need to use a condition WHERE for primary key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using the condition a particular field will be replaced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Balaram Devineni on Mar 18, 2008 8:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 07:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569348#M859074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T07:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569349#M859075</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;To Modify an entry:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa_tab where serial_no = '13'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; wa_itab-price = '150'.&lt;/P&gt;&lt;P&gt;modify itab from wa_itab transporting price.&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;To add new entry, you have to append the values from the internal table to the table where you want to create new entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Parul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 19, 2008 4:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 07:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569349#M859075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T07:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569350#M859076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to update into a database table not into an internal table. So, please suggest accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 07:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569350#M859076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569351#M859077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;suppose Itab is the internal table with the data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then try it this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-srno = 13.&lt;/P&gt;&lt;P&gt;modify dbtab from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and does dbtab has only SRNO as the primary key?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Pavithra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 08:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569351#M859077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T08:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569352#M859078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Imran try this one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use UPDATE statement instead of Modify.&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;Balaram D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 08:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569352#M859078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T08:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569353#M859079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;Loop at itab into wa_tab where serial_no = '13'.&lt;/P&gt;&lt;P&gt; wa_itab-price = '150'.&lt;/P&gt;&lt;P&gt; modify itab from wa_itab transporting price.&lt;/P&gt;&lt;P&gt; clear wa_itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update dbtable from table itab where serial_no = '13'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 19, 2008 4:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 08:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569353#M859079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T08:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: working of modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569354#M859080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modify .. this checks for the primary key, if a record has same primary key as in the internal it updates other wise a new row is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 15:54:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-of-modify-statement/m-p/3569354#M859080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T15:54:46Z</dc:date>
    </item>
  </channel>
</rss>

