<?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: Database Update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013631#M79442</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;For updating the database,you can use either UPDATE or MODIFY statement.If you are not sure whether the record is already there in database,you can use MODIFY.Because it will help you to both insert and update the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that you are populating the internal table at a strecth and then using UPDATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;modify itab...transporting....&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;update db from table itab.&lt;/P&gt;&lt;P&gt;Here itab should be declared as db type.&lt;/P&gt;&lt;P&gt;I don't think there is another solution to update database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2005 08:46:57 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2005-07-05T08:46:57Z</dc:date>
    <item>
      <title>Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013630#M79441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having an interal table which is of database table type.&lt;/P&gt;&lt;P&gt;After populating few fields of the itab (Not all), I want to&lt;/P&gt;&lt;P&gt;modify the dbtable using this itab.&lt;/P&gt;&lt;P&gt;Insted of using the open SQL stmt (Update) for this scenario, can anyone of you&lt;/P&gt;&lt;P&gt;suggest a solution for the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI : If I am declaring the itab with only few fields that I wanted to update, I am&lt;/P&gt;&lt;P&gt;getting erros during activation (in the modify stmt)-since the size of itab&lt;/P&gt;&lt;P&gt;&amp;amp; dbtab are not matching&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 08:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013630#M79441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T08:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013631#M79442</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;For updating the database,you can use either UPDATE or MODIFY statement.If you are not sure whether the record is already there in database,you can use MODIFY.Because it will help you to both insert and update the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that you are populating the internal table at a strecth and then using UPDATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;modify itab...transporting....&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;update db from table itab.&lt;/P&gt;&lt;P&gt;Here itab should be declared as db type.&lt;/P&gt;&lt;P&gt;I don't think there is another solution to update database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 08:46:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013631#M79442</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-07-05T08:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013632#M79443</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;Don't try to directly update the db tables using SQL statement as we actually don't know how many tables that are related.&lt;/P&gt;&lt;P&gt;Therefore you'd better use method: CALL TRANSACTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 08:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013632#M79443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T08:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013633#M79444</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;As mentioned, I just wanted to know &lt;/P&gt;&lt;P&gt;whether we can change the contents of dbtable&lt;/P&gt;&lt;P&gt;without using "update"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macy Lo, could you please explain in detail about&lt;/P&gt;&lt;P&gt;the use of call transaction in update?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 09:19:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013633#M79444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T09:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013634#M79445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi usha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For db upadte u can use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;db table insert --&amp;gt; Modify statement&lt;/P&gt;&lt;P&gt;db table edit   --&amp;gt; Update statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regds,&lt;/P&gt;&lt;P&gt;Ravikiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 09:25:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013634#M79445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T09:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013635#M79446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Usha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        It is advisable not to use UPDATE command unless it is really required.If you are trying to update a custom table,then no problem.But if you are trying to update a standard table you should first look if there are any function modules which do the work.It is advisable to look for BAPI's.Also the call transaction method will work only if you have all the mandatory data that needs to be supplied to the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Nishanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 09:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013635#M79446</guid>
      <dc:creator>nishanthbhandar</dc:creator>
      <dc:date>2005-07-05T09:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013636#M79447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Usha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, we can change the contents of dbtable without using "update" statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggested method is like this:&lt;/P&gt;&lt;P&gt;For example, if I want to update the lab/office field for certain materials, I could use the call transaction method which simulates the transaction MM02.&lt;/P&gt;&lt;P&gt;When executing the program, it automatically updates the lab/office values of the selected materials by running MM02 in the background.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 09:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013636#M79447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T09:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Database Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013637#M79448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Usha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The UPDATE statement or for that matter the MODIFY statement in Open SQL will always require you to specify the internal table or the work area which is of the same type as the database table. It is not possible otherwise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The SET clause of the UPDATE statement cannot be used when you are trying to update from an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. When you use the UPDATE statement with a work area, then you can use the SET clause of this statement to specify which of the fields should be actually updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If your work area is not of the same type as the db table type, then you must first move the data to another work area which has got the correct line type (same as the database table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. I'm afraid, there's no oter way to update the database table other than using the UPDATE statement. (we do have the MODIFY statement, bu that does not seem to be applicable in your case). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, whether you want to use a CALL TRANSACTION to do this is something that you have not mentioned. If you just want to know a way of updating the database table from an internal table, then that is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 09:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-update/m-p/1013637#M79448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T09:53:35Z</dc:date>
    </item>
  </channel>
</rss>

