<?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 statement not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172031#M1371925</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;Check after giving this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*'COMMIT WORK'&lt;/EM&gt;*&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;&lt;STRONG&gt;&lt;EM&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2009 13:51:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-22T13:51:14Z</dc:date>
    <item>
      <title>Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172024#M1371918</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;I need to update a ztable in my program.&lt;/P&gt;&lt;P&gt;I have used the following statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE zeps_pr_eos FROM TABLE tab4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But an entry alredy exists in the ztable zeps_pr_eos with the values in tab4 table.But still after the update statement the sy-subrc value is 0.It should show sy-subrc value as 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is the correct statement to update the ztable table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:35:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172024#M1371918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T13:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172025#M1371919</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;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODIFY TABLE TABLE NAME FROM INTERNAL TABLE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;roll back.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:41:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172025#M1371919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T13:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172026#M1371920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But an entry alredy exists in the ztable zeps_pr_eos with the values in tab4 table.But still after the update statement the sy-subrc value is 0.It should show sy-subrc value as 4.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Which is the correct statement to update the ztable table&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update is working only with &lt;STRONG&gt;existant&lt;/STRONG&gt; rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking for inserting new rows?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:41:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172026#M1371920</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-22T13:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172027#M1371921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use commit work after update statement if sy-subrc = 0. Usually, if there is a record in table with same key it should give you subrc value 4 but if you get 0 use commit work statement after check subrc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To insert new rows, you could use Modify or insert statement. Update statement will updates the existing row. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172027#M1371921</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2009-09-22T13:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172028#M1371922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please &lt;STRONG&gt;F1&lt;/STRONG&gt; on &lt;STRONG&gt;UPDATE&lt;/STRONG&gt; statement ... You will get the answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172028#M1371922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T13:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172029#M1371923</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 of the internal table matches with those of the database table, the update statement will update them irrespective of what the other fields contains. Thats why SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only if the primary ket field of the internal table does not match with the primary key fields of the database table, SY-SUBRC will be 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172029#M1371923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T13:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172030#M1371924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u are confused between UPDATE and INSERT statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE statement will upate all records in databse table with new values from the internal table for matching records.&lt;/P&gt;&lt;P&gt;INSERT statement will insert new records into database table when that record does not exist already.&lt;/P&gt;&lt;P&gt;Press F1 on both UPDATE &amp;amp; INSERT statements and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: When source(internal table) is empty sy-subrc is always zero.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sap Fan on Sep 22, 2009 3:47 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172030#M1371924</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-09-22T13:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172031#M1371925</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;Check after giving this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*'COMMIT WORK'&lt;/EM&gt;*&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;&lt;STRONG&gt;&lt;EM&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 13:51:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172031#M1371925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T13:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Update statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172032#M1371926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abaper,&lt;/P&gt;&lt;P&gt;how do you expect update would fail here?&lt;/P&gt;&lt;P&gt; update only works if a record exist. so its perfectly fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only insert statement will fail(sy-subrc=0) if a corresponding entry exist..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 16:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-statement-not-working/m-p/6172032#M1371926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-22T16:05:12Z</dc:date>
    </item>
  </channel>
</rss>

