<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390987#M814222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shashi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In simple, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE stmt is to create another user-defined data type whereas,LIKE stmt is to create variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WORKAREA is just like structure which can carry one record at a time whereas,INTERNAL TABLE is like a table which can store any no. of records.Records wil be available only at runtime.Lifetime of INTERNAL TABLE is within that program where internal table is declared and wont be stored as global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kamalapriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2008 08:22:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-15T08:22:52Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390986#M814221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;           1.  what is the difference between TYPE and LIKE,&lt;/P&gt;&lt;P&gt;explai with example please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.what is the difference between internal table and work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 08:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390986#M814221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T08:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390987#M814222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shashi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In simple, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE stmt is to create another user-defined data type whereas,LIKE stmt is to create variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WORKAREA is just like structure which can carry one record at a time whereas,INTERNAL TABLE is like a table which can store any no. of records.Records wil be available only at runtime.Lifetime of INTERNAL TABLE is within that program where internal table is declared and wont be stored as global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kamalapriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 08:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390987#M814222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T08:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390988#M814223</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;&lt;/P&gt;&lt;P&gt;ABAP distinguishes between types and objects. Types are descriptions that do not occupy memory. Objects are instances of types, and do occupy their own memory space. A type describes the technical attributes of all of the objects with that type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE &amp;lt;type&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to refer to any data type &amp;lt;type&amp;gt; that is already known at this point in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data object &amp;lt;f&amp;gt; has a data type corresponding to the type &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;The data object &amp;lt;f&amp;gt; inherits all of the technical attributes of the data object &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take an example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;name(30),&lt;/P&gt;&lt;P&gt;pwd(10),&lt;/P&gt;&lt;P&gt;end of ty_tab.&lt;/P&gt;&lt;P&gt;data : itab like ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See here we declared the structure of ty_tab, which do not occupy memory. So if we run this, we will get compile time error like this : Field TY_TAB is unknown. It is neither in one of the specified tables nor defined by a DATA statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this case u need to correct the error with "TYPE" statement...like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;name(30),&lt;/P&gt;&lt;P&gt;pwd(10),&lt;/P&gt;&lt;P&gt;end of ty_tab.&lt;/P&gt;&lt;P&gt;data : itab type ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer these&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table: can hold any number of records.&lt;/P&gt;&lt;P&gt;Workarea : can hold only one record.&lt;/P&gt;&lt;P&gt;When we are passing the records internal table work area is compulsory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 08:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390988#M814223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T08:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390989#M814224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;in internal table ..at run time all the records will be stored where as in workarea there will be only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;already defined dattypes we use TYPE.&lt;/P&gt;&lt;P&gt;parameter : C type C. &lt;/P&gt;&lt;P&gt;TYPE there is no memory allocated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE is used for already declared data objects.&lt;/P&gt;&lt;P&gt;LIKE memory will be allocated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 08:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390989#M814224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T08:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390990#M814225</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;&lt;STRONG&gt;TYPE addition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With TYPE addition, you can refer either to local data types of the same ABAP program or on global data types of the Dictionaries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Local types mask global types that have the same names. When typing the interface parameters or field symbols, a reference is also&lt;/P&gt;&lt;P&gt;possible to generic types ANY, ANY TABLE,INDEX TABLE, TABLE or STANDARD TABLE, SORTED TABLE and HASHED TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The LIKE addition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the LIKE addition, you can refer to all visible data objects&lt;/P&gt;&lt;P&gt;at the ABAP program's positon in question. Only the declaration of the data object must be known. In this case it is totally irrelevant whether the data object already exists physically in memory during the LIKE reference. Local data objects mask global data objects that have the same name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The semantic separation between data types and data objects is reflected by the syntactic separation in ABAP between TYPE and LIKE. &lt;/P&gt;&lt;P&gt;This separation allows for separate namespaces for data types and data objects. Only for reasons of compatibility with preceding releases&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 09:09:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390990#M814225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T09:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390991#M814226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;difference type and like&lt;/STRONG&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;Answer1: &lt;/P&gt;&lt;P&gt;TYPE, you assign datatype directly to the data object while declaring. &lt;/P&gt;&lt;P&gt;LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Answer2: &lt;/P&gt;&lt;P&gt;Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Answer3: &lt;/P&gt;&lt;P&gt;type refers the existing data type &lt;/P&gt;&lt;P&gt;like refers the existing data object &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;STRONG&gt;diff between internal table and work area&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;workarea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While adding or retrieving records to / from internal table we have to keep the record temporarily&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The area where this record is kept is called as work area for the internal table.  The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can define internal tables either with (WITH HEADER LINE addition) or without header lines.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An internal table with header line consists of a work area (header line) and the actual table body. You address both objects  &lt;/P&gt;&lt;P&gt;using the same name. The way in which the system interprets the name depends on the context. For example, the MOVE statement applies to the header line, but the SEARCH statement applies to the body of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid confusion, you are recommended to use internal tables without header lines. This is particularly important when you use nested tables. However, internal tables with header line do offer a shorter syntax in several statements  &lt;/P&gt;&lt;P&gt;( APPEND, INSERT, MODIFY, COLLECT, DELETE, READ, LOOP ).  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within ABAP Objects, you can only use internal tables without a header line. You can always address the body of an internal table &amp;lt;itab&amp;gt; explicitly by using the following syntax: &amp;lt;itab&amp;gt;[].  This syntax is always valid, whether the internal table has a header line or not.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab1 TYPE TABLE OF i WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab2 TYPE TABLE OF i WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 = itab2.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" Only header lines will be copied  &lt;/P&gt;&lt;P&gt;itab1[] = itab2[].  &lt;/P&gt;&lt;P&gt;" Copies table body  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hope this is helpful! do reward&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 09:13:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390991#M814226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T09:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390992#M814227</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;To process a record of the internal table a work area is a must. To process the record of the internal table, we move each record of table in to work area and check,  is it the right record to process and again modify the internal table from work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is for processing internal table, work area is a must. work area will hold a single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type is used to define the variable from  defined  types.&lt;/P&gt;&lt;P&gt;no memory is allocated.&lt;/P&gt;&lt;P&gt;like is used to define the variable from already defined variable.&lt;/P&gt;&lt;P&gt;it will in herit all the properties. and a memory is allocated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kamala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 09:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390992#M814227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T09:18:14Z</dc:date>
    </item>
  </channel>
</rss>

