<?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 like and type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166867#M753374</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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           By using this we can create our own data type using existing data types and we can create structures.&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;&lt;/P&gt;&lt;P&gt;      This will points towards already existed or user defined data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for  u r understanding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; type : begin of st1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            name type c(10),&lt;/P&gt;&lt;P&gt;            address type c(100),&lt;/P&gt;&lt;P&gt;         end of st1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : per like st1.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i want to have one more structure with similar data types then u  have no need to redefine them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; type : begin of st2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            per1 like st1,&lt;/P&gt;&lt;P&gt;          phone like c(10),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          end of st2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2007 04:34:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-18T04:34:20Z</dc:date>
    <item>
      <title>difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166864#M753371</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;&lt;/P&gt;&lt;P&gt;can anyone inform me what is the difference between like and type statements&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;kals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166864#M753371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166865#M753372</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;&lt;STRONG&gt;type&lt;/STRONG&gt; describes the field &lt;STRONG&gt;'matnr'&lt;/STRONG&gt; with the dataelement defined by the user in se11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(user can create his/her own dataelement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: matnr type d_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;like&lt;/STRONG&gt; decribes the field &lt;STRONG&gt;'matnr'&lt;/STRONG&gt; with the help of system defined&lt;/P&gt;&lt;P&gt;dataelement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;data: matnr like mara-matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166865#M753372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166866#M753373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type is used to definethe data type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereas Like is used to define the dataobject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. data: matnr type matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg for like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: matnr LIKE mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope got the difference.&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;Sana.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points for useful answers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166866#M753373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166867#M753374</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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           By using this we can create our own data type using existing data types and we can create structures.&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;&lt;/P&gt;&lt;P&gt;      This will points towards already existed or user defined data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for  u r understanding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; type : begin of st1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            name type c(10),&lt;/P&gt;&lt;P&gt;            address type c(100),&lt;/P&gt;&lt;P&gt;         end of st1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : per like st1.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i want to have one more structure with similar data types then u  have no need to redefine them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; type : begin of st2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            per1 like st1,&lt;/P&gt;&lt;P&gt;          phone like c(10),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          end of st2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:34:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166867#M753374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166868#M753375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out this link..&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166868#M753375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166869#M753376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Type is used to refer predefined data types, where as Like refer for user defined data types.&lt;/P&gt;&lt;P&gt; For example.&lt;/P&gt;&lt;P&gt;data: &lt;/P&gt;&lt;P&gt;      Begin of fs_data.&lt;/P&gt;&lt;P&gt;      c_box,&lt;/P&gt;&lt;P&gt;      name(10) type c,&lt;/P&gt;&lt;P&gt;    end of fs_data.&lt;/P&gt;&lt;P&gt;data:  it_tab like table of fs_data.&lt;/P&gt;&lt;P&gt;whereas Type&lt;/P&gt;&lt;P&gt; data:&lt;/P&gt;&lt;P&gt;     it_tab type table of mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plzz reward points if it  helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166869#M753376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166870#M753377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP distinguishes between types and objects. Types are descriptions that do not occupy memory. Objects are instances of types, and do occupy their own memory space. A type describes the technical attributes of all of the objects with that type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE &amp;lt;type&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to refer to any data type &amp;lt;type&amp;gt; that is already known at this point in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data object &amp;lt;f&amp;gt; has a data type corresponding to the type &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;The data object &amp;lt;f&amp;gt; inherits all of the technical attributes of the data object &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take an example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;name(30),&lt;/P&gt;&lt;P&gt;pwd(10),&lt;/P&gt;&lt;P&gt;end of ty_tab.&lt;/P&gt;&lt;P&gt;data : itab like ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See here we declared the structure of ty_tab, which do not occupy memory. So if we run this, we will get compile time error like this : Field TY_TAB is unknown. It is neither in one of the specified tables nor defined by a DATA statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this case u need to correct the error with "TYPE" statement...like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_tab,&lt;/P&gt;&lt;P&gt;name(30),&lt;/P&gt;&lt;P&gt;pwd(10),&lt;/P&gt;&lt;P&gt;end of ty_tab.&lt;/P&gt;&lt;P&gt;data : itab type ty_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer these&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;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;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 04:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166870#M753377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T04:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: difference between like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166871#M753378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;means anything in the data dictionary and activated is a available as a type. &lt;/P&gt;&lt;P&gt;and local types we can define. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 11:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/3166871#M753378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-21T11:29:08Z</dc:date>
    </item>
  </channel>
</rss>

