<?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/2137903#M449985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs is used to preserve a buffer in ABAP memory for the expected number&lt;/P&gt;&lt;P&gt;of records in an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always, this has to be implemented based on a trial and error method, like &lt;/P&gt;&lt;P&gt;by trying to see how many records would be fetched into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs 100 is always better than occurs 0 if a min of 100 records is expected&lt;/P&gt;&lt;P&gt;in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2007 10:35:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-18T10:35:41Z</dc:date>
    <item>
      <title>Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137896#M449978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between occurs 0 and occurs 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is beter in terms of performance ..Why ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137896#M449978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137897#M449979</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 stmnt is just for allocating memory for internal table . occurs 0 gives less memory whereas occurs 100 gives huge memory.&lt;/P&gt;&lt;P&gt;performance wise it is not recommended to use occurs in ver 4.7 and above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Navneeth.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137897#M449979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137898#M449980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The In occurs n, n defines the number of records you can store in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as a performance if you dont require much records for processing use occurs 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;sandeep&lt;/P&gt;&lt;P&gt;Reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:34:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137898#M449980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137899#M449981</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;A number after OCCURS specifies the initial memory assignment.&lt;/P&gt;&lt;P&gt;If u specify OCCURS 100 then it says that define an internal table with initially a capacity to store 100 rows. As the rowcount exceeds 100, another group of 100 rows is appended to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if Occurs 0 is specified, the that means define internal table only with headre and append blank row one by one as needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137899#M449981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137900#M449982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs 0, the memory allocation is done by system,&lt;/P&gt;&lt;P&gt;in case of occurs 100 memory of 100 records allocated initially ,then if records exceeds then system ll allocate memory,&lt;/P&gt;&lt;P&gt;memory allocation here is known as extent and depend upon basis administrator... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the above addition to reserve memory space for &amp;lt;n&amp;gt; table lines when you declare the table object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The space occupied, depending on the line width, is 16 &amp;lt;= &amp;lt;n&amp;gt; &amp;lt;= 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only makes sense to specify a concrete value of &amp;lt;n&amp;gt; if you can specify a precise number of table entries when you create the table and need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for deep-structured internal tables where the inner table only has a few entries (less than 5, for example). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid excessive requests for memory, large values of &amp;lt;n&amp;gt; are treated as follows: The largest possible value of &amp;lt;n&amp;gt; is 8KB divided by the length of the line. If you specify a larger value of &amp;lt;n&amp;gt;, the system calculates a new value so that n times the line width is around 12KB."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137900#M449982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137901#M449983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;occurs 0 -&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;&amp;gt;  Initiall allocates no memory to itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs 100 -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&amp;gt; Initially allocates memory for 100 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess the first one should give better performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137901#M449983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137902#M449984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs 0:memory will b allocated for one record i.e 8kb&lt;/P&gt;&lt;P&gt;occurs 100:memory allocated for 100 records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137902#M449984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137903#M449985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs is used to preserve a buffer in ABAP memory for the expected number&lt;/P&gt;&lt;P&gt;of records in an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always, this has to be implemented based on a trial and error method, like &lt;/P&gt;&lt;P&gt;by trying to see how many records would be fetched into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs 100 is always better than occurs 0 if a min of 100 records is expected&lt;/P&gt;&lt;P&gt;in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137903#M449985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137904#M449986</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' which creates an internal table with the memmory space of 8kb.&lt;/P&gt;&lt;P&gt;this specifies the size of the itab.&lt;/P&gt;&lt;P&gt;occurs 0 can be used for better performace, but not recommended though for the latest versions&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, 18 Apr 2007 10:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137904#M449986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137905#M449987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandarasekar ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs 0 , I have heared that 8 KB is allocated ,You are telling 0 memory ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137905#M449987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137906#M449988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah, chk the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal tables are a dynamic data structure. Their memory requirements&lt;/P&gt;&lt;P&gt;are met in blocks. The initial memory allocation (hereafter called the&lt;/P&gt;&lt;P&gt;OCCURS area), can be controlled using the "OCCURS n" or "INITIAL SIZE n"&lt;/P&gt;&lt;P&gt;addition in the table definition (see DATA, TYPES). Once the OCCURS area&lt;/P&gt;&lt;P&gt;is full, the next block to be created is twice as big as the OCCURS area&lt;/P&gt;&lt;P&gt;(as long as this is not greater than 8 KB). All further blocks are then&lt;/P&gt;&lt;P&gt;created with a constant size of 12 KB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can leave it to the system to determine the size of the OCCURS area&lt;/P&gt;&lt;P&gt;by specifying n = 0. In this case, the system allocates only a "small"&lt;/P&gt;&lt;P&gt;portion of memory at the first INSERT or APPEND statement. "OCCURS 0" or&lt;/P&gt;&lt;P&gt;"INITIAL SIZE 0" means that 16 &amp;lt;= n &amp;lt;= 100 (depending on the line&lt;/P&gt;&lt;P&gt;width).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only makes sense to specify a concrete value of n &amp;gt; 0 when you know&lt;/P&gt;&lt;P&gt;exactly how many entries the table will have, and you want to set up the&lt;/P&gt;&lt;P&gt;OCCURS area exactly. This can be particularly important if you want to&lt;/P&gt;&lt;P&gt;nest internal tables (where an "outer" internal table contains one or&lt;/P&gt;&lt;P&gt;more other internal tables in each line, and the "inner" tables only&lt;/P&gt;&lt;P&gt;have a few entries (no more than 5, for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid excessive memory requirements, the system handles large values&lt;/P&gt;&lt;P&gt;of n as follows: The largest possible value of n is n_max = 8 KB divided&lt;/P&gt;&lt;P&gt;by the line width. For larger values, n is set such that n multiplied by&lt;/P&gt;&lt;P&gt;the line width is around 12 KB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 10:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137906#M449988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T10:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137907#M449989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi priyanka ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just want to know that hw much memory is allocated in 8 kb .&lt;/P&gt;&lt;P&gt;supose i have to insert 500 lines should i write occurs 0 or occurs 500 . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vivek singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 10:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137907#M449989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T10:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137908#M449990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Occurs 0 statement used for internal table when it applies the table having a place in body and continues it whenever data is coming.&lt;/P&gt;&lt;P&gt;                beside it Occurs 100 works same but it place the 100 line memory.when 100 lines fill in body again 100 lines take place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if you know the coming data.you should use occurs (no.) and when u don't know abt it u used occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is best 4 memory storage and better performence for program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this answer satisfy u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful u think reward me with points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137908#M449990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137909#M449991</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 is betten than OCCURS 100 because &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OCCURS 100.&lt;/P&gt;&lt;P&gt;*****************&lt;/P&gt;&lt;P&gt;if you use occurs 100, the ABAP memory will allocate for 100 records memory location, some time you have only 20 records at that time the remaining 80 records memory space will waste.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REAL TIME EXAMPLE: BUS&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;   In bus total seat is 57, some time only 20 people only will come at that time also bus should go so remaining seats will waste.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OCCURS 0:&lt;/P&gt;&lt;P&gt;**************&lt;/P&gt;&lt;P&gt; OCCURS 0, the memory is not allocated previously, that is optimistic.if you have 20 records the memory will take for only 20 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF USEFULL REWARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/2137909#M449991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:02:20Z</dc:date>
    </item>
  </channel>
</rss>

