<?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: type and like in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182570#M999803</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;In this case, nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some restrictions, for example you can't use LIKE in OO environment, and you have to use TYPE keywork for pre-defined TYPES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2008 09:16:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-17T09:16:48Z</dc:date>
    <item>
      <title>type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182569#M999802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.     TYPES : BEGIN OF I_VBAK,&lt;/P&gt;&lt;P&gt;                     VBELN LIKE VBAK-VBELN,&lt;/P&gt;&lt;P&gt;                     ERDAT LIKE VBAK-ERDAT,&lt;/P&gt;&lt;P&gt;                     ERNAM LIKE VBAK-ERNAM,&lt;/P&gt;&lt;P&gt;                     CHECK_BOX TYPE C,&lt;/P&gt;&lt;P&gt;                     END OF I_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.     TYPES : BEGIN OF I_VBAK,&lt;/P&gt;&lt;P&gt;                     VBELN type VBAK-VBELN,&lt;/P&gt;&lt;P&gt;                     ERDAT type VBAK-ERDAT,&lt;/P&gt;&lt;P&gt;                     ERNAM type VBAK-ERNAM,&lt;/P&gt;&lt;P&gt;                     CHECK_BOX TYPE C,&lt;/P&gt;&lt;P&gt;                     END OF I_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what makes the diffrence here if I declare with type and like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182569#M999802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182570#M999803</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;In this case, nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some restrictions, for example you can't use LIKE in OO environment, and you have to use TYPE keywork for pre-defined TYPES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182570#M999803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182571#M999804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="409304"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182571#M999804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182572#M999805</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 the present case , there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that doesn't means both TYPE and LIKE are same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refering to SAP HELP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type is used to refer known datatype&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REF:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE &amp;lt;type&amp;gt;

to refer to any data type &amp;lt;type&amp;gt; that is already known at this point in the program. It can be used in any of the statements listed below. The expression &amp;lt;obj&amp;gt; is either the name of the data object or the expression&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And like for global datatype&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LIKE &amp;lt;obj&amp;gt;

can be used in the same ABAP statements as the TYPE addition to refer to any data object &amp;lt;obj&amp;gt; that is already visible at that point in the program. The expression &amp;lt;obj&amp;gt; is either the name of the data object or the expression&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will clear the doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182572#M999805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182573#M999806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182573#M999806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182574#M999807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi shilpa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it doesn't make remarkable difference,&lt;/P&gt;&lt;P&gt;but use of LIKE in this way is get obsolute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it gives error in EXTENDED PROGRAM CHECK (EPC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ragards,&lt;/P&gt;&lt;P&gt;sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182574#M999807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182575#M999808</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;In the above case there is no difference .&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;Like: It is when data object link with the other data &lt;/P&gt;&lt;P&gt;object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type refers to the user defined data types&lt;/P&gt;&lt;P&gt;like refers to existing data type of data object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&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;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;3.&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; 4.&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;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182575#M999808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182576#M999809</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;TYPE is used while refering to the data types and types declared using types statement, where as LIKE is used to refer to the data objects.&lt;/P&gt;&lt;P&gt;LIKE means the datatype of the variable is similar to the referenced variable.&lt;/P&gt;&lt;P&gt;TYPE means it is a predefined data type.&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;hope this is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;dhanashri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-and-like/m-p/4182576#M999809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:26:39Z</dc:date>
    </item>
  </channel>
</rss>

