<?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: Delete from Database Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616455#M276059</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 putting a COMMIT WORK after the delete statement.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gilberto Li&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Sep 2006 20:30:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-19T20:30:22Z</dc:date>
    <item>
      <title>Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616454#M276058</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 a piece of code which is giving me some trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM s880
  INTO CORRESPONDING FIELDS OF TABLE it_s880
  WHERE vrsio EQ p_tvrsio OR
        vrsio EQ '000'.
DELETE s880 FROM TABLE it_s880.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now,  when i'm debugging, i find that even after the Delete has occured, the Data from the table hasn't been deleted. or atleast that i can still see it in SE16. I tried refreshing but no change. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how ever the data at the end (after the program executes) seems to be OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this normally happen or am i doing something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..!&lt;/P&gt;&lt;P&gt;Jr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616454#M276058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616455#M276059</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 putting a COMMIT WORK after the delete statement.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gilberto Li&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616455#M276059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616456#M276060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your syntax looks fine.  put a break point on that delete statement and add another line of code after, like ....  CHECK SY-SUBRC = 0.   Now got to debug and stop at the DELETE statement,  check the number of records in your DB table,  now hit F5 to step to the next statement,  now go back to SE16 and refresh, do you see the number change?  It should.........if you are selecting the data correctly,  make sure that you are getting data into the IT_S880 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616456#M276060</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-19T20:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616457#M276061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are interupting the processing of this program, but exiting the program in debug after the delete statement, then yes, your changes will be rollbacked, but if you all the program to finish completely then the commit will happen automatically,  or course you can COMMIT WORK explicitly after the DELETE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616457#M276061</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-19T20:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616458#M276062</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;Please add this FM 'DB_COMMIT' at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM s880  
INTO CORRESPONDING FIELDS OF TABLE it_s880  
WHERE vrsio EQ p_tvrsio OR        
      vrsio EQ '000'.

DELETE s880 FROM TABLE it_s880

CALL FUNCTION 'DB_COMMIT'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use LIS Copy Management tool (t/code &amp;lt;b&amp;gt;MCSZ&amp;lt;/b&amp;gt;) to maintain your custom info structure. It is easy and very handy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616458#M276062</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-09-19T20:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616459#M276063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's working as expected. There is a commit when the program ends, so the records are really there until then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:33:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-from-database-table/m-p/1616459#M276063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:33:38Z</dc:date>
    </item>
  </channel>
</rss>

