<?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 regarding data declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441630#M546552</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;what is the differnce between like and type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: data:ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;             ebeln type ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wt is the diff between these two statements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Jun 2007 05:40:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-24T05:40:14Z</dc:date>
    <item>
      <title>regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441630#M546552</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;what is the differnce between like and type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: data:ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;             ebeln type ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wt is the diff between these two statements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 05:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441630#M546552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T05:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441631#M546553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. difference inusing LIKE and TYPE&lt;/P&gt;&lt;P&gt;For all practical purpose, they are same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we declare a variable, with refernce to some object in memory,&lt;/P&gt;&lt;P&gt;we use LIKE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for pre-defined types, we use type eg. C, N, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Using which one is better&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no difference, better wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use like when there is an existing data type and you want to refer to the existing one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXAMPLE : TYPES char1 type C&lt;/P&gt;&lt;P&gt;(Has to be a field from the ABAP dictionary)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXAMPLE : TYPES char2 LIKE char1&lt;/P&gt;&lt;P&gt;(NOTE : Here we can have ABAP dictionary types OR reference to a field created in the program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here char2 is created like char1&lt;/P&gt;&lt;P&gt;However you CANNOT create cha2 type char1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below threads :&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="409304"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Which will improve the performance&lt;/P&gt;&lt;P&gt;Both are same. Both finally create a variable only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 05:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441631#M546553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T05:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441632#M546554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax and meaning of the additions TYPE and LIKE are completely equal for both statements with the exception that &lt;/P&gt;&lt;P&gt;TYPES creates an independent reference type, &lt;/P&gt;&lt;P&gt;whereas DATA creates a bound reference type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perforamnce wise using TYPE is better than LIKE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 06:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441632#M546554</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T06:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441633#M546555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the differnce between like and type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we use TYPE when we are refering to data types for example&lt;/P&gt;&lt;P&gt;Numeric types  I F P&lt;/P&gt;&lt;P&gt;Character types C D N T&lt;/P&gt;&lt;P&gt;Hexadecimal type x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we use LIKE when we are refering to dat objects &lt;/P&gt;&lt;P&gt;A data object is the application-specific instance of an archiving object, that is, an archiving object filled with concrete application data. &lt;/P&gt;&lt;P&gt;A data object incorporates all application data that is necessary to archive a business object (master data or transaction data) completely and consistently. Examples of master data objects include material masters and bills of material. Examples of transaction data objects are Financial Accounting documents, billing documents, and deliveries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A typical data object is composed of a:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header containing general information for identifying the data object, and a &lt;/P&gt;&lt;P&gt;Individual items that contain the actual application data &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;Srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;&lt;STRONG&gt;award points if helpful&lt;/STRONG&gt;&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 06:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441633#M546555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T06:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441634#M546556</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 ur refering existing data dictionary object then u should use like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to use ur own data declration then u should use type statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 06:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441634#M546556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T06:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: regarding data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441635#M546557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rambabu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP recommends that while you declare a variable in your program with reference to an existing data dictionary object, you use the keyword 'LIKE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you want to create a variable in your program referencing pre-defined data types like C, D, N etc, use the keyword 'TYPE'. Apart from this,if you create user-defined types in your program , say for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty_data,&lt;/P&gt;&lt;P&gt;            no(1),&lt;/P&gt;&lt;P&gt;            name(10),&lt;/P&gt;&lt;P&gt;           end of ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use the keyword TYPE in your program to generate structures referencing the user-defined type TY_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was clear enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S : Please reward points if answers are found useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2007 07:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-data-declaration/m-p/2441635#M546557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-24T07:41:07Z</dc:date>
    </item>
  </channel>
</rss>

