<?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: Internal Table vs Workarea in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815756#M349299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First statement will create a internal table with 0 rows allocated to it in advance(occurs), if it is occurs 10 then 10 rows will be allocated to the internal table in the memory. But dont use the occurs statement or the header line statement as it is obselete now.&lt;/P&gt;&lt;P&gt;correct way will be data: it_vbak type table of vbak,&lt;/P&gt;&lt;P&gt;                                    wa_vbak type vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you are not giving "table of", it will create a work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jan 2007 05:07:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-22T05:07:43Z</dc:date>
    <item>
      <title>Internal Table vs Workarea</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815752#M349295</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;My question is simply. But I always get this confusing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)  data : it_vbak type vbak occurs 0.&lt;/P&gt;&lt;P&gt;2) data : wa_vbak type vbak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 1st one is declaring for internal table? May I know what is the purpose of occurs 0? The 2nd one is declaring for workarea? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 00:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815752#M349295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T00:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table vs Workarea</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815753#M349296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first one is a declaration of an internal table, but the OCCURS extension is obselete.  I would suggest to not use.  Instead declare like so.  This is an internal table without a header line, so you will need a work area in which to read the data into when using LOOP or READ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: it_vbak type table of vbak.
data: wa_vbak like line of vbak.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also define the work area as you have done in number 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OCCURs extension is an old way of defining the internal table and the 0 is saying that the memory area will be initialize to 0 rows.  You could set this to 10 or whatever.  But using 0, simply says,  do not allocation any memory yet.  Once a record is written to it, it will then allocate for that row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in conclusion,  define your internal tables and work areas as I have in the example above.&lt;/P&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>Mon, 22 Jan 2007 01:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815753#M349296</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-22T01:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table vs Workarea</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815754#M349297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, pls remeber that the 2 declaration i.e. workarea holds only one record for each iteration of loop endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also declare the workarea as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_vbak like line of it_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, in OO concept of ABAP, system does not allow you to declare OCCURS clause instead you should declare workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 01:41:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815754#M349297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T01:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table vs Workarea</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815755#M349298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Also note the use of CLEAR and REFRESH in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR on it_vbak will only clear the work area of the internal table,&lt;/P&gt;&lt;P&gt;where as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH it_vbak will clear the internal table and will keep the workarea intact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use both to clear both internal table and workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both CLEAR and REFRESH will work the same in the case of wa_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 04:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815755#M349298</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-01-22T04:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table vs Workarea</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815756#M349299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First statement will create a internal table with 0 rows allocated to it in advance(occurs), if it is occurs 10 then 10 rows will be allocated to the internal table in the memory. But dont use the occurs statement or the header line statement as it is obselete now.&lt;/P&gt;&lt;P&gt;correct way will be data: it_vbak type table of vbak,&lt;/P&gt;&lt;P&gt;                                    wa_vbak type vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you are not giving "table of", it will create a work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 05:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-vs-workarea/m-p/1815756#M349299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T05:07:43Z</dc:date>
    </item>
  </channel>
</rss>

