<?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/1366785#M181307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gopal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no difference in this case but in general,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE : you assign datatype directly to the data object while declaring.&lt;/P&gt;&lt;P&gt;&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;Reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2006 06:41:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-30T06:41:44Z</dc:date>
    <item>
      <title>internal table  declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366781#M181303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA: ITAB TYPE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;      DATA: ITAB LIKE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHAT IS THE BASIC DIFFERENCE BETWEEN  THESE TWO COMMANDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               THANKING U,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          GOPAN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366781#M181303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:29:51Z</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/1366782#M181304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gopan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;In this case, there is no difference.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &lt;/P&gt;&lt;P&gt;For all practical purposes there are the same. The only additional advantage with types is that you can define your own types(including complex ones) in the data dictionary and reuse them accross various programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But within a program if two variables are defined one using LIKE and another using TYPE, both referring to the same field, then there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I include a type pool within a program, then I can define my variables only using TYPE to refer to any type defined in that pool. I cannot use LIKE in this scenario. Also, if I want to use native types like C, N, etc, I cannot use LIKE there either. I can use LIKE ABC only if ABC is in the database or if ABC is defined previously in the same program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use TYPE ABC, if ABC is defined in database as a TYPE and included in the program with the statement TYPE-POOLS. I can use it, if it is the native types. I can use it, if it is already defined in the dictionary as a structure/table or structure/table field, or even if it is defined as a data element or a domain. So I can declare a variable V_BUKRS TYPE BUKRS, but I cannot define a variable V_BUKRS LIKE BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I intend to use V_BUKRS to store company code, I will prefer to declare it as V_BUKRS LIKE T001-BUKRS, only because if tomorrow for some reason, the definition of T001-BUKRS changes to a data element for example, BUKRS_N(say DEC 4) instead of the data element BUKRS(CHAR 4) that it refers to now, I don't have to change my programs because I am referring to the table field and inhereting its properties. Whereas, had I declared my V_BUKRS TYPE BUKRS and the table now changed to BUKRS_N, I will be forced to change my program as there will be a type incompatability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. try this code (just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : char50(50) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : d1 type c, "--- native&lt;/P&gt;&lt;P&gt;d2 type n, "--- native&lt;/P&gt;&lt;P&gt;d25 type char50 , "----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; User defined data type&lt;/P&gt;&lt;P&gt;d3 type bukrs, "---- data element / domain&lt;/P&gt;&lt;P&gt;d4 type persno, "---- data element / domain&lt;/P&gt;&lt;P&gt;d5 type t001, "---- table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d99 type c&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*l1 like c "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l2 like n "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l25 like char50 , "----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; User defined data type&lt;/P&gt;&lt;P&gt;*l3 like bukrs "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l4 like persno, "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;l5 like t001 , "---- table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l99 like pa0001&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;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366782#M181304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:34:51Z</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/1366783#M181305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gopan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see Type and Like both can use for predefined&lt;/P&gt;&lt;P&gt;where as like can use for userdefined only u can't use type here ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: A type i or A like i. " it is correct&lt;/P&gt;&lt;P&gt;data: b type A. " error b'coz A is a user defined&lt;/P&gt;&lt;P&gt;the correct one is &lt;/P&gt;&lt;P&gt;data: b like A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:40:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366783#M181305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:40:12Z</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/1366784#M181306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;       Generally type is used for predefined objects and&lt;/P&gt;&lt;P&gt;       like for userdefined&lt;/P&gt;&lt;P&gt;for ex...&lt;/P&gt;&lt;P&gt;        if i say&lt;/P&gt;&lt;P&gt;   data : a(2) type c&lt;/P&gt;&lt;P&gt;          b(2) like a.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:40:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366784#M181306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:40:20Z</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/1366785#M181307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gopal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no difference in this case but in general,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE : you assign datatype directly to the data object while declaring.&lt;/P&gt;&lt;P&gt;&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;Reward points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366785#M181307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:41:44Z</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/1366786#M181308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gopan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE is a keyword to refer data type.&lt;/P&gt;&lt;P&gt;LIKE is a keyword to refer data object.&lt;/P&gt;&lt;P&gt;data types are purely descriptive means no memory allocation.&lt;/P&gt;&lt;P&gt;data objects have memory allocation.&lt;/P&gt;&lt;P&gt;data types will define technical properties data objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type will be faster than like due to the same reason. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some long discussion on this in these forums too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="417359"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Susmitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366786#M181308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:45: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/1366787#M181309</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;According to your declaration, there is no difference.&lt;/P&gt;&lt;P&gt;You can learn the different betwen type and like in &amp;lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3605358411d1829f0000e829fbfe/frameset.htm"&amp;gt;here&amp;lt;/a&amp;gt;.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2006 06:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/1366787#M181309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-30T06:45:51Z</dc:date>
    </item>
  </channel>
</rss>

