Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Use of 'ME' keyword in ABAP Objects?

Hi all,

Can any one please use of 'ME' keyword in ABAP Objects?



Moderator message: next time, please search for available information before asking.

Edited by: Thomas Zloch on Sep 16, 2010 5:33 PM

Former Member
Former Member replied


Please find the description about the ME keyword as per the SAP documentation and

Within the implementation of every instance method, an implicitly created local reference variable called me is available, which points to the instance in which the method is currently being executed. The static type of me is the class in which the instance method is implemented.

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:

-To access an attribute attr of your class: me->attr

-To call a method meth of your class: CALL METHOD me->meth

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.



1 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question