<?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: Performance in Declaring Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961494#M946296</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;This is also one of the best way to declare internal table for performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF typ_itab,&lt;/P&gt;&lt;P&gt;               f1,&lt;/P&gt;&lt;P&gt;               f2,&lt;/P&gt;&lt;P&gt;                ,&lt;/P&gt;&lt;P&gt;               fn,&lt;/P&gt;&lt;P&gt;              END OF typ_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_itab TYPE STANDARD TABLE OF typ_itab INITIAL SIZE 1,&lt;/P&gt;&lt;P&gt;           wa_itab TYPE typ_itab.&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;Vishvesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jun 2008 10:36:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-11T10:36:33Z</dc:date>
    <item>
      <title>Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961488#M946290</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;Hope this query might seem very simple but I wanted to make it clear. I want to declare an itab with all the fields of the database table. There are many fields in db table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I go for TYPES or DATA statement?&lt;/P&gt;&lt;P&gt;If I define with DATA , Is it "with occurs 0 with header line" or use separate work area. Pls suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 09:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961488#M946290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T09:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961489#M946291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to use all the fields for internal table from DB table then you can use like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
   lt_files     LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will make your internal table with header line with all the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for without header line table you need to define separate work area for it.like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  ls_excel       TYPE alsmex_tabline.
                                       " Work Area to hold Rows for Table

*"--------------------------------------------------------------------*
* Internal table to hold Rows for Table with Excel Data.              *
*"--------------------------------------------------------------------*
DATA:
  it_excel      TYPE TABLE OF alsmex_tabline.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;performance will be same if you use with or without header line  internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;twinkal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 09:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961489#M946291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T09:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961490#M946292</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;You can declare a internal table either using &lt;STRONG&gt;data&lt;/STRONG&gt; or &lt;STRONG&gt;types&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use data statement you need to use &lt;STRONG&gt;occurs 0 with header line&lt;/STRONG&gt;. Or if you want to use types you need to declare internal table with or without header line and a work area.&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, 11 Jun 2008 09:56:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961490#M946292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T09:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961491#M946293</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;1 - If possible use types. If you have more than one internal tables of same type, if you want to change the type, with types, only one change that affects all tables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF ty_out,
         field1 TYPE x,
         field2 TYPE y,
       END OF ty_out.
DATA: it_out TYPE STANDARD TABLE OF ty_out,
      wa_out TYPE ty_out.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2 - Always use work area (instead of OCCURS 0). Work areas are &lt;STRONG&gt;faster&lt;/STRONG&gt; (check Se30, tips&amp;amp;tricks), work in &lt;STRONG&gt;OO programing&lt;/STRONG&gt; and OCCURS is an &lt;STRONG&gt;obsolete&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 09:58:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961491#M946293</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-06-11T09:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961492#M946294</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;Create Structure if u want to use all the data of the table using DATA with OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit G.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 10:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961492#M946294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T10:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961493#M946295</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;You can use both the TYPES and DATA no problem..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is always advisable that use separate work area just like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;   begin of fs_structure,&lt;/P&gt;&lt;P&gt;     f1 type xyz,&lt;/P&gt;&lt;P&gt;     f2 type abc,&lt;/P&gt;&lt;P&gt;   end of fs_structure.&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;   t_table like standard table of fs_structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will be more efficient..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 10:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961493#M946295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T10:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in Declaring Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961494#M946296</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;This is also one of the best way to declare internal table for performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF typ_itab,&lt;/P&gt;&lt;P&gt;               f1,&lt;/P&gt;&lt;P&gt;               f2,&lt;/P&gt;&lt;P&gt;                ,&lt;/P&gt;&lt;P&gt;               fn,&lt;/P&gt;&lt;P&gt;              END OF typ_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_itab TYPE STANDARD TABLE OF typ_itab INITIAL SIZE 1,&lt;/P&gt;&lt;P&gt;           wa_itab TYPE typ_itab.&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;Vishvesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 10:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-declaring-internal-table/m-p/3961494#M946296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T10:36:33Z</dc:date>
    </item>
  </channel>
</rss>

