<?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 difference between LIKE and TYPE........... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049457#M422331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am bw certified, learning abap at my own,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone thr. sams abap in 21 days. still i am having some confusions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Can anybody please tell exact difference of using LIKE and TYPE in case of tables&amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting confused, exactly what to use and when to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any relation to work area, of above point ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How these are concerned to with header and without header.&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) how to pass internal table to routines and function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you give any example or link to example, showing difference between, pass by value, refrence and value &amp;amp; result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely, points will be assigned to your appropriate help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards....&lt;/P&gt;&lt;P&gt;Vinay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 05:52:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-28T05:52:11Z</dc:date>
    <item>
      <title>difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049457#M422331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am bw certified, learning abap at my own,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone thr. sams abap in 21 days. still i am having some confusions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Can anybody please tell exact difference of using LIKE and TYPE in case of tables&amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting confused, exactly what to use and when to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any relation to work area, of above point ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How these are concerned to with header and without header.&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) how to pass internal table to routines and function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you give any example or link to example, showing difference between, pass by value, refrence and value &amp;amp; result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely, points will be assigned to your appropriate help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards....&lt;/P&gt;&lt;P&gt;Vinay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:52:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049457#M422331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049458#M422332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&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/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP distinguishes between types and objects. Types are descriptions that do not occupy memory. Objects are instances of types, and do occupy their own memory space. A type describes the technical attributes of all of the objects with that type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE &amp;lt;type&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.&lt;/P&gt;&lt;P&gt;&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;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;DATA &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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049458#M422332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049459#M422333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;For TYPE&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For LIKE&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&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/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;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;2)Passing the table using the TABLES parameters in a function module is one solution. However, using the IMPORT or CHANGING parameters is a better solution. Just create in the Dictionary a table type like your internal table to be able to TYPE your parameters.&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;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:59:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049459#M422333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049460#M422334</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;Try these 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/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;&lt;/P&gt;&lt;P&gt;For TYPE&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For LIKE&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&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/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;If u need about more difference means .. Search in the forums .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;bala..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049460#M422334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049461#M422335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1')&lt;/P&gt;&lt;P&gt;Like is used when: &lt;/P&gt;&lt;P&gt; Build internal table and work area from existing internal table&lt;/P&gt;&lt;P&gt;Type:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build internal table and work area from existing DDIC structures &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk the link below for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 06:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049461#M422335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T06:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049462#M422336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you have declared some field as a data in your program and then you are declaring another field depending on this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;types: pernrs type char8.&lt;/P&gt;&lt;P&gt;data: pernr1 type pernrs.&lt;/P&gt;&lt;P&gt;data: pernr2 like pernr1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you are declaring pernrs on a data type pernrs.&lt;/P&gt;&lt;P&gt;pernr1 is declared on a type pernrs.&lt;/P&gt;&lt;P&gt;and pernr2 is declared on pernr1. hence we use like.&lt;/P&gt;&lt;P&gt;you cannot use pernrs directly as a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;P&gt;rewards are helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 06:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049462#M422336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T06:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049463#M422337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vinay,&lt;/P&gt;&lt;P&gt;  the difference between in type and like is : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when defining or declaring the object is that type is used to refer existing data type.&lt;/P&gt;&lt;P&gt;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;type is mostly used for defining a new object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ur second question, u can find a chapter in the 21 days book itself under the chapter modularization techniques. Kindly go thro that one. u can get a clear picture from that.&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;Arun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 06:03:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049463#M422337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T06:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049464#M422338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay , &lt;/P&gt;&lt;P&gt;  Regarding part 1 of your question , i still have not yet found a satisfactory answer for it till now , so now what i do is to use TYPE where ever possible becasue that is recommended , one issue i find with like is that we do not refer to the data type directly but we refer to a feild in the data base table.&lt;/P&gt;&lt;P&gt;e.g. Data : v_matnr like matnr . " does not work.&lt;/P&gt;&lt;P&gt;we need to write Data : v_matnr like mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding relation to work area , i dont think it has any effect on the work area.&lt;/P&gt;&lt;P&gt;same goes with header and without header lines , the reason why internal table wihtout header lines is recommended is that it is better in performance and this is also not allowed in ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding Q 2.&lt;/P&gt;&lt;P&gt;Here is a sample code which answers the question &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables : mara.
Types : begin of ty_marc ,
         matnr type matnr ,
         werks type werks_d ,
         flag type c ,
       end of ty_marc.

data : it_1 type table of ty_marc ,
       wa_1 type ty_marc.

select-options : so_matnr for mara-matnr .


start-of-selection.

select matnr werks
  into table it_1
  from marc
  where matnr in so_matnr.

perform set_flag changing it_1.

write 'test'.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  set_flag
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      &amp;lt;--P_IT_1  text
*----------------------------------------------------------------------*
form set_flag changing value(p_it_1) type table . " Pass by value

loop at p_it_1 into wa_1.
wa_1-flag  = 'X'.
modify p_it_1 from wa_1.

endloop.


endform.                    " set_flag&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;debugg the program and see after the first records is modified the content of the table it_1 and p_it_1 in both call by ref and call by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in case you have any further queries please feel free to revert back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 06:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049464#M422338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T06:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: difference between LIKE and TYPE...........</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049465#M422339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is no as such difference in TYPE and LIKE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you use like statement when u define local veriable with DATA statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has no relation to work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) when you pass internal table to routine then at the formal parameter you have to collect it with type statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form abc using itab type itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in case of FM there are two type of parameter TABLES and CHANGING . Now a days SAP recomends to use CHANGING paramentr insted of TABL parament.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose a1 = 10.&lt;/P&gt;&lt;P&gt;i) pass by vale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform sub a1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form sub using b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b1 = 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after completion of FORM the value of a1 will be 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii) pass by ref.&lt;/P&gt;&lt;P&gt;perform sub a1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form sub changing b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b1 = 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the value of a1 will be 20 as soon as b1 gets 20..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iii) pass by value result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform sub a1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form sub using value b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b1 = 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after succesful completion of FORM the value of a1 will be 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kapil Soni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 06:08:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-like-and-type/m-p/2049465#M422339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T06:08:53Z</dc:date>
    </item>
  </channel>
</rss>

