‎2010 Jun 22 1:50 PM
hi please tell me about this 'ME'.
When this need to be used and why it is needed .
I read following sentence from the documentation..
'Each instance method contains a predefined reference varaiable of the type of the current class.This variable is called ME'.
‎2010 Jun 22 1:59 PM
when you are using the methods and/or attributes of an instance of your class, you can reference them bei using me->your_method or me->your_attribute. this way you and others can see in your coding, that you are using an attribute and not just a local variable or the method of another class.
greetings,
dsp
‎2010 Jun 29 8:28 AM
Hi
Me keyword is used to access its own method of the class.
it is the self reference to a method of the same class
Regards
Hari
‎2010 Jul 05 2:32 PM
Hi there,
you might want to look at some [examples|http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPObjects-CreatingyourFirstLocalClass-Usingself-referenceInINHERITING] on SDN wiki. They are contrived, and overuse of name overloading is bad practice in my view, but they should give you an idea of what me (and super) are all about.
-- Sebastian
‎2010 Jul 05 4:44 PM
Concept of "Me" -> http://en.wikipedia.org/wiki/This_(computer_science)
‎2010 Jul 08 4:14 PM
The self reference me-> is used to clearly distinguish class attribute and a local variable. Here is an example:
CLASS lcl_appl DEFINITION.
PUBLIC SECTION.
METHODS: init.
PRIVATE SECTION.
DATA: a TYPE c LENGTH 2 VALUE '10'.
ENDCLASS.
CLASS lcl_appl IMPLEMENTATION.
METHOD init.
DATA: a TYPE c LENGTH 2 VALUE '20'.
WRITE me->a.
WRITE a.
ENDMETHOD.
ENDCLASS.
DATA: oref_appl TYPE REF TO lcl_appl.
START-OF-SELECTION.
CREATE OBJECT oref_appl.
oref_appl->init( ).Guess the output?
‎2010 Jul 22 9:31 AM
Me is equal to THIS operator in Java as You can refer to any member of the current object from within an instance method or a constructor using yor ME operator.
Thnaks