<?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: what is reference ME ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175804#M755775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in some cases you need to have a &lt;STRONG&gt;self-reference&lt;/STRONG&gt; available. In ABAP Objects,&lt;/P&gt;&lt;P&gt;self-references are always predefined, but they are only useful in certain contexts&lt;/P&gt;&lt;P&gt;and only there are they syntactically available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_sdn DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  METHODS set_type &lt;/P&gt;&lt;P&gt;        IMPORTING im_make TYPE string &lt;/P&gt;&lt;P&gt;        ... .&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;    DATA: make TYPE string,&lt;/P&gt;&lt;P&gt;    ...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_sdn IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD set_type.&lt;/P&gt;&lt;P&gt;    DATA make TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        me-&amp;gt;make = im_make.&lt;/P&gt;&lt;P&gt;        TRANSLATE me-&amp;gt;make TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        make  = me-&amp;gt;make.&lt;/P&gt;&lt;P&gt;        CONCATENATE '_' make INTO make.&lt;/P&gt;&lt;P&gt;        ...&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can address an object itself by using the predefined reference variable &lt;STRONG&gt;ME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;within its instance methods. Generally, you do not need to use the prefix&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;me-&amp;gt;&lt;/STRONG&gt; in such cases, but you may use it to improve readability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD set_make.&lt;/P&gt;&lt;P&gt;  IF im_make IS INITIAL.&lt;/P&gt;&lt;P&gt;     init_make( ).   " me-&amp;gt;init_make( ).   also possible&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;     make = im_make.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it is required when you want to show a distinction between local data&lt;/P&gt;&lt;P&gt;objects and instance attributes with the same name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following case shows another important use: When a foreign method is&lt;/P&gt;&lt;P&gt;called, a client object is to export a reference to itself. ME can then be used as an&lt;/P&gt;&lt;P&gt;actual parameter with EXPORTING or CHANGING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 08:54:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-21T08:54:54Z</dc:date>
    <item>
      <title>what is reference ME ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175802#M755773</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;&lt;/P&gt;&lt;P&gt;what is reference-&amp;gt; ME?&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;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 08:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175802#M755773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: what is reference ME ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175803#M755774</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;Each class implicitly contains the reference variable me. In objects, the reference variable mealways contains a reference to the respective object itself and is therefore also referred to as the self-reference. Within a class, you can use the self-reference me to access the individual class components:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        To access an attribute attr of your class: me-&amp;gt;attr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        To call a method meth of your class: CALL METHOD me-&amp;gt;meth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you work with attributes of your own class in methods, you do not need to specify a reference variable. The self-reference me is implicitly set by the system. Self-references allow an object to give other objects a reference to it. You can also access attributes in methods from within an object even if they are obscured by local attributes of the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 08:44:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175803#M755774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T08:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: what is reference ME ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175804#M755775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in some cases you need to have a &lt;STRONG&gt;self-reference&lt;/STRONG&gt; available. In ABAP Objects,&lt;/P&gt;&lt;P&gt;self-references are always predefined, but they are only useful in certain contexts&lt;/P&gt;&lt;P&gt;and only there are they syntactically available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_sdn DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  METHODS set_type &lt;/P&gt;&lt;P&gt;        IMPORTING im_make TYPE string &lt;/P&gt;&lt;P&gt;        ... .&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;    DATA: make TYPE string,&lt;/P&gt;&lt;P&gt;    ...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_sdn IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD set_type.&lt;/P&gt;&lt;P&gt;    DATA make TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        me-&amp;gt;make = im_make.&lt;/P&gt;&lt;P&gt;        TRANSLATE me-&amp;gt;make TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        make  = me-&amp;gt;make.&lt;/P&gt;&lt;P&gt;        CONCATENATE '_' make INTO make.&lt;/P&gt;&lt;P&gt;        ...&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can address an object itself by using the predefined reference variable &lt;STRONG&gt;ME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;within its instance methods. Generally, you do not need to use the prefix&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;me-&amp;gt;&lt;/STRONG&gt; in such cases, but you may use it to improve readability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD set_make.&lt;/P&gt;&lt;P&gt;  IF im_make IS INITIAL.&lt;/P&gt;&lt;P&gt;     init_make( ).   " me-&amp;gt;init_make( ).   also possible&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;     make = im_make.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it is required when you want to show a distinction between local data&lt;/P&gt;&lt;P&gt;objects and instance attributes with the same name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following case shows another important use: When a foreign method is&lt;/P&gt;&lt;P&gt;called, a client object is to export a reference to itself. ME can then be used as an&lt;/P&gt;&lt;P&gt;actual parameter with EXPORTING or CHANGING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 08:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175804#M755775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T08:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: what is reference ME ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175805#M755776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 05:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-reference-me/m-p/3175805#M755776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-14T05:46:27Z</dc:date>
    </item>
  </channel>
</rss>

