<?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 Delete custom table records without performance issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168617#M1978779</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;In my custom table having more than 900 Million records.Need to delete the records without &lt;STRONG&gt;performance issue.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I have tried to read the records from based on date and time . And we have tried to delete but its going for memory dump..&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DELETEFROM(tablename)WHEREzone='X'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Could you please suggest best solution for this.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2020 05:59:18 GMT</pubDate>
    <dc:creator>former_member671693</dc:creator>
    <dc:date>2020-04-29T05:59:18Z</dc:date>
    <item>
      <title>Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168617#M1978779</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;In my custom table having more than 900 Million records.Need to delete the records without &lt;STRONG&gt;performance issue.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I have tried to read the records from based on date and time . And we have tried to delete but its going for memory dump..&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DELETEFROM(tablename)WHEREzone='X'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Could you please suggest best solution for this.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 05:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168617#M1978779</guid>
      <dc:creator>former_member671693</dc:creator>
      <dc:date>2020-04-29T05:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168618#M1978780</link>
      <description>&lt;P&gt;you need to delete ALL the records or with a condition ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168618#M1978780</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-04-29T06:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168619#M1978781</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;you can do some package deletion like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO.
  SELECT * 
         FROM (tablename)
         WHERE zone = @abap_true
         INTO TABLE @data(deletes)
         UP TO 10000 ROWS.
  IF sy-subrc &amp;lt;&amp;gt; 0.
   EXIT. "DO
  ENDIF.
  DELETE (tablename) FROM TABLE @deletes.
  COMMIT WORK.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or with relase 751 you can use something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO.
  DELETE FROM (tablename) WHERE zone = @abap_true UP TO 10000 ROWS.
  IF sy-subrc &amp;lt;&amp;gt; 0.
   EXIT. "DO
  ENDIF.
  COMMIT WORK.
ENDDO.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapdelete_where.htm" target="_blank"&gt;https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapdelete_where.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Domi&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168619#M1978781</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2020-04-29T06:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168620#M1978782</link>
      <description>&lt;P&gt;Dear Rajesh&lt;/P&gt;&lt;P&gt;Write your delete function in a program and run it at background. &lt;/P&gt;&lt;P&gt;It will be done without any dump.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:27:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168620#M1978782</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-04-29T06:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168621#M1978783</link>
      <description>&lt;P&gt;if the dump is related to memory area; it could occurs again. &lt;/P&gt;&lt;P&gt;only timeout as no effect on background job. &lt;/P&gt;&lt;P&gt;second method to bypass timeout, is to use COMMIT statement, because it clear the TIMEOUT count. So to use as  &lt;SPAN class="mention-scrubbed"&gt;dominik.bigl2&lt;/SPAN&gt;  proposed, a rows block process&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168621#M1978783</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-04-29T06:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168622#M1978784</link>
      <description>&lt;P&gt;Hi  @&lt;SPAN class="mention-scrubbed"&gt;dominik.bigl2&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt; I will try to implement your solution in my system and I have another query like "what is maximum package size can we give 10,000 is maximum  or can I try with 50,000 ?"&lt;/P&gt;&lt;P&gt;Also I have tried one solution.....&lt;/P&gt;&lt;P&gt;Could you please advise here....whether it will work or not.&lt;/P&gt;&lt;P&gt;Example : &lt;/P&gt;&lt;P&gt;I have 900 million records in my custom table....&lt;/P&gt;&lt;P&gt;Each month....approx..it will have 3 crores recods in table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution :&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN CURSOR WITH HOLD s_cursor FOR&lt;BR /&gt;    SELECT * FROM zupload INTO TABLE lt_pegg WHERE date between ls_date-low and ls_date-high.

&lt;BR /&gt;DO.&lt;BR /&gt;   FETCH NEXT CURSOR s_cursor APPENDING TABLE lt_pegg&lt;BR /&gt;       PACKAGE SIZE 50000.

&lt;BR /&gt;   IF sy-subrc eq 0.&lt;BR /&gt;      DELETE zupload FROM TABLE lt_pegg.&lt;BR /&gt;   endif.&lt;BR /&gt;     clear : lt_pegg.&lt;BR /&gt;   else.&lt;BR /&gt;     EXIT.&lt;BR /&gt;   ENDIF.

&lt;BR /&gt;ENDDO.

