<?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/1250006#M144678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type -- refer to data type(may be user defined using types)&lt;/P&gt;&lt;P&gt;like -- refer to database fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all practical purposes there are the same. The only additional advantage with &amp;lt;b&amp;gt;types&amp;lt;/b&amp;gt; is that you can define your own types(including complex ones) in the data dictionary and reuse them accross various programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But within a program if two variables are defined one using LIKE and another using TYPE, both referring to the same field, then there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I include a type pool within a program, then I can define my variables only using TYPE to refer to any type defined in that pool. I cannot use LIKE in this scenario. Also, if I want to use native types like C, N, etc, I cannot use LIKE there either. I can use LIKE ABC only if ABC is in the database or if ABC is defined previously in the same program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use TYPE ABC, if ABC is defined in database as a TYPE and included in the program with the statement TYPE-POOLS. I can use it, if it is the native types. I can use it, if it is already defined in the dictionary as a structure/table or structure/table field, or even if it is defined as a data element or a domain. So I can declare a variable V_BUKRS TYPE BUKRS, but I cannot define a variable V_BUKRS LIKE BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I intend to use V_BUKRS to store company code, I will prefer to declare it as V_BUKRS LIKE T001-BUKRS, only because if tomorrow for some reason, the definition of T001-BUKRS changes to a data element for example, BUKRS_N(say DEC 4) instead of the data element BUKRS(CHAR 4) that it refers to now, I don't have to change my programs because I am referring to the table field and inhereting its properties. Whereas, had I declared my V_BUKRS TYPE BUKRS and the table now changed to BUKRS_N, I will be forced to change my program as there will be a type incompatability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth.&lt;/P&gt;&lt;P&gt;Please Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2006 11:15:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-09T11:15:57Z</dc:date>
    <item>
      <title>Like and Type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1249998#M144670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt; Wat is hte basic difference between "TYPE" and "like" declarations.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Saurabh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1249998#M144670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:07:26Z</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/1249999#M144671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LIKE means the datatype of the variable is similar to the referenced variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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;&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,&lt;/P&gt;&lt;P&gt;that change is REFLECTED back to your program that is,&lt;/P&gt;&lt;P&gt;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;Hope you understand and appreciate the flexibility that SAP provides to the programmers...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1249999#M144671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:09:52Z</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/1250000#M144672</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;like allow you to define a field in reference of a stucture, table, or internal table ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type allow you to define a field in reference of a type, of a data element ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;toto like table_name-field_name ,&lt;/P&gt;&lt;P&gt;toto type type_type ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgd&lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250000#M144672</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-03-09T11:11:46Z</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/1250001#M144673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is not too much difference, except for TYPE might refer to a locally defined TYPES in your program, while LIKE always refers to the Data Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since LIKE is not allowed in the OO-context you should always use TYPE.&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;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250001#M144673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:11:51Z</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/1250002#M144674</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;when u use LIKE the datatype of the variable is similar to the referenced variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With TYPE means it is referring to a predefined data type.&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;priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250002#M144674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:12:33Z</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/1250003#M144675</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;LIKE , we refer to only user defined data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type, we refer to standard and also to declarations which we made as standard with TYPES declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;examples:&lt;/P&gt;&lt;P&gt;1.data: p like i (wrong)&lt;/P&gt;&lt;P&gt;      p type i (right)  'i' is standard type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. types: begin of typ,&lt;/P&gt;&lt;P&gt;sno type i,&lt;/P&gt;&lt;P&gt;sname,&lt;/P&gt;&lt;P&gt;end of typ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab &amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt; standard table of typ.&lt;/P&gt;&lt;P&gt;data: wa &amp;lt;b&amp;gt;like&amp;lt;/b&amp;gt; line of itab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:13:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250003#M144675</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-03-09T11:13:22Z</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/1250004#M144676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES &amp;lt;type&amp;gt;[&amp;lt;length&amp;gt;]. &lt;/P&gt;&lt;P&gt;Default C(1). &lt;/P&gt;&lt;P&gt;&amp;lt;length&amp;gt; should only be used with the types C, N, P and X. Other types can only be created in the standard length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions: &lt;/P&gt;&lt;P&gt;TYPE &amp;lt;knowntype&amp;gt;. &lt;/P&gt;&lt;P&gt;LIKE &amp;lt;f&amp;gt;. &lt;/P&gt;&lt;P&gt;Defines the new type. &amp;lt;f&amp;gt; - a database field or an already defined internal field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap.html?20066#itread" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap.html?20066#itread&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250004#M144676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:13:38Z</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/1250005#M144677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Like and Type are much similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only in OO concepts, use of like is forbidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By type, you can assign a predefined type to a variable or theuser defined type created by TYPES statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:14:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250005#M144677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:14:57Z</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/1250006#M144678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type -- refer to data type(may be user defined using types)&lt;/P&gt;&lt;P&gt;like -- refer to database fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all practical purposes there are the same. The only additional advantage with &amp;lt;b&amp;gt;types&amp;lt;/b&amp;gt; is that you can define your own types(including complex ones) in the data dictionary and reuse them accross various programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But within a program if two variables are defined one using LIKE and another using TYPE, both referring to the same field, then there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I include a type pool within a program, then I can define my variables only using TYPE to refer to any type defined in that pool. I cannot use LIKE in this scenario. Also, if I want to use native types like C, N, etc, I cannot use LIKE there either. I can use LIKE ABC only if ABC is in the database or if ABC is defined previously in the same program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use TYPE ABC, if ABC is defined in database as a TYPE and included in the program with the statement TYPE-POOLS. I can use it, if it is the native types. I can use it, if it is already defined in the dictionary as a structure/table or structure/table field, or even if it is defined as a data element or a domain. So I can declare a variable V_BUKRS TYPE BUKRS, but I cannot define a variable V_BUKRS LIKE BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I intend to use V_BUKRS to store company code, I will prefer to declare it as V_BUKRS LIKE T001-BUKRS, only because if tomorrow for some reason, the definition of T001-BUKRS changes to a data element for example, BUKRS_N(say DEC 4) instead of the data element BUKRS(CHAR 4) that it refers to now, I don't have to change my programs because I am referring to the table field and inhereting its properties. Whereas, had I declared my V_BUKRS TYPE BUKRS and the table now changed to BUKRS_N, I will be forced to change my program as there will be a type incompatability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth.&lt;/P&gt;&lt;P&gt;Please Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250006#M144678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:15:57Z</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/1250007#M144679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;type: is used to create new data type&lt;/P&gt;&lt;P&gt;    like:  is used to assign the existing data type to the variable.&lt;/P&gt;&lt;P&gt;    modif id in parameters is used to send the variable data between&lt;/P&gt;&lt;P&gt;abap  sessions.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:16:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250007#M144679</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-03-09T11:16:54Z</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/1250008#M144680</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 main difference between TYPE and LIKE parameter when defining or declaring the object is that TYPE is used to refer existing DATA TYPE (elementary or structured or user defined) while LIKE is used to declare data objects with reference to existing DATA OBJECTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex DATA: NUM TYPE I&lt;/P&gt;&lt;P&gt;NUM is a variable declared by DATA statement.  Any variable, which you use in program, need to be declared before you use it and can be done by DATA statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here variable is declared by referring to existing data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable can also be declared by referring existing data object.&lt;/P&gt;&lt;P&gt;Ex. We have already declared NUM by DATA statement.&lt;/P&gt;&lt;P&gt;DATA: PRICE LIKE NUM.&lt;/P&gt;&lt;P&gt;Here variable is declared by using LIKE parameter, which tells system that price has all the attributes of data object NUM i.e., PRICE is also of type I.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:17:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250008#M144680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:17:32Z</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/1250009#M144681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &lt;/P&gt;&lt;P&gt;For all practical purposes there are the same. The only additional advantage with types is that you can define your own types(including complex ones) in the data dictionary and reuse them accross various programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But within a program if two variables are defined one using LIKE and another using TYPE, both referring to the same field, then there is no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I include a type pool within a program, then I can define my variables only using TYPE to refer to any type defined in that pool. I cannot use LIKE in this scenario. Also, if I want to use native types like C, N, etc, I cannot use LIKE there either. I can use LIKE ABC only if ABC is in the database or if ABC is defined previously in the same program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use TYPE ABC, if ABC is defined in database as a TYPE and included in the program with the statement TYPE-POOLS. I can use it, if it is the native types. I can use it, if it is already defined in the dictionary as a structure/table or structure/table field, or even if it is defined as a data element or a domain. So I can declare a variable V_BUKRS TYPE BUKRS, but I cannot define a variable V_BUKRS LIKE BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I intend to use V_BUKRS to store company code, I will prefer to declare it as V_BUKRS LIKE T001-BUKRS, only because if tomorrow for some reason, the definition of T001-BUKRS changes to a data element for example, BUKRS_N(say DEC 4) instead of the data element BUKRS(CHAR 4) that it refers to now, I don't have to change my programs because I am referring to the table field and inhereting its properties. Whereas, had I declared my V_BUKRS TYPE BUKRS and the table now changed to BUKRS_N, I will be forced to change my program as there will be a type incompatability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. try this code (just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : char50(50) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : d1 type c, "--- native&lt;/P&gt;&lt;P&gt;d2 type n, "--- native&lt;/P&gt;&lt;P&gt;d25 type char50 , "----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; User defined data type&lt;/P&gt;&lt;P&gt;d3 type bukrs, "---- data element / domain&lt;/P&gt;&lt;P&gt;d4 type persno, "---- data element / domain&lt;/P&gt;&lt;P&gt;d5 type t001, "---- table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d99 type c&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*l1 like c "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l2 like n "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l25 like char50 , "----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; User defined data type&lt;/P&gt;&lt;P&gt;*l3 like bukrs "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;*l4 like persno, "----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Not Allowed&lt;/P&gt;&lt;P&gt;l5 like t001 , "---- table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l99 like pa0001&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;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:18:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250009#M144681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:18:12Z</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/1250010#M144682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TYPE&amp;lt;/b&amp;gt;is used 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;something like i,x,t,d,p..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LIKE&amp;lt;/b&amp;gt; can be used in the same ABAP statements as the TYPE to refer to any data object that is already visible at that point in the program...&lt;/P&gt;&lt;P&gt;A  good example could be this..&lt;/P&gt;&lt;P&gt;data : b type p decimals 2.&lt;/P&gt;&lt;P&gt;data : a like b.&lt;/P&gt;&lt;P&gt;to define a lot of types with &amp;lt;b&amp;gt;type p decimals 2&amp;lt;/b&amp;gt; you just use &amp;lt;b&amp;gt;LIKE b&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;satesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:20:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250010#M144682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T11:20:50Z</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/1250011#M144683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshi,&lt;/P&gt;&lt;P&gt;TYPE is used to refer to data types and user defined data types and it can also be used to refer to the dictionary objects as well.Eg&lt;/P&gt;&lt;P&gt;TYPES VAL1 TYPE I.&lt;/P&gt;&lt;P&gt;DATA VAL2 TYPE VAL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA MATNR TYPE MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE is used to refer to data objects for eg.&lt;/P&gt;&lt;P&gt;DATA VAL1 TYPE I.&lt;/P&gt;&lt;P&gt;DATA VAL2 LIKE VAL1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 11:20:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250011#M144683</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-03-09T11:20:51Z</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/1250012#M144684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 09:33:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-and-type/m-p/1250012#M144684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-28T09:33:01Z</dc:date>
    </item>
  </channel>
</rss>

