<?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: RE:ABAP objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300675#M790133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internally, each method has an implicit self-reference variable, the reserved word me&lt;/P&gt;&lt;P&gt;A method can access the components of its class simply by their name; however,&lt;/P&gt;&lt;P&gt;It may use me simply for clarity&lt;/P&gt;&lt;P&gt;If a method declares a local variable with the same name as one of the class components, to avoid ambiguity it must use me to address the variable originally belonging to the class.&lt;/P&gt;&lt;P&gt;A method must use me to export a reference to itself (that is, its object)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c1 definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;data : num type i value 5.&lt;/P&gt;&lt;P&gt;methods : c1 method.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c1 implementation.&lt;/P&gt;&lt;P&gt;method: c1method.&lt;/P&gt;&lt;P&gt;data: num type i value 3.&lt;/P&gt;&lt;P&gt;write: /10 me-&amp;gt;num, " access variable of the class&lt;/P&gt;&lt;P&gt;        /10          num.  "access variable of the method&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;start-of-section.&lt;/P&gt;&lt;P&gt;data: num type i.&lt;/P&gt;&lt;P&gt;data: obj1 type ref to c1.&lt;/P&gt;&lt;P&gt;create object: obj1.&lt;/P&gt;&lt;P&gt;call method obj1-&amp;gt;c1method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;P&gt;Hope this is helpful. &lt;STRONG&gt;Rewards Points&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 12:23:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T12:23:07Z</dc:date>
    <item>
      <title>RE:ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300672#M790130</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;What do you mean by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;me-&amp;gt;name = name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in OOPs ABAp.Please explain with a simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Alex.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 11:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300672#M790130</guid>
      <dc:creator>alex_georgek</dc:creator>
      <dc:date>2008-02-06T11:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: RE:ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300673#M790131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ME&lt;/STRONG&gt; is in ABAP corresponds to &lt;STRONG&gt;THIS&lt;/STRONG&gt; in Java.&lt;/P&gt;&lt;P&gt;It is the instance itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as you create an instance of a class you can refer within any instance method (but not static method) to its instance attributes ( e.g. MD_NAME) either using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD constructor.

  me-&amp;gt;md_name = id_name.  " IMPORTING parameter of CONSTRUCTOR method
" Or:
  md_name = id_name. " same effect
  
ENDMETHOD.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 11:59:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300673#M790131</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-02-06T11:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: RE:ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300674#M790132</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;You can address the object itself within object methods using the implicitly available reference variable ME.&lt;/P&gt;&lt;P&gt;Description of the example:&lt;/P&gt;&lt;P&gt;In the CONSTRUCTOR, the instance attribute name is covered by the locally defined variable name. In&lt;/P&gt;&lt;P&gt;order to still be able to address the instance attribute, you need to use ME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS CONSTRUCTOR&lt;/P&gt;&lt;P&gt;IMPORTING im_name TYPE string&lt;/P&gt;&lt;P&gt;im_weight TYPE I.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA name TYPE string.&lt;/P&gt;&lt;P&gt;DATA weight TYPE I.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD CONSTRUCTOR.&lt;/P&gt;&lt;P&gt;DATA name TYPE string VALUE `-airplane`.&lt;/P&gt;&lt;P&gt;CONCATENATE im_name name INTO ME-&amp;gt;name.&lt;/P&gt;&lt;P&gt;weight = im_weight.&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;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this is helpful, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 12:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300674#M790132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T12:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: RE:ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300675#M790133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internally, each method has an implicit self-reference variable, the reserved word me&lt;/P&gt;&lt;P&gt;A method can access the components of its class simply by their name; however,&lt;/P&gt;&lt;P&gt;It may use me simply for clarity&lt;/P&gt;&lt;P&gt;If a method declares a local variable with the same name as one of the class components, to avoid ambiguity it must use me to address the variable originally belonging to the class.&lt;/P&gt;&lt;P&gt;A method must use me to export a reference to itself (that is, its object)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c1 definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;data : num type i value 5.&lt;/P&gt;&lt;P&gt;methods : c1 method.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c1 implementation.&lt;/P&gt;&lt;P&gt;method: c1method.&lt;/P&gt;&lt;P&gt;data: num type i value 3.&lt;/P&gt;&lt;P&gt;write: /10 me-&amp;gt;num, " access variable of the class&lt;/P&gt;&lt;P&gt;        /10          num.  "access variable of the method&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;start-of-section.&lt;/P&gt;&lt;P&gt;data: num type i.&lt;/P&gt;&lt;P&gt;data: obj1 type ref to c1.&lt;/P&gt;&lt;P&gt;create object: obj1.&lt;/P&gt;&lt;P&gt;call method obj1-&amp;gt;c1method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;P&gt;Hope this is helpful. &lt;STRONG&gt;Rewards Points&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 12:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-abap-objects/m-p/3300675#M790133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T12:23:07Z</dc:date>
    </item>
  </channel>
</rss>

