<?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: When are internal tables initialized? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422367#M1738210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even I when through this problem when I was in training period. Then I got to know the reason after 2 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is whenever you go back to selection screen from the output screen, the program will be reloaded i.e the program execution starts from beginning, it re-initializes all the declarations. So there is no way you can retain the values. All the values will be lost once you go to selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to retain the values then, before leaving the output screen, use the ABAP memory, export the values and use these values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before LEAVE TO SCREEN 0. Add this one line code.&lt;/P&gt;&lt;P&gt;EXPORT itab TO MEMORY ID 'ABC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import wherever you want using this statement.&lt;/P&gt;&lt;P&gt;IMPORT itab FROM MEMORY ID 'ABC'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 09:02:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-05-22T09:02:17Z</dc:date>
    <item>
      <title>When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422362#M1738205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that my internal tables are cleared when I return to the selection screen from my report with help of the "back" button!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has this behaviour changed (we use 7.31)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a possability to keep data within an internal table when I return to selection screen? Due to performance issues this internal tables should only&amp;nbsp; be built up once!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 07:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422362#M1738205</guid>
      <dc:creator>gerhard_hangoebl2</dc:creator>
      <dc:date>2013-05-22T07:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422363#M1738206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Import and export parameters to acheive this &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 07:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422363#M1738206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-22T07:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422364#M1738207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put data retrieval logic inside function module which has internal table in top include.&lt;/P&gt;&lt;P&gt;Global internal table will retain values on subsequent calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do fresh selections only when:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Internal table is empty&lt;/LI&gt;&lt;LI&gt;Internal table has values but importing parameters of function module have changed.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 08:10:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422364#M1738207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-22T08:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422365#M1738208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on how the BACK action is coded, if it performs a LEAVE TO SCREEN 0 (and no cleaning in first PBO), data is kept, if it use a LEAVE TO TRANSACTION sy-tcode or more recent LEAVE TO CURRENT TRANSACTION (&lt;A href="http://help.sap.com/abapdocu_731/en/abennews-640.htm"&gt;release 6.40&lt;/A&gt;), data is cleared. And there are more and more program that use those statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 08:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422365#M1738208</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-05-22T08:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422366#M1738209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Raymond!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My experience is different, the coding of my BACK button is LEAVE TO SCREEN 0! When I return to selection screen and start execution immedialty again, the data are not kept (internal table is initial)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 08:30:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422366#M1738209</guid>
      <dc:creator>gerhard_hangoebl2</dc:creator>
      <dc:date>2013-05-22T08:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: When are internal tables initialized?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422367#M1738210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even I when through this problem when I was in training period. Then I got to know the reason after 2 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is whenever you go back to selection screen from the output screen, the program will be reloaded i.e the program execution starts from beginning, it re-initializes all the declarations. So there is no way you can retain the values. All the values will be lost once you go to selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to retain the values then, before leaving the output screen, use the ABAP memory, export the values and use these values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before LEAVE TO SCREEN 0. Add this one line code.&lt;/P&gt;&lt;P&gt;EXPORT itab TO MEMORY ID 'ABC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import wherever you want using this statement.&lt;/P&gt;&lt;P&gt;IMPORT itab FROM MEMORY ID 'ABC'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 09:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-are-internal-tables-initialized/m-p/9422367#M1738210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-22T09:02:17Z</dc:date>
    </item>
  </channel>
</rss>

