<?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: clear work area refresh internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228087#M1380162</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;-&amp;gt;Please check if your internal table is populated before it comes to the LOOP...ENDLOOP statements that you have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Debug and check the sy-subrc value in case you are populating the internal table using a select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Oct 2009 11:52:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-12T11:52:46Z</dc:date>
    <item>
      <title>clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228079#M1380154</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;Where should i claer work area &amp;amp; refresh internal table.&lt;/P&gt;&lt;P&gt;Inside the loop or outside the loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT gt_ekbe INTO gwa_ekbe.
    gwa_final-belnr = gwa_ekbe-belnr.
    gwa_final-budat = gwa_ekbe-budat.
    gwa_final-ebeln = gwa_ekbe-ebeln.
    gwa_final-menge = gwa_ekbe-menge.
    APPEND gwa_final TO gt_final.
         ENDLOOP.

  LOOP AT gt_ekpo INTO gwa_ekpo.
    gwa_final-werks = gwa_ekpo-werks.
    gwa_final-matnr = gwa_ekpo-matnr.
    APPEND gwa_final TO gt_final.
         ENDLOOP.

  LOOP AT gt_marc INTO gwa_marc.
    gwa_final-prctr = gwa_marc-prctr.
    APPEND gwa_final TO gt_final.
       ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 10:49:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228079#M1380154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T10:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228080#M1380155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi oorvi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to clear the work area inside the loop after every APPEND statement. &lt;/P&gt;&lt;P&gt;Internal table refresh is generally done outside the loop. not inside the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ram,.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 10:53:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228080#M1380155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T10:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228081#M1380156</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;The normal practice is.&lt;/P&gt;&lt;P&gt;Clear wa is used before the loop starts or before the key endloop as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;loop itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--clear wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;never refresh Itab within a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the purpose of the Itab is over then you can refresh, that means once you are sure that you are no longer come back and use Itab then you can refresh it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are doing repeatative select queries into the same itab then before the select query you can use refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you are filling up the itab on certain condition before you reach that condition you can do that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 10:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228081#M1380156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T10:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228082#M1380157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oorvi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workareas are generally cleared inside the loop - endloop statements.&lt;/P&gt;&lt;P&gt;Clear the workareas in the beginning of the statement after the LOOP statement or at the end after appending the data before the ENDLOOP statement. This is done to clear the buffer during the next entry of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal tables are refreshed outside the LOOP statements. Once when the data in the internal tables are no longer required in the program, internal tables are refreshed. &lt;/P&gt;&lt;P&gt;This statement sets an internal table itab to its initial value, meaning that it deletes all rows of the internal table. The memory space required for the table is freed up to the initial memory size INITIAL SIZE. For itab, you must specify an internal table. &lt;/P&gt;&lt;P&gt;The syntax is : REFRESH itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228082#M1380157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228083#M1380158</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;Clearing the work are is done just afetr you append the wa to internal table , but refreshing is done where ever you think data is appended in the internal table comapletely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in your case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT gt_ekbe INTO gwa_ekbe.
    gwa_final-belnr = gwa_ekbe-belnr.
    gwa_final-budat = gwa_ekbe-budat.
    gwa_final-ebeln = gwa_ekbe-ebeln.
    gwa_final-menge = gwa_ekbe-menge.
    APPEND gwa_final TO gt_final.
   clear gwa_fianl
         ENDLOOP.
refresh gt_final.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;hope this will clear your confussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:21:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228083#M1380158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228084#M1380159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am clearing work area inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and refreshing internal table outside the loop.&lt;/P&gt;&lt;P&gt;but iam not getting the output.&lt;/P&gt;&lt;P&gt;what is the reason?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228084#M1380159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228085#M1380160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clearing the work area should be done after the APPEND statement inside the loop. Even then if you are not getting the output, debug and check where the problem lies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228085#M1380160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228086#M1380161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please execute the code in the debugger and check the value in the internal table in every pass to see the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:50:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228086#M1380161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228087#M1380162</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;-&amp;gt;Please check if your internal table is populated before it comes to the LOOP...ENDLOOP statements that you have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Debug and check the sy-subrc value in case you are populating the internal table using a select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:52:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228087#M1380162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: clear work area refresh internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228088#M1380163</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 clear and refresh at the beginning of loop. And again place clear of work areas inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refresh : GT_FINAL.&lt;/P&gt;&lt;P&gt;Clear : gwa_final, gwa_ekbe.&lt;/P&gt;&lt;P&gt;LOOP AT gt_ekbe INTO gwa_ekbe.&lt;/P&gt;&lt;P&gt;    gwa_final-belnr = gwa_ekbe-belnr.&lt;/P&gt;&lt;P&gt;    gwa_final-budat = gwa_ekbe-budat.&lt;/P&gt;&lt;P&gt;    gwa_final-ebeln = gwa_ekbe-ebeln.&lt;/P&gt;&lt;P&gt;    gwa_final-menge = gwa_ekbe-menge.&lt;/P&gt;&lt;P&gt;    APPEND gwa_final TO gt_final.&lt;/P&gt;&lt;P&gt;Clear : gwa_final, gwa_ekbe.&lt;/P&gt;&lt;P&gt;         ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful to you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 12:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-work-area-refresh-internal-table/m-p/6228088#M1380163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T12:13:46Z</dc:date>
    </item>
  </channel>
</rss>

