<?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: How can I put a commit work when I delete a Z table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829700#M353713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not really sure what the question is, but if you try to deelte all the records from a very large table at once, the roll area may be exceeded causing a dump. Are you asking about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2007 21:29:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-04T21:29:24Z</dc:date>
    <item>
      <title>How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829698#M353711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program that erase a Z table, but I have a problem with the rollback memory. A consultant tell me that if I execute a commit work after some records the memory of the rollback is cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can execute in my program the commit work after some files and when finish?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my simple code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*Tabla a utilizar.
TABLES zavg_bal_table.

*Este select elimina todos los records encontrados en la tabla: ZAVG_BAL_TABLE.
DELETE  FROM zavg_bal_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 21:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829698#M353711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T21:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829699#M353712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you would like to clear the entire table.  You can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;delete from sflight CLIENT SPECIFIED where mandt = sy-mandt.
commit work.&lt;/CODE&gt;&lt;/PRE&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>Thu, 04 Jan 2007 21:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829699#M353712</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-04T21:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829700#M353713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not really sure what the question is, but if you try to deelte all the records from a very large table at once, the roll area may be exceeded causing a dump. Are you asking about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 21:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829700#M353713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T21:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829701#M353714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's my question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 12:12:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829701#M353714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T12:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829702#M353715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - you have to find a way to delete data in chunks and do a commit after each chunk. One way to do this would be to select a group of records using the UP &lt;/P&gt;&lt;P&gt;TO n ROWS option of the SELECT statement and then for each group of records, delete the records and do a commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 14:28:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829702#M353715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T14:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829703#M353716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 255
  MESSAGE-ID 00.

* Tabla a utilizar.
TABLES zavg_bal_table.

DATA: BEGIN OF itab OCCURS 0.
        INCLUDE STRUCTURE zavg_bal_table.
DATA: END   OF itab.

* Este select elimina todos los records encontrados en la tabla:
* ZAVG_BAL_TABLE.

WHILE sy-subrc = 0.

  SELECT * FROM  zavg_bal_table
    INTO TABLE itab UP TO 10000 ROWS.

  DELETE  zavg_bal_table FROM TABLE itab.
  COMMIT WORK.

ENDWHILE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 14:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829703#M353716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T14:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put a commit work when I delete a Z table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829704#M353717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fully agree with Rob,&lt;/P&gt;&lt;P&gt;We usually make a parameter for the number of rows in a package so it can be adjusted on a produciton without the need for transport.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do it a bit differently though:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE num_rec &amp;gt;0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECT * FROM  zavg_bal_table&lt;/P&gt;&lt;P&gt;    INTO TABLE itab UP TO p_rows ROWS.&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;  describe table itab lines num_rec.&lt;/P&gt;&lt;P&gt;  check num_rec &amp;gt; 0. &lt;/P&gt;&lt;P&gt;  DELETE  zavg_bal_table FROM TABLE itab.&lt;/P&gt;&lt;P&gt;  COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 18:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-put-a-commit-work-when-i-delete-a-z-table/m-p/1829704#M353717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T18:57:34Z</dc:date>
    </item>
  </channel>
</rss>

