<?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/3597947#M866455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ABAP editor, on OCCURS, you may press F1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remaining questions to be posted here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Mar 2008 18:58:29 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2008-03-22T18:58:29Z</dc:date>
    <item>
      <title>Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597945#M866453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u  plz tell me what is the purpose of giving&lt;/P&gt;&lt;P&gt; OCCURS 0??????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Priya.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 17:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597945#M866453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T17:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597946#M866454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HAI ,&lt;/P&gt;&lt;P&gt;            By using occurs we can allocate some initial memory for internal table , like occurs 0 (it will allocate 8 kb memory) initially.&lt;/P&gt;&lt;P&gt;after that if needed it will allocate another 8 more and it will go on like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 18:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597946#M866454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T18:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597947#M866455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ABAP editor, on OCCURS, you may press F1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remaining questions to be posted here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 18:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597947#M866455</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-03-22T18:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597948#M866456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&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.&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;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Viveks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Mar 2008 20:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597948#M866456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-22T20:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Occurs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597949#M866457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When ever we declare internal tables or variables or constants system will allocate memory to each one based on the size of the object while runtime. For variables and constants we can determine the size from the definition. For internal tables size will be equal to sum of sizes of all fields. i.e size of one row equal to sum of sizes of all fields. Size of table equal to Size of each row * Number of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OCCURS&lt;/STRONG&gt; statement is used to define an &lt;STRONG&gt;implicit work area&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;called header line&lt;/STRONG&gt; while defining internal table. OCCURS 0 is used to allocate initial memory of &lt;STRONG&gt;8KB&lt;/STRONG&gt; to the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OCCURS n, The value specified in n identifies number of expected records in the internal table. If the number of records exceeds then the system will allocate memory for next n records. If the value of n is zero then it means that u dont know how many records u r going to get. So the system will allocate default memory of 8KB. Use OCCURS 0 only if u are sure that ur table contents crosses 8KB at some point. Otherwise it will be simply waste of resource(Memory) while executing the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sugesstion is dont go for OCCURS addition as it is already obsolete in OOPS concepts. Also If we use OCCURS then name of the internal table and header line will be same. So there will be confusion in which is work area and which is header line. So always go for explicit work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below the effective way of defining internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_vbap,                    "Structure&lt;/P&gt;&lt;P&gt;                vbeln TYPE vbap-vbeln,&lt;/P&gt;&lt;P&gt;                posnr TYPE vbap-posnr,&lt;/P&gt;&lt;P&gt;                matnr TYPE vbap-matnr,&lt;/P&gt;&lt;P&gt;             END OF t_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_vbak TYPE STANDARD TABLE OF t_vbak, "Internal table &lt;/P&gt;&lt;P&gt;           wa_vbak TYPE t_vbak.  "Explicit Work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clarified ur doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 05:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/occurs/m-p/3597949#M866457</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-03-23T05:15:20Z</dc:date>
    </item>
  </channel>
</rss>

