<?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 &amp;gt;&amp;lt;   LIKE   &amp; TYPE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-gt-lt-like-type/m-p/2824505#M660823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE&lt;/P&gt;&lt;P&gt;You use the TYPE addition in various ABAP statements for defining data types and specifying the types of interface parameters or field symbols. The TYPE addition can have various meanings depending on the syntax and context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE&lt;/P&gt;&lt;P&gt;You use the LIKE addition, similarly to the TYP E addition , in various ABAP statements for defining data types and specifying the types of interface parameters or field symbols. The addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE &amp;lt;obj&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use LIKE to make the new object or type inherit the technical attributes of an existing data object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type we can use to refer system defined or user defined data types and data dictionary objects..&lt;/P&gt;&lt;P&gt;like we will use in case of refering data dictionary objects only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the link.&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;/P&gt;&lt;P&gt;&lt;/P&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;type is generally used for declaring variables, parameters for existing data types in abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: to declare a inter value and character variable of length 10 is as,&lt;/P&gt;&lt;P&gt;data: i1 type i,&lt;/P&gt;&lt;P&gt;c1(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like generally refers to existing data objects in abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex:&lt;/P&gt;&lt;P&gt;data: matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;vbeln like vbap-vbeln.&lt;/P&gt;&lt;P&gt;creating variables matnr, vbeln from existing fields of tables mara, vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when user creates a user defiend structure for work areas, internal tables we generally use type keyword as&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;P&gt;.........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;data: itab1 type itab occurs 0 [with header line]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=2270752" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=2270752&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=512214" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=512214&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps to solve ur problem....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2007 06:08:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-01T06:08:38Z</dc:date>
    <item>
      <title>Difference &gt;&lt;   LIKE   &amp; TYPE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-gt-lt-like-type/m-p/2824504#M660822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference  between  LIKE and TYPE   keywords&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when do we use them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm confused over the keywords.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me avoid further any confusions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 06:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-gt-lt-like-type/m-p/2824504#M660822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T06:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference &gt;&lt;   LIKE   &amp; TYPE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-gt-lt-like-type/m-p/2824505#M660823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE&lt;/P&gt;&lt;P&gt;You use the TYPE addition in various ABAP statements for defining data types and specifying the types of interface parameters or field symbols. The TYPE addition can have various meanings depending on the syntax and context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE&lt;/P&gt;&lt;P&gt;You use the LIKE addition, similarly to the TYP E addition , in various ABAP statements for defining data types and specifying the types of interface parameters or field symbols. The addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE &amp;lt;obj&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use LIKE to make the new object or type inherit the technical attributes of an existing data object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type we can use to refer system defined or user defined data types and data dictionary objects..&lt;/P&gt;&lt;P&gt;like we will use in case of refering data dictionary objects only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the link.&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;/P&gt;&lt;P&gt;&lt;/P&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;type is generally used for declaring variables, parameters for existing data types in abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: to declare a inter value and character variable of length 10 is as,&lt;/P&gt;&lt;P&gt;data: i1 type i,&lt;/P&gt;&lt;P&gt;c1(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like generally refers to existing data objects in abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex:&lt;/P&gt;&lt;P&gt;data: matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;vbeln like vbap-vbeln.&lt;/P&gt;&lt;P&gt;creating variables matnr, vbeln from existing fields of tables mara, vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when user creates a user defiend structure for work areas, internal tables we generally use type keyword as&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;P&gt;.........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;data: itab1 type itab occurs 0 [with header line]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=2270752" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=2270752&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=512214" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=711746&amp;amp;messageID=512214&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps to solve ur problem....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 06:08:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-gt-lt-like-type/m-p/2824505#M660823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T06:08:38Z</dc:date>
    </item>
  </channel>
</rss>

