<?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: diff between type and like in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836821#M664232</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>Sat, 22 Sep 2007 06:45:22 GMT</pubDate>
    <dc:creator>former_member189059</dc:creator>
    <dc:date>2007-09-22T06:45:22Z</dc:date>
    <item>
      <title>diff between type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836820#M664231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;     diff between type and like&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2007 06:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836820#M664231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-22T06:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: diff between type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836821#M664232</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>Sat, 22 Sep 2007 06:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836821#M664232</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-09-22T06:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: diff between type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836822#M664233</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 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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2007 11:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836822#M664233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-22T11:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: diff between type and like</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836823#M664234</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;DATA:&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;surname TYPE string,&lt;/P&gt;&lt;P&gt;roll_no TYPE i,&lt;/P&gt;&lt;P&gt;age TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;        matnr LIKE mara-matnr,&lt;/P&gt;&lt;P&gt;        maktx LIKE makt-maktx,&lt;/P&gt;&lt;P&gt;     END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;show this two exp if you use system fields then you declare it with LIKE.&lt;/P&gt;&lt;P&gt;if you give your own variable then you must give its data-type that time TYPE is use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it will helpful to u.&lt;/P&gt;&lt;P&gt;Rewards if helpful.&lt;/P&gt;&lt;P&gt;prashant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2007 11:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-type-and-like/m-p/2836823#M664234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-22T11:25:10Z</dc:date>
    </item>
  </channel>
</rss>

