<?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/2368393#M524548</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;If you want to create data similar to already existing data use LIKE &lt;/P&gt;&lt;P&gt;if you want to create data which is of data type (Standard ABAP or any DDIC data element or structure or table type use TYPE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 11:40:34 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-06-14T11:40:34Z</dc:date>
    <item>
      <title>like and type...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368391#M524546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kindly let me know when I have to use LIKE and when I have to use TYPE Exactly.&lt;/P&gt;&lt;P&gt;What is the difference b/w both..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Akshihta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368391#M524546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:35:59Z</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/2368392#M524547</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;/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;.............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:38:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368392#M524547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:38:10Z</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/2368393#M524548</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;If you want to create data similar to already existing data use LIKE &lt;/P&gt;&lt;P&gt;if you want to create data which is of data type (Standard ABAP or any DDIC data element or structure or table type use TYPE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:40:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368393#M524548</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-14T11:40:34Z</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/2368394#M524549</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;check out this link..&lt;/P&gt;&lt;P&gt;&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="584897"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368394#M524549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:42:42Z</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/2368395#M524550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE should refer the data types&lt;/P&gt;&lt;P&gt;LIKE should refer the existing objects,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG:&lt;/P&gt;&lt;P&gt;field like kna1-kunnr.&lt;/P&gt;&lt;P&gt;filed type c or i any ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards points if help full&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suresh.s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        suresh dameruppula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        suresh dameruppula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368395#M524550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:44:09Z</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/2368396#M524551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi akshitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: varname[(len)] type typedef  [value val].&lt;/P&gt;&lt;P&gt;	Data  postcode(4) type n value &amp;#145;4001&amp;#146;.&lt;/P&gt;&lt;P&gt;	Data counter type i value 1.&lt;/P&gt;&lt;P&gt;	Data price type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: varname like objname  [value val].&lt;/P&gt;&lt;P&gt;Where objname is a previously declared item (or database object)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The datatype of an identifier can be specified using &lt;/P&gt;&lt;P&gt;-&amp;gt;Type specific type&lt;/P&gt;&lt;P&gt;-&amp;gt;Like previously defined identifier/dictionary object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF X_TYPE1,&lt;/P&gt;&lt;P&gt;             COUNTER 	   TYPE  I ,&lt;/P&gt;&lt;P&gt;             NAME1(25) ,&lt;/P&gt;&lt;P&gt;             SALES_DOC   LIKE  VBAK-VBELN  ,&lt;/P&gt;&lt;P&gt;           END OF X_TYPE1.&lt;/P&gt;&lt;P&gt;DATA:  WS_VAR1 TYPE X_TYPE1.&lt;/P&gt;&lt;P&gt;DATA: WS_VAR2 LIKE WS_VAR1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;rami&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368396#M524551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:44:45Z</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/2368397#M524552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;type - to refer data types &lt;/P&gt;&lt;P&gt;like - to refer exsting object ( we call data object )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple Example : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a type i.  " It will not take any memory ( always use type when you use in the program )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data b like a .  " it will take memory ( it is like data object - do not refer if possible)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368397#M524552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:49:44Z</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/2368398#M524553</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;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TYPE &amp;lt;type&amp;gt;&amp;lt;/b&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. It can be used in any of the statements listed below. 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;&amp;lt;b&amp;gt;ABAP Statements with TYPE References&amp;lt;/b&amp;gt;&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;&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;&lt;/P&gt;&lt;P&gt;CONSTANTS &amp;lt;f&amp;gt; TYPE &amp;lt;type&amp;gt;.&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;PARAMETERS &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;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;&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the declared 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;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;&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the declared 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;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;&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;&amp;lt;b&amp;gt;LIKE &amp;lt;obj&amp;gt;.&amp;lt;/b&amp;gt;&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;&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;&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;&lt;/P&gt;&lt;P&gt;CONSTANTS &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;PARAMETERS &amp;lt;f&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the declared data object &amp;lt;obj&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;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;&lt;/P&gt;&lt;P&gt;The technical attributes of the formal parameter &amp;lt;p&amp;gt; are inherited from those of the declared 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;Specification of the type of a field symbol&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; LIKE &amp;lt;obj&amp;gt;.&lt;/P&gt;&lt;P&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 data object &amp;lt;obj&amp;gt;. You can then only assign data objects that have these attributes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You should also avoid using the LIKE addition in other ABAP programs except to refer to data objects&amp;lt;/b&amp;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;Ashokreddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/2368398#M524553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:50:49Z</dc:date>
    </item>
  </channel>
</rss>

