<?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: Difference between Type and Like? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827794#M920510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE - Type is used to tell the system what is the type of data object(variable) you want to create .&lt;/P&gt;&lt;P&gt;LIKE: If there is already a data object declared and you want to declare a similar data object you can just refer to the previous data object using like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the link -&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="4219330"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2008 03:44:01 GMT</pubDate>
    <dc:creator>amit_khare</dc:creator>
    <dc:date>2008-05-09T03:44:01Z</dc:date>
    <item>
      <title>Difference between Type and Like?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827793#M920509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends can any one explain me in simple words wht is TYPE and LIKE.&lt;/P&gt;&lt;P&gt;This statements i got my ABAP help..&lt;/P&gt;&lt;P&gt;DATA: event_table TYPE cntl_simple_events, &lt;/P&gt;&lt;P&gt;      event       LIKE LINE OF event_table. &lt;/P&gt;&lt;P&gt;I want to know wht happens if i write LIKE and TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 03:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827793#M920509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T03:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Type and Like?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827794#M920510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE - Type is used to tell the system what is the type of data object(variable) you want to create .&lt;/P&gt;&lt;P&gt;LIKE: If there is already a data object declared and you want to declare a similar data object you can just refer to the previous data object using like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the link -&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="4219330"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 03:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827794#M920510</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-05-09T03:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Type and Like?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827795#M920511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE refers to an existing variable within your program or a DDIC type.&lt;/P&gt;&lt;P&gt;TYPE refers to a DDIC type (including type-pool types) or other type definitions in your program but not to an existing variable definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: event_table TYPE cntl_simple_events,  " refers to another TYPE definition
event LIKE LINE OF event_table.                    " refers to existing variable event_table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final remark: LIKE is not allowed anymore in ABAP-Objects (except for LIKE LINE OF). Thus, always use the TYPE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 03:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827795#M920511</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-05-09T03:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Type and Like?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827796#M920512</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;--&amp;gt;        A predefined ABAP type to which you refer using the TYPE addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;        An existing local data type in the program to which you refer using the TYPE addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;        The data type of a local data object in the program to which you refer using the LIKE addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;LIKE&lt;/STRONG&gt; addition takes its technical attributes from a visible data object. As a rule, you can use &lt;STRONG&gt;LIKE&lt;/STRONG&gt; to refer to any object that has been declared using &lt;STRONG&gt;DATA&lt;/STRONG&gt; or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the &lt;STRONG&gt;LIKE&lt;/STRONG&gt; reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 03:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827796#M920512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T03:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between Type and Like?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827797#M920513</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;o TYPE addition&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. Local types mask global types that have the same names . When typing the interface parameters or field symbols, a reference is also 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;o The LIKE addition&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;&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. This separation allows for separate namespaces for data types and data objects. Only for reasons of compatibility with preceding releases, can you refer to flat structures (see note 176336) in the ABAP Dictionary with the LIKE addition, so to database tables and independent flat structures. The LIKE addition first finds a data object on the local program and then in the ABAP Dictionary it finds a database table or flat structure that has the same name. The type reference on the ABAP Dictionary is no longer possible with LIKE in the class of ABAP objects. In all ABAP programs, the LIKE reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is forbidden on data elements, internal tables and deep structures of the&lt;/P&gt;&lt;P&gt;ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TYPE reference to global data types of the ABAP Dictionary is possible as of Release 4.5. At the same time all types of the ABAP type concept can be defined in the ABAP Dictionary as of Release 4.5. Previously there was only an actual equivalent for flat structures between the ABAP data types and the dictionary data types. The structure of database tables and independent structures corresponded to the ABAP data type structure in the dictionary Only with the LIKE addition could database tables and structures be referred to fro m ABAP programs. In the meantime the LIKE addition should be used in all ABAP programs only for referring to data objects while the TYPE addition is used of the reference to the data type.&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;Hope this helps.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 04:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-type-and-like/m-p/3827797#M920513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T04:32:08Z</dc:date>
    </item>
  </channel>
</rss>

