<?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: occurs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574301#M860319</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;Before Release 3.0, internal tables all had header lines and a flat-structured line type. There&lt;/P&gt;&lt;P&gt;were no independent table types. You could only create a table object using the OCCURS&lt;/P&gt;&lt;P&gt;addition in the DATA statement, followed by a declaration of a flat structure:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF &amp;lt;itab&amp;gt; OCCURS &amp;lt;n&amp;gt;,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;lt;fi&amp;gt; ...,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;END OF &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;This statement declared an internal table &amp;lt;itab&amp;gt; with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.&lt;/P&gt;&lt;P&gt;The number &amp;lt;n&amp;gt; in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering &amp;#145;0&amp;#146; had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.&lt;/P&gt;&lt;P&gt;The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF &amp;lt;itab&amp;gt;,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;lt;fi&amp;gt; ...,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;END OF &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA &amp;lt;itab&amp;gt; TYPE STANDARD TABLE OF &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;WITH NON-UNIQUE DEFAULT KEY&lt;/P&gt;&lt;P&gt;INITIAL SIZE &amp;lt;n&amp;gt;&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;In the original statement, no independent data type &amp;lt;itab&amp;gt; is created. Instead, the line type only exists as an attribute of the data object &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Mar 2008 14:37:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-19T14:37:45Z</dc:date>
    <item>
      <title>occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574295#M860313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BEGIN OF i_out OCCURS 0&lt;/P&gt;&lt;P&gt;what does this mean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:27:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574295#M860313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T13:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574296#M860314</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;Occurs 0 means, table  i_out  with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:30:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574296#M860314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T13:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574297#M860315</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;internal table can hold maximum records possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you declare the itab as occurs 0, the system allocates memory in multiples of 8kb as and when the the itab needs it ie depending on the number of entries in the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:31:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574297#M860315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T13:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574298#M860316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;occurs 0 means that initially only 8kb is allocated for the internal table.then as and when the record is added, it expands. since u dont know the volume of records it is best to use 'occurs 0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574298#M860316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T13:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574299#M860317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Occurs 0 :&lt;/P&gt;&lt;P&gt;It is a keyword  that creates internal table  with or without header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs 0 means, the size of the table header for an initial table is 8 bytes. Unlike all other ABAP data objects, you do not have to specify the memory required for an internal table. Table rows are added to and deleted from the table dynamically at runtime by the various statements for adding and deleting records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we can call occurs X as initial size of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 19, 2008 5:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:42:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574299#M860317</guid>
      <dc:creator>nivaskumar2</dc:creator>
      <dc:date>2008-03-19T13:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574300#M860318</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;Occurs 0 means when you declare a internal table with occurs 0, by default it will allocate 8kb of memory for the internal table, as the size of the internal table increases memory will be increases by 8kb. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs 0, internal table with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574300#M860318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T13:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574301#M860319</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;Before Release 3.0, internal tables all had header lines and a flat-structured line type. There&lt;/P&gt;&lt;P&gt;were no independent table types. You could only create a table object using the OCCURS&lt;/P&gt;&lt;P&gt;addition in the DATA statement, followed by a declaration of a flat structure:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF &amp;lt;itab&amp;gt; OCCURS &amp;lt;n&amp;gt;,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;lt;fi&amp;gt; ...,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;END OF &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;This statement declared an internal table &amp;lt;itab&amp;gt; with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.&lt;/P&gt;&lt;P&gt;The number &amp;lt;n&amp;gt; in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering &amp;#145;0&amp;#146; had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.&lt;/P&gt;&lt;P&gt;The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF &amp;lt;itab&amp;gt;,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;lt;fi&amp;gt; ...,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;END OF &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA &amp;lt;itab&amp;gt; TYPE STANDARD TABLE OF &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;WITH NON-UNIQUE DEFAULT KEY&lt;/P&gt;&lt;P&gt;INITIAL SIZE &amp;lt;n&amp;gt;&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;In the original statement, no independent data type &amp;lt;itab&amp;gt; is created. Instead, the line type only exists as an attribute of the data object &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2008 14:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574301#M860319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-19T14:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574302#M860320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;OCCURS 0------it is for allocating memory,initially 8kb memory is allocated first and then based on the records the size of memory also automatically increases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but perfromnce wise it is not suggested to use this OCCURS 0.&lt;/P&gt;&lt;P&gt;if we only exactly how many records we r adding,based on that we can declare for eg occurs 8 etc.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vineela.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 05:49:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574302#M860320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T05:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574303#M860321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;occurs 0 means that initially only 8kb is allocated for the internal table.then as and when the record is added, it expands. since u dont know the volume of records it is best to use 'occurs 0'.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PANKAJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 05:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574303#M860321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T05:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574304#M860322</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;While coding avoid using occurs statemet.Now in new versions SAP has mad like satement as OBSOLETE&lt;/P&gt;&lt;P&gt;instead of that use TYPES and TYPE STANDARD TABLE of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically occurs 0 means it creates a workarea or header for a internal table implicitly,as other have suggested is given max memory.Suppose your internal table is having only one record tehn rest of the memory won't be used.So please avoid using occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose say you know a internal table can have max 10 records,then you can use occurs 10 as it provide memory for 10 records at a time.Say if the internal table is having 11 records then it would place another slot of memory for another 10 records,as we have only 1 records rest of the memory for 9 records will be wasted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 06:15:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3574304#M860322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T06:15:33Z</dc:date>
    </item>
  </channel>
</rss>

