<?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 declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590508#M593053</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;  Corrrect way of declaration? what do u mean by this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ways to declare internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if you want to create a intenal table same as a standard table in the database then&lt;/P&gt;&lt;P&gt; data : itab like standard table of vbak with header line.&lt;/P&gt;&lt;P&gt;2) if you want to have your own structure to your internal table the.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delcare types : this is how you shold do most of the times.  to be more professional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;           field1,&lt;/P&gt;&lt;P&gt;           field 2,&lt;/P&gt;&lt;P&gt;           end of ty_tab.&lt;/P&gt;&lt;P&gt;data : x_tab type ty_tab.&lt;/P&gt;&lt;P&gt;data: itab like standard table of x_Tab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt; field1,&lt;/P&gt;&lt;P&gt;           field 2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with object oriented programming type 3 declartion is ruled out and also with header line specification is not possible in this oops scenerio you have to do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab like standard table of vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       x_tab like vbak.&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;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 18:01:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-27T18:01:07Z</dc:date>
    <item>
      <title>Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590506#M593051</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;As per new versions, what is the best/correct way of declaring internal tables?&lt;/P&gt;&lt;P&gt;can anyone tell the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Revanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 17:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590506#M593051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T17:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590507#M593052</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;Please try these ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: it_mseg type table of mseg,
      it_mkpf type table of mkpf.
 
data: wa_mseg type mseg,
      wa_mkpf type mkpf.

or

types: begin of ty_itab,
         &amp;lt;your fields&amp;gt;.
        end of ty_itab.

data: itab type table of ty_itab,
      wa_itab type ty_itab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 17:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590507#M593052</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-07-27T17:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590508#M593053</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;  Corrrect way of declaration? what do u mean by this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ways to declare internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if you want to create a intenal table same as a standard table in the database then&lt;/P&gt;&lt;P&gt; data : itab like standard table of vbak with header line.&lt;/P&gt;&lt;P&gt;2) if you want to have your own structure to your internal table the.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delcare types : this is how you shold do most of the times.  to be more professional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;           field1,&lt;/P&gt;&lt;P&gt;           field 2,&lt;/P&gt;&lt;P&gt;           end of ty_tab.&lt;/P&gt;&lt;P&gt;data : x_tab type ty_tab.&lt;/P&gt;&lt;P&gt;data: itab like standard table of x_Tab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt; field1,&lt;/P&gt;&lt;P&gt;           field 2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with object oriented programming type 3 declartion is ruled out and also with header line specification is not possible in this oops scenerio you have to do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab like standard table of vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       x_tab like vbak.&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;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 18:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590508#M593053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T18:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590509#M593054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPES: BEGIN of my_type,&lt;/P&gt;&lt;P&gt;field1(1),&lt;/P&gt;&lt;P&gt;field2(1),&lt;/P&gt;&lt;P&gt;END OF my_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA i_table like standard TABLE OF my_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA wa_table like my_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first declare type and declare internal table with out header line and work area &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinu reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 18:03:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590509#M593054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T18:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590510#M593055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPES :  BEGIN OF ty_tab&lt;/P&gt;&lt;P&gt;              Fields names&lt;/P&gt;&lt;P&gt;              END OF ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:   itab TYPE STANDARD TABLE OF ty_tab INITIAL SIZE 0. " internal table&lt;/P&gt;&lt;P&gt;DATA:   wa TYPE ty_tab.  " Work Area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to use Field-symbols, then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;fs&amp;gt; type ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab ASSIGNING &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 18:23:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590510#M593055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T18:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590511#M593056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;E.c.c version . some rules for declaring internal tables.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;do not used header line.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;compsary used work area.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_db type standard table of kna1,&lt;/P&gt;&lt;P&gt;        wa_db type kna1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;types: begin of ty_itab,&lt;/P&gt;&lt;P&gt;          fiel1..&lt;/P&gt;&lt;P&gt;         2&lt;/P&gt;&lt;P&gt;         3&lt;/P&gt;&lt;P&gt;        end of ty_itab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: it_db           type standard  table of ty_itab,&lt;/P&gt;&lt;P&gt;      wa_db           type ty_itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 01:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2590511#M593056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T01:14:10Z</dc:date>
    </item>
  </channel>
</rss>

