<?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: A question about database update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001957#M1164708</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;It depends upon your Update statment how you have written it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using Update Dtab values Wa then blank entries will be updated&lt;/P&gt;&lt;P&gt;but if you are using with set statment then you can update only the desired field other fields will be untouched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better see complete documentation of Update statment by pressing F1 your querry will be clear.&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;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jan 2009 04:55:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-15T04:55:44Z</dc:date>
    <item>
      <title>A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001951#M1164702</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 got a question to all the experts out there. Whenever we need to update the record in the database, we either use UPDATE or MODIFY statement through either an internal table or work area. Can we like only update the first few fields and leave the rest of the fields in tact? Example, my table has 5 fields. In my internal table, I only populate the first 3 fields and leave the last 2 fields blank. When I use MODIFY/UPDATE, will my record in the database being overwritten by blank values for the last 2 fields? Is there a faster way to only update the required fields without the need to assign all the fields in the internal tables? What if my table is 100 fields long and I only need to update about 5 fields? Any help is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 03:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001951#M1164702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T03:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001952#M1164703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TRY.
  UPDATE (table)
  SET        (set_expression)     "&amp;lt;----This is where you set your required columns only to update
  WHERE  (condition).
 CATCH cx_sy_open_sql_db.
   MESSAGE 'Error in update!' TYPE 'I'.
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 03:29:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001952#M1164703</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2009-01-15T03:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001953#M1164704</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;you can write something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
UPDATE dbtab SET field1 = value WHERE &amp;lt;some_condition&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check ABAP documentation for UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 03:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001953#M1164704</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2009-01-15T03:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001954#M1164705</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;&lt;SPAN __default_attr="14" __jive_macro_name="size"&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;NEVER USE UPDATE statement in SAP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;STRONG&gt;USE ONLY STANDARD FUNCTION MODULE TO UPDATE THE DATABASE&lt;/STRONG&gt;&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>Thu, 15 Jan 2009 04:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001954#M1164705</guid>
      <dc:creator>vijy_mukunthan</dc:creator>
      <dc:date>2009-01-15T04:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001955#M1164706</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;You can use LSMW direct input method. &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;Md.MahaboobKhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 04:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001955#M1164706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T04:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001956#M1164707</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; Hi &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;SPAN __default_attr="14" __jive_macro_name="size"&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;NEVER USE UPDATE statement in SAP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;STRONG&gt;USE ONLY STANDARD FUNCTION MODULE TO UPDATE THE DATABASE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; vijay&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you kindly enlighten us all with the Standard Function Module name to update my Z table / database?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you message should read "Never use UPDATE statement to update SAP standard tables"!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 04:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001956#M1164707</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2009-01-15T04:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001957#M1164708</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;It depends upon your Update statment how you have written it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using Update Dtab values Wa then blank entries will be updated&lt;/P&gt;&lt;P&gt;but if you are using with set statment then you can update only the desired field other fields will be untouched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better see complete documentation of Update statment by pressing F1 your querry will be clear.&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;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 04:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001957#M1164708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T04:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001958#M1164709</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;When trying to update values to standard tables always try using some BAPI to do this operation .&lt;/P&gt;&lt;P&gt;If not validat the data you are trying to Update in all possible ways .&lt;/P&gt;&lt;P&gt;Update / Modify as such when used maeks the non filled values in WA to be updated as balnk values in tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as said earlier Update with SET values is porbabaly one of the best options to use .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may refer the below link for details plus an example too:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_NW04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_NW04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Radhika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 05:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001958#M1164709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T05:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: A question about database update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001959#M1164710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the answers, but there are other concern including the use of SET &amp;amp; WHERE clauses of the UPDATE statement. The problem arise if I were to update more than 1 records into my table. The only way I see it if I were to use SET &amp;amp; WHERE clause is to include the UPDATE in a loop, which is not good performance wise. Is there another way around just like updating a table through the use of internal table, but only a few fields? Just a recap of my question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- I need to update more than 1 records in my table with about 100 fields.&lt;/P&gt;&lt;P&gt;- I only need to update about 5 fields. (I do not wish to select ALL the fields from my table prior to the update since I only need 5 of them)&lt;/P&gt;&lt;P&gt;- I do not wish to perform the update inside a loop.&lt;/P&gt;&lt;P&gt;- Is there a way to get this done through using MODIFY rather than UPDATE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2009 06:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/a-question-about-database-update/m-p/5001959#M1164710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-15T06:45:10Z</dc:date>
    </item>
  </channel>
</rss>

