<?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 all the data from Database Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431009#M1997943</link>
    <description>&lt;P&gt;TRUNCATE TABLE (delete table contents only) is maybe better suited than DROP TABLE (delete both table contents and definition).&lt;/P&gt;&lt;P&gt;Of course, maybe this syntax is not possible, it depends what database system is connected to the ABAP software (HANA, MSSQL, Oracle, etc.)&lt;/P&gt;</description>
    <pubDate>Fri, 13 Aug 2021 11:38:30 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2021-08-13T11:38:30Z</dc:date>
    <item>
      <title>Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431006#M1997940</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
  &lt;P&gt;I have table with billions of record and I want to delete that record using ABAP .&lt;/P&gt;
  &lt;P&gt;I tried with statement "Delete from Table_Name" but it is taking too much time and job is getting dumped.&lt;/P&gt;
  &lt;P&gt;Can anyone suggest any alternate option with that I can delete any no. of record in less time with the help of code?&lt;/P&gt;
  &lt;P&gt;Thank you,&lt;/P&gt;
  &lt;P&gt;Aman&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 08:02:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431006#M1997940</guid>
      <dc:creator>former_member754957</dc:creator>
      <dc:date>2021-08-13T08:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431007#M1997941</link>
      <description>&lt;P&gt;Hi Aman,&lt;/P&gt;&lt;P&gt;you should split it and free the rollback area from time to time with a commit work.&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DO.
      CLEAR lv_count.
      SELECT * FROM ztable INTO TABLE lt_ztable UP TO 10000 ROWS.
      DESCRIBE TABLE lt_ztable LINES lv_count.
      IF lv_count = 0.
        EXIT.
      ELSE.
        DELETE ztable FROM TABLE lt_ztable.
        COMMIT WORK.
      ENDIF.
    ENDDO.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 08:18:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431007#M1997941</guid>
      <dc:creator>hrmanagerde</dc:creator>
      <dc:date>2021-08-13T08:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431008#M1997942</link>
      <description>&lt;P&gt;If the table contains so many records, why delete it using ABAP? The easiest way is via SE14 "delete data".&lt;/P&gt;&lt;P&gt;If you've written new functionality for clearing down the table, then DELETE FROM is fine - assuming you never let it get so full again!&lt;/P&gt;&lt;P&gt;Alternatively, you can use the CL_SQL... classes to issue a TRUNCATE TABLE directly to the database. Or an AMDP.&lt;/P&gt;&lt;P&gt;Edit: TRUNCATE is right, not DROP.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 08:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431008#M1997942</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-08-13T08:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431009#M1997943</link>
      <description>&lt;P&gt;TRUNCATE TABLE (delete table contents only) is maybe better suited than DROP TABLE (delete both table contents and definition).&lt;/P&gt;&lt;P&gt;Of course, maybe this syntax is not possible, it depends what database system is connected to the ABAP software (HANA, MSSQL, Oracle, etc.)&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 11:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431009#M1997943</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-08-13T11:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431010#M1997944</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;amanster&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;if you want to delete all rows of the table, you can use function modul &lt;/P&gt;&lt;P&gt;DB_TRUNCATE_TABLE&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thorsten&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 17:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431010#M1997944</guid>
      <dc:creator>ThorstenHoefer</dc:creator>
      <dc:date>2021-08-15T17:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431011#M1997945</link>
      <description>&lt;P&gt;Maybe I'm wrong, but wouldn't &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DELETE FROM &amp;lt;table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;be enough?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 18:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431011#M1997945</guid>
      <dc:creator>Florian</dc:creator>
      <dc:date>2021-08-15T18:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431012#M1997946</link>
      <description>&lt;P&gt;As the OP says, it takes too long and dumps. But...&lt;/P&gt;&lt;P&gt;it can just be run in background of course!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 07:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431012#M1997946</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-08-16T07:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431013#M1997947</link>
      <description>&lt;P&gt;Matthew, thanks mate for adding my thought... jsut the problem with the smartphone..&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431013#M1997947</guid>
      <dc:creator>Florian</dc:creator>
      <dc:date>2021-08-19T14:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431014#M1997948</link>
      <description>&lt;P&gt;You could use the code below to truncate the table.&lt;/P&gt;&lt;P&gt;The addition 'REUSE STORAGE' avoids shrinking the table to it's initial size.&lt;/P&gt;&lt;P&gt;Please be aware that TRUNCATE is client independent.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;              SELECT        * FROM  DD02L
                     WHERE  TABNAME     = '&amp;amp;1'
                     AND    AS4LOCAL    = 'A'.
              ENDSELECT.
              IF DD02L-TABCLASS NE 'TRANSP'.
                WRITE: / '&amp;amp;1 can not be TRUNCATED       .',
                         DD02L-TABCLASS, DD02L-SQLTAB.
              ELSE.
                EXEC SQL.
                  TRUNCATE TABLE &amp;amp;1 REUSE STORAGE
                ENDEXEC.
              ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Sep 2021 07:16:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431014#M1997948</guid>
      <dc:creator>rlachemann</dc:creator>
      <dc:date>2021-09-09T07:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all the data from Database Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431015#M1997949</link>
      <description>&lt;P&gt;Better to use CL_SQL... if possible.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 09:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-all-the-data-from-database-table/m-p/12431015#M1997949</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-09-09T09:57:15Z</dc:date>
    </item>
  </channel>
</rss>

