<?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 Difference between DEclaring Itab with DATA &amp; TYpe Statement? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855274#M926758</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;  What is the Difference between Declaring Itab with DATA &amp;amp; TYpe Statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 May 2008 07:09:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-16T07:09:20Z</dc:date>
    <item>
      <title>Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855274#M926758</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;  What is the Difference between Declaring Itab with DATA &amp;amp; TYpe Statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855274#M926758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855275#M926759</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;if you declare structure by using TYPES and then declare internal table using TYPE TABLE OF it will provide better performance and by using TYPES it doesnot hold any memory and store as template only but by using DATA it will occupy memory by turn decreases the performance and also if u use OCCURS in declaration of internal table it is obselete and throughs EPC error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:18:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855275#M926759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855276#M926760</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;The Statements TYPES and DATA &lt;/P&gt;&lt;P&gt;Each ABAP program define its own data types using the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES dtype &lt;A href="LIKE dobj"&gt;TYPE type&lt;/A&gt; ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and declare its own variables or instance attributes of classes using the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA var &lt;A href="{LIKE dobj}"&gt;{TYPE type}&lt;/A&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;Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Additions TYPE and LIKE&lt;/P&gt;&lt;P&gt;The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Definition of local types in a program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Declaration of data objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Dynamic creation of data objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Specification of the type of formal parameters in subroutines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Specification of the type of formal parameters in methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Specification of the type of field symbols&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF struct,&lt;/P&gt;&lt;P&gt;         number_1 TYPE i,&lt;/P&gt;&lt;P&gt;         number_2 TYPE p DECIMALS 2,&lt;/P&gt;&lt;P&gt;       END OF struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  wa_struct TYPE struct,&lt;/P&gt;&lt;P&gt;       number    LIKE wa_struct-number_2,&lt;/P&gt;&lt;P&gt;       date      LIKE sy-datum,&lt;/P&gt;&lt;P&gt;       time      TYPE t,&lt;/P&gt;&lt;P&gt;       text      TYPE string,&lt;/P&gt;&lt;P&gt;       company   TYPE s_carr_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if found helpfull..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Chandra Sekhar.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855276#M926760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855277#M926761</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 use TYPES to declare a work area(typically holds one record only) But if you declare using DATA and OCCURS statement it will create an internal table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: Begin of itab&lt;/P&gt;&lt;P&gt;              -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;             end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above case a work area is created...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : begin of itab OCCURS 0,&lt;/P&gt;&lt;P&gt;           -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;           end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inabove case an internal table is created and 0 bytes of memory is allocated...&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;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:20:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855277#M926761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855278#M926762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dheeraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Welcome To SDN!!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like -&amp;gt; used for refering existing data elements in data dictionary or in sap&lt;/P&gt;&lt;P&gt;type -&amp;gt; used for refering existing data types in sap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: used for creating used defined structure of tables which has fields from more tahn one table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff b/w types and type in creation of internal tables is that when u create a table with types then u can use same for work area creation also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:21:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855278#M926762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between DEclaring Itab with DATA &amp; TYpe Statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855279#M926763</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;TYPES and DATA:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;types&lt;/STRONG&gt; doesn't allocate memory for the variables or structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as &lt;STRONG&gt;data&lt;/STRONG&gt; allocates memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     when u create itab with DATA the initial memory will be allocated for the internal table.(here the object is created).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    but with TYPES it just stores the type of the table.(here the object is not yet created)&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;raji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: raji ch on May 16, 2008 9:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 07:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-declaring-itab-with-data-type-statement/m-p/3855279#M926763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T07:21:22Z</dc:date>
    </item>
  </channel>
</rss>

