<?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: differences b/w data &amp;types.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353483#M176787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Syntax Diagram &lt;/P&gt;&lt;P&gt;DATA&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple Field Definitions &lt;/P&gt;&lt;P&gt;- DATA f. &lt;/P&gt;&lt;P&gt;- DATA f(len). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining a Structured Data Object &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF struc, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF struc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining an Internal Table &lt;/P&gt;&lt;P&gt;- DATA itab TYPE itabtype [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE tabkind OF linetype|LIKE tabkind OF lineobj} &lt;/P&gt;&lt;P&gt;          WITH [UNIQUE|NON-UNIQUE] keydef &lt;/P&gt;&lt;P&gt;          [INITIAL SIZE n] [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE TABLE OF linetype|LIKE TABLE OF lineobj}. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE RANGE OF type|DATA  itab LIKE RANGE OF f}. &lt;/P&gt;&lt;P&gt;- DATA itab [TYPE linetype|LIKE lineobj] OCCURS n &lt;/P&gt;&lt;P&gt;          [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF itab OCCURS n, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF itab [VALID BETWEEN f1 AND f2]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Shared Data Areas &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF COMMON PART c, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF COMMON PART. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Variables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Syntax Diagram &lt;/P&gt;&lt;P&gt;TYPES&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple type definition &lt;/P&gt;&lt;P&gt;- TYPES type. &lt;/P&gt;&lt;P&gt;- TYPES type(len). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of a structured type &lt;/P&gt;&lt;P&gt;- TYPES: BEGIN OF structype &lt;/P&gt;&lt;P&gt;         ... &lt;/P&gt;&lt;P&gt;       END   OF structype. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of an internal table type &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE tabkind OF linetype| &lt;/P&gt;&lt;P&gt;                LIKE tabkind OF lineobj} &lt;/P&gt;&lt;P&gt;      [WITH [UNIQUE|NON-UNIQUE] keydef] [INITIAL SIZE n]. &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE RANGE OF type|TYPES itabtype  LIKE RANGE OF &lt;/P&gt;&lt;P&gt;f}. &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE linetype|LIKE lineobj} OCCURS n. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Defining Data Types &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;Find transaction :&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;SE93&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/EN/d1/8019f9454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/EN/d1/8019f9454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also search SDN with keyword "ABAP help"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this&amp;#146;ll give you idea!!&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;P.S award the points.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Good luck &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saquib Khan&lt;/P&gt;&lt;P&gt;"Some are wise and some are otherwise"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2006 23:22:50 GMT</pubDate>
    <dc:creator>former_member181966</dc:creator>
    <dc:date>2006-05-18T23:22:50Z</dc:date>
    <item>
      <title>differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353482#M176786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi every body&lt;/P&gt;&lt;P&gt;what is the difference between DATA &amp;amp;TYPES,LIKE&amp;amp;TYPE.&lt;/P&gt;&lt;P&gt;What is the transaction code to know all the transaction codes.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 23:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353482#M176786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T23:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353483#M176787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Syntax Diagram &lt;/P&gt;&lt;P&gt;DATA&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple Field Definitions &lt;/P&gt;&lt;P&gt;- DATA f. &lt;/P&gt;&lt;P&gt;- DATA f(len). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining a Structured Data Object &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF struc, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF struc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining an Internal Table &lt;/P&gt;&lt;P&gt;- DATA itab TYPE itabtype [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE tabkind OF linetype|LIKE tabkind OF lineobj} &lt;/P&gt;&lt;P&gt;          WITH [UNIQUE|NON-UNIQUE] keydef &lt;/P&gt;&lt;P&gt;          [INITIAL SIZE n] [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE TABLE OF linetype|LIKE TABLE OF lineobj}. &lt;/P&gt;&lt;P&gt;- DATA itab {TYPE RANGE OF type|DATA  itab LIKE RANGE OF f}. &lt;/P&gt;&lt;P&gt;- DATA itab [TYPE linetype|LIKE lineobj] OCCURS n &lt;/P&gt;&lt;P&gt;          [WITH HEADER LINE]. &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF itab OCCURS n, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF itab [VALID BETWEEN f1 AND f2]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Shared Data Areas &lt;/P&gt;&lt;P&gt;- DATA: BEGIN OF COMMON PART c, &lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END   OF COMMON PART. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Variables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Syntax Diagram &lt;/P&gt;&lt;P&gt;TYPES&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple type definition &lt;/P&gt;&lt;P&gt;- TYPES type. &lt;/P&gt;&lt;P&gt;- TYPES type(len). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of a structured type &lt;/P&gt;&lt;P&gt;- TYPES: BEGIN OF structype &lt;/P&gt;&lt;P&gt;         ... &lt;/P&gt;&lt;P&gt;       END   OF structype. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of an internal table type &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE tabkind OF linetype| &lt;/P&gt;&lt;P&gt;                LIKE tabkind OF lineobj} &lt;/P&gt;&lt;P&gt;      [WITH [UNIQUE|NON-UNIQUE] keydef] [INITIAL SIZE n]. &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE RANGE OF type|TYPES itabtype  LIKE RANGE OF &lt;/P&gt;&lt;P&gt;f}. &lt;/P&gt;&lt;P&gt;- TYPES itabtype {TYPE linetype|LIKE lineobj} OCCURS n. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Defining Data Types &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;Find transaction :&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;SE93&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/EN/d1/8019f9454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/EN/d1/8019f9454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also search SDN with keyword "ABAP help"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this&amp;#146;ll give you idea!!&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;P.S award the points.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Good luck &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saquib Khan&lt;/P&gt;&lt;P&gt;"Some are wise and some are otherwise"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 23:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353483#M176787</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-05-18T23:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353484#M176788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data creates an internal variable for you...Types sets up a template which you can then use to create variables. You usually use it to define structures that you're going to use more than once in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like/Type are very similar.. they both refer to already existing data entities (which can be defined in the data dictinary or in your program). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data w_matnr like mara-matnr.&lt;/P&gt;&lt;P&gt;is identical to:&lt;/P&gt;&lt;P&gt;data w_matnr type matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Browse table TSTC and/or TSTCT to see transaction codes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 23:46:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353484#M176788</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-05-18T23:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353485#M176789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To clarify a bit,  TYPES statement define the structure of your memory space without allocation of memory, DATA statements allocate the memory at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 00:23:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353485#M176789</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-19T00:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353486#M176790</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 &amp;amp; TYPE&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 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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 05:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353486#M176790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T05:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353487#M176791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. what is the difference between DATA &amp;amp;TYPES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  As the name suggests,&lt;/P&gt;&lt;P&gt;  DATA = it DECLARES a memory variable&lt;/P&gt;&lt;P&gt;         and occupies some space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPE = it just DEFINES the type of the variable,&lt;/P&gt;&lt;P&gt;         but does not occupy and space in memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         After that we can use DATA&lt;/P&gt;&lt;P&gt;         and make a variable of the above 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. LIKE and TYPE.&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 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;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 05:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353487#M176791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T05:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: differences b/w data &amp;types....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353488#M176792</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_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="42144"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/tips/tips_itab.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/tips/tips_itab.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 05:22:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differences-b-w-data-types/m-p/1353488#M176792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T05:22:29Z</dc:date>
    </item>
  </channel>
</rss>