&lt;BR /&gt; CLOSE CURSOR: s_cursor.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have tried this solution.....it also working..&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 09:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168622#M1978784</guid>
      <dc:creator>former_member671693</dc:creator>
      <dc:date>2020-04-29T09:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168623#M1978785</link>
      <description>&lt;P&gt;Your previous question was actually really how to "&lt;A href="https://answers.sap.com/questions/13033776/delete-custom-table-records-without-performance-is.html"&gt;Delete custom table records &lt;STRONG&gt;without performance issue&lt;/STRONG&gt;&lt;/A&gt;".&lt;/P&gt;&lt;P&gt;But now, your question is how to "Delete custom table records &lt;STRONG&gt;without database error&lt;/STRONG&gt;". Are you talking about the issue with size of rollback segment (segment size not big enough to store all deletions + to allow committed read?&lt;/P&gt;&lt;P&gt;Can you post any dump/message?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 09:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168623#M1978785</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-29T09:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168624#M1978786</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you can provide the ST22 - dump message, &lt;/P&gt;&lt;P&gt;We can find is it related to memory or timeout or any other &lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 09:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168624#M1978786</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-04-29T09:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168625#M1978787</link>
      <description>&lt;P&gt;.In foreground its going for&lt;STRONG&gt; time out&lt;/STRONG&gt; dump.So we have schedule it in background mode but in background mode also getting memory dump. &lt;/P&gt;&lt;P&gt;Per day its having 3 crores records in custom table.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 12:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168625#M1978787</guid>
      <dc:creator>former_member671693</dc:creator>
      <dc:date>2020-04-29T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168626#M1978788</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;rajeshkumar01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The package size depends on your DB, available memory, and runtime/timeout system parameter! You have to find suitable values for your landscape!&lt;/P&gt;&lt;P&gt;THIS solution will not work! IF...endif...else..ENDIF. (Please use the &lt;STRONG&gt;Insert Code &lt;/STRONG&gt;function!?!?!?)&lt;/P&gt;&lt;P&gt;Did you try your solution? Why not?&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Domi&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 13:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168626#M1978788</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2020-04-29T13:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168627#M1978789</link>
      <description>&lt;P&gt;Sorry Domi,&lt;/P&gt;&lt;P&gt;I forgot to add "Not initial condition".After fetch next cursor, It will check whether Internal table lt_pegg have values or not. If values present, then it will delete the records from table. Else it will exit from Do.. enddo.&lt;/P&gt;&lt;P&gt;I have tried this solution in my system..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution :&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    OPEN CURSOR WITH HOLD s_cursor FOR&lt;BR /&gt;       SELECT * FROM zupload INTO TABLE lt_pegg WHERE date between ls_date-low and ls_date-high.
&lt;BR /&gt;DO.&lt;BR /&gt;     FETCH NEXT CURSOR s_cursor APPENDING TABLE lt_pegg&lt;BR /&gt;     PACKAGE SIZE 50000.
&lt;BR /&gt;  IF lt_pegg is not initial.&lt;BR /&gt;      DELETE zupload FROM TABLE lt_pegg.&lt;BR /&gt;      commit work.&lt;BR /&gt;      clear : lt_pegg.&lt;BR /&gt;  else.&lt;BR /&gt;      EXIT.&lt;BR /&gt;  ENDIF.

ENDDO.

&lt;BR /&gt;CLOSE CURSOR: s_cursor.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also I have tried your below solution with date range   and its working fine....and it does not cause any dump..&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO.SELECT*FROM(tablename)WHEREzone=@abap_true
         INTOTABLE@data(deletes)UPTO10000ROWS.IFsy-subrc &amp;lt;&amp;gt;0.EXIT."DOENDIF.DELETE(tablename)FROMTABLE@deletes.COMMITWORK.ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Thanks,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rajesh kumar.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 15:15:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168627#M1978789</guid>
      <dc:creator>former_member671693</dc:creator>
      <dc:date>2020-04-29T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Delete custom table records without performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168628#M1978790</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;rajeshkumar01&lt;/SPAN&gt; In the forum, if the spaces of your pasted ABAP code are removed, paste again and the spaces should be kept. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 16:32:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-custom-table-records-without-performance-issue/m-p/12168628#M1978790</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-04-29T16:32:10Z</dc:date>
    </item>
  </channel>
</rss>

