<?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: like and type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802346#M344406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at below links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&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/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the addition TYPE, you can either reference to an inbuilt ABAP type, a predefined elementary type in the local program, or to a data element defined in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a LIKE reference, dobj can be an existing data object with an elementary data type. If you do not use the TYPE or LIKE addition, the system uses the default predefined type c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, LIKE means the datatype of the variable is similar to the referenced variable. TYPE means it is a predefined data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: &lt;/P&gt;&lt;P&gt;DATA int TYPE i.&lt;/P&gt;&lt;P&gt;Here int is of integer data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA var LIKE int.&lt;/P&gt;&lt;P&gt;var IS a variable having same data type of int. which in turn is integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find these helpful when you reference database table variables... You need not know what is the datatype defined. &lt;/P&gt;&lt;P&gt;Also it adds to FLEXIBILITY.&lt;/P&gt;&lt;P&gt;Whenever you make changes to your database tables and fields, that change is REFLECTED back to your program that is, You need not change all your program code when you change your table fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you take reference of objects that occupies memory ( data elements, variables decalared with DATA) then use LIKE and when you are taking ref. to a elementry data types(C,I,D,T...) or to a variables declared with TYPES statement then we use TYPE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One Request for you Abhay: &amp;lt;b&amp;gt;Please mark all the helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2006 05:24:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-05T05:24:00Z</dc:date>
    <item>
      <title>like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802344#M344404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is thye exact difference between type and like...&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 05:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802344#M344404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T05:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802345#M344405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;u&amp;gt;TYPE:&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use the TYPE addition in various ABAP statements for defining data types and specifying&lt;/P&gt;&lt;P&gt;the types of interface parameters or field symbols. The TYPE addition can have various&lt;/P&gt;&lt;P&gt;meanings depending on the syntax and context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Statements with TYPE References&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\  Definition of local program types using&lt;/P&gt;&lt;P&gt;TYPES &amp;lt;t&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;The new data type &amp;lt;t&amp;gt; has the same type as &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Declaration of data objects using&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;CLASS-DATA &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;CONSTANTS &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;STATICS &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;PARAMETERS &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;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;  Dynamic creation of data objects using&lt;/P&gt;&lt;P&gt;CREATE DATA &amp;lt;dref&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Specification of the type of a formal parameter in a subroutine using&lt;/P&gt;&lt;P&gt;FORM &amp;lt;sub&amp;gt; ... USING|CHANGING &amp;lt;p&amp;gt; TYPE &amp;lt;type&amp;gt; ...&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the&lt;/P&gt;&lt;P&gt;declared data type &amp;lt;type&amp;gt;. You can then only pass actual parameters that have these&lt;/P&gt;&lt;P&gt;attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Specification of the type of a formal parameter in a method using&lt;/P&gt;&lt;P&gt;METHODS &amp;lt;meth&amp;gt; ... IMPORTING|EXPORTING|CHANGING &amp;lt;p&amp;gt; TYPE &amp;lt;type&amp;gt;&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the&lt;/P&gt;&lt;P&gt;declared data type &amp;lt;type&amp;gt;. You can then only pass actual parameters that have these&lt;/P&gt;&lt;P&gt;attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Specification of the type of a field symbol&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&gt;The technical attributes of the field symbol &amp;lt;FS&amp;gt; are inherited from those of the declared&lt;/P&gt;&lt;P&gt;data type &amp;lt;type&amp;gt;. You can then only pass actual parameters that have these attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;LIKE&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use the LIKE addition, similarly to the TYPE addition, in various ABAP statements for&lt;/P&gt;&lt;P&gt;defining data types and specifying the types of interface parameters or field symbols.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;ABAP Statements with LIKE References&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Definition of local types in a program using&lt;/P&gt;&lt;P&gt;TYPES &amp;lt;t&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;The new data type &amp;lt;t&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;  Declaration of data objects using&lt;/P&gt;&lt;P&gt;DATA &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;CLASS-DATA &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;CONSTANTS &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;STATICS &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;PARAMETERS &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;  Dynamic creation of data objects using&lt;/P&gt;&lt;P&gt;CREATE DATA &amp;lt;dref&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Specification of the type of a formal parameter in a subroutine using&lt;/P&gt;&lt;P&gt;FORM &amp;lt;sub&amp;gt; ... USING|CHANGING &amp;lt;p&amp;gt; LIKE &amp;lt;obj&amp;gt; ...&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the&lt;/P&gt;&lt;P&gt;declared data object &amp;lt;obj&amp;gt;. You can then only pass actual parameters that have these&lt;/P&gt;&lt;P&gt;attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Specification of the type of a formal parameter in a method using&lt;/P&gt;&lt;P&gt;METHODS &amp;lt;meth&amp;gt; ... IMPORTING|EXPORTING|CHANGING &amp;lt;p&amp;gt; LIKE &amp;lt;obj&amp;gt; ...&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the&lt;/P&gt;&lt;P&gt;declared data type &amp;lt;type&amp;gt;. You can then only pass actual parameters that have these&lt;/P&gt;&lt;P&gt;attributes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 05:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802345#M344405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T05:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: like and type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802346#M344406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at below links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&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/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the addition TYPE, you can either reference to an inbuilt ABAP type, a predefined elementary type in the local program, or to a data element defined in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a LIKE reference, dobj can be an existing data object with an elementary data type. If you do not use the TYPE or LIKE addition, the system uses the default predefined type c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, LIKE means the datatype of the variable is similar to the referenced variable. TYPE means it is a predefined data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: &lt;/P&gt;&lt;P&gt;DATA int TYPE i.&lt;/P&gt;&lt;P&gt;Here int is of integer data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA var LIKE int.&lt;/P&gt;&lt;P&gt;var IS a variable having same data type of int. which in turn is integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find these helpful when you reference database table variables... You need not know what is the datatype defined. &lt;/P&gt;&lt;P&gt;Also it adds to FLEXIBILITY.&lt;/P&gt;&lt;P&gt;Whenever you make changes to your database tables and fields, that change is REFLECTED back to your program that is, You need not change all your program code when you change your table fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you take reference of objects that occupies memory ( data elements, variables decalared with DATA) then use LIKE and when you are taking ref. to a elementry data types(C,I,D,T...) or to a variables declared with TYPES statement then we use TYPE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One Request for you Abhay: &amp;lt;b&amp;gt;Please mark all the helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 05:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1802346#M344406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T05:24:00Z</dc:date>
    </item>
  </channel>
</rss>

