Why do we need a Self Reference "me" to use the components of a class

Hi
I am not clear why do we need a self reference variable "me" to call the components of its own class? when it can be accessed directly as in the following examples?
In my first example below i can call the method display_name directly without creating a reference object or instance of the class within the class.
In the second example i am using the self refernce Write me->name to access the component of a class.
My question is why do we need "me" when i can use the components directly as shown in my first example.
CLASS egocentric DEFINITION.
  PUBLIC SECTION.
    DATA:
     name(10) TYPE c READ-ONLY.
    METHODS set_name.
    METHODS display_name.
ENDCLASS.                    "egocentric DEFINITION
*       CLASS egocentric IMPLEMENTATION
CLASS egocentric IMPLEMENTATION.
  METHOD set_name.
    MOVE 'Abap Objects' TO name.
    CALL method display_name.
  ENDMETHOD.                    "write_name
  METHOD display_name.
    write: name.
  ENDMETHOD.                    "display_name
ENDCLASS.                    "egocentric IMPLEMENTATION
*Global Data
DATA oref TYPE REF TO egocentric.
START-OF-SELECTION.
  CREATE OBJECT oref.
  CALL METHOD oref->set_name.
CLASS egocentric DEFINITION.
        PUBLIC SECTION.
            DATA:
             name(10) TYPE c VALUE u2018Instructoru2019
READ-ONLY.
             METHODS write_name.
ENDCLASS.
CLASS egocentric IMPLEMENTATION.
        METHOD write_name.
            WRITE me->name.
        ENDMETHOD.
ENDCLASS.
*Global Data
DATA oref TYPE REF TO egocentric.
START-OF-SELECTION.
        CREATE OBJECT oref.
        CALL METHOD oref->write_name.

You can go WIKI and search with ABAP Objects.
Or do the same in 'advanced search'  and select a search area. You are bound to find something.
Or this link perhaps:
[abap objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/content.htm]

Similar Messages

  • Why do we need downcasting in Java? What is the use of it?

    Why do we need downcasting in Java? What is the use of it?

    here's an example of a valid downcast.
    class Dog {}
    class Dogma extends Dog {}
    class Dogmatic extends Dog {}
    Dog dogwood = new Dogma(); // a Dogma object is upcast to a Dog
    Dogma bush = (Dogma) dogwood; // a Dogma object is downcast from a Dog
    You cannot upcast a Dogmatic to a Dog and then downcast it to a Dogma. You also cannot downcast a Dog to a Dogma. In the working example, above, the dogwood references a Dogma, so you can downcast the Dogma.
    and one more example
    If you have a class hierarchy where class B extends class A (B is a specialization of A) you can use B in the place of A since B supports all the operations that B does. This is called polymorphism.
    When you use an object of type B in place of A you actually do a up-cast, meaning you make the object of type B look like an object of type A (a less specific class type).
    What you are asking about is down-casting which is making an object be of a more specific type, i.e. transforming an object of type A to type B. Is is only allowed if the object was actually created as a type B.
    This is allowed (line 2 is a down-cast):
    A a = new B();
    B b = (B)a;

  • Why do we need to have a observer run on the different computer

    Hello team,
    Why do we need to have a observer run on the different computer and how to install & confgure it on that different computer.?pls help
    5.5.6 Managing the Observer
    The observer is integrated in the DGMGRL client-side component and runs on a different computer from the primary or standby databases and from the computer where you manage the broker configuration. The observer continuously monitors the fast-start failover environment to ensure the primary database is available (described in Section 5.5.2.1). The observer's main purpose is to enhance high availability and lights out computing by reducing the human intervention required by the manual failover process that can add minutes or hours to downtime.
    Thanks

    854393 wrote:
    Thanks Aman,
    Do we need a same db binary & OS version for starting the observer on the different computer ?? here the primary & standby are liunx.
    Thanks in advance..
    Regards,it does not have to be on the same platform or operating system on which the databases reside, and it does not need Oracle EE and an instance (which means no extra license).
    To configure check this.
    http://gjilevski.wordpress.com/2010/03/06/configuring-10g-data-guard-broker-and-observer-for-failover-and-switchover/

  • Error while saving a workflow via sharepoint designer: Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.

    While saving a workflow using SharePoint designer on a SharePoint site, I get the following error: 
    Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.
    Steps to recreate error:
    Login to the WFE server hosting IIS and workflow manager, open SharePoint Designer 2013 and login to a SharePoint site.
    Access the list using SharePoint Designer 2013, in the workflow section, click new workflow. 
    In the new workflow dialog, enter workflow details, click save (see screenshot below).
    Error message is displayed as below:
    After restarting SharePoint Designer, the saved workflow is not seen in the site/workflows or list/workflow section.
    Workaround
    When the above steps are repeated while accessing the site via SPD from any other box besides the WFE/Workflow manager host server, the error is not encountered and its possible to save/publish workflows.
    Notes
    Workflow Manager 1.0 is installed.
    The site has been registered with Workflow manager using Register-SPWorkflowService
    cmdlet.
    Any clue on why is this happening?

    Hi Vivek,
    Please close your SharePoint Designer application, clear/delete the cached files and folders under the following directories from your server installed SharePoint Designer, then check results again.
    <user profile>\appdata\roaming\microsoft\SharePoint Designer\ProxyAssemblyCache
    <user profile>\appdata\local\microsoft\websitecache\<sitename>
    http://www.andreasthumfart.com/2013/08/sharepoint-designer-2013-server-side-activities-have-been-updated/
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Server Side activties have been updated. You need to restart SharePoint Designer to use the updated version of activities.

    Hello,
    I have the following scenario for the installation of EPM 2013 environment:
    1 Server running Windows 2008 R2 SQL Server 2008 R2 Service Pack 2
    1 Windows Server 2008 R2 Standard SP1, running Sharepoint 2013 Enterprise (Standard Initially installed and then migrated to the Enterprise in order to install Project Server 2013), Project Server 2013 and Workflow 1.0 (2013).
    After configuring and validating the configuration of Workflow 1.0 by http://server_name.example.com:12291 page and also check the Application Services in Central Administration and receive the Workflow Status = Connected.
    Alright, but when I run the SPD 2013 RTM to test the creation of Sharepoint Workflow 2013, I get the following warning:
    "Server Side activties have been updated. You need to restart SharePoint Designer to use the updated version of activities."
    I've tried:
    a. Restart SPD2013;
    b. Restart Server 2013 and Sharepoint Workflow 1.0;
    c. Reinstall and reconfigure Workflow 1.0
    And the message is always displayed, preventing the use of Workflow Sharepoint 2013.
    Can anyone help me, I'm in the middle of a deployment to a customer.
    Print of alert

    How did you uninstalledLanguage Pack from SharePoint 2013 ? when I googled it I found that language pack cannot be uninstall@
    http://technet.microsoft.com/en-us/library/cc262108.aspx
    "If you no longer have to support a language for which you have installed a language pack, you can remove the language pack by using the Control Panel. Removing a language pack removes the language-specific site
    templates from the computer. All sites that were created that have those language-specific site templates will no longer work (the URL will produce a HTTP 500 - Internal server error page). Reinstalling the language pack will make the site functional again.
    You cannot remove the language pack for the version of SharePoint 2013 that you have installed on the server. For example, if you are running the Japanese version of SharePoint 2013, you cannot uninstall the Japanese language support for SharePoint 2013."

  • HT2188 i just upgraded my iphone 3gs to ios 6 not sure if it updated but now when i turn on my phone it says automatically that i need to connect it to itunes using the USB port but when i connect it it comes up as new hardware and cannot find a program/s

    i just upgraded my iphone 3gs to ios 6 not sure if it updated but now when i turn on my phone it says automatically that i need to connect it to itunes using the USB port but when i connect it it comes up as new hardware and cannot find a program/software for my device even though i have the latest itunes on my computer. i have tried reinstalling itunes but it still cannot find my phone and now i cannot use my phone as it is stuck on the sync to itunes screen

    Have you downloaded and installed the latest version of iTunes from here:
    http://www.apple.com/itunes/download/

  • I need to tell Print services to use the 2nd ethernet port

    I need to tell Print services to use the 2nd ethernet port
    Thanks in advance to anyone who can shed some light. My research has led me to a dead-end so far. Running 10.3.9 on my server. XServe Dual 2.3
    I want to have File services and the various other duties pushed through one ethernet port, and print services on the other. I know there is probably a config file to make one simple edit, but I can not find it, or perhaps a "defaults" type command.
    Also, where is this "command-line administration guide" that I keep running across on Apple's support?
    Thanks in advance.
    Matt

    Similar issue here too. Is it the subnet? Basically, I'm having a problem printing to an AirportExpress-served printer. Our network looks like this:
    (From Outside...>>>...to Inside)
    (Public IP) DSL Modem
    ...(10.0.0.x) Airport Express -- HP DesignJet 100 USB -- Airtunes/stereo
    ...(10.0.0.x) NetGear Wireless Router
    ...(10.0.0.x nic 0) Mac OS X Server (192.168.0.x nic1)
    ......(192.168.0.x) Mac OS X client
    ......(192.168.0.x) Mac OS X client
    ......(192.168.0.x) Mac OS X client
    The printer driver does not appear to be able to do IP printing, it assumes a direct USB connection. We can setup the OS X Server with the printer served by the Airport Express, as it is found via Bonjour, and then we share its queue via Server Admin. The problem is that the LAN clients cannot print to this server queue. The printer gets stopped at the server.
    If we turn OFF the OS X Server's firewall, printing works from both the clients and obviously from the Server. I think my question is this: what ports or services need to be turned on in order for the clients to print? There is no clear checkbox for "Bonjour Printer Sharing", and I'm curious what ports this would open, and if it would be safe. I thought it would work because we're pushing the print job up through the firewall, but apparently some response needs to come back through the firewall, and that's what's not happening.
    And to tack onto this, how could we also push iTunes to the Airport Express from the Clients? Assuming the music goes over different ports than the print jobs. ?
    Thanks in advance for any help.

  • I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed. Why?   I've seen demonstrations on how to use the feature but mine doesn't wo

    I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed.
    Why?   I've seen demonstrations on how to use the feature but mine doesn't work.  I checked the updates and I have the current version.
    Thanks.      LM

    I am running CC 2014.2.1 and I've updated to Yosemite. Not seeing tree or frame as an option in the menu. Coworker still on Mavericks has it.

  • Why do I need to log into google to use feedly? And, when I do, it wants me to give access to my to my account.

    Is this safe, why should I have to sign in with my google account? And why do I need to give access to my account?

    What does that mean. I'm just asking how to use one of the products that I was encouraged to use by a Mozilla email. I was worried about the issue of safety and privacy of having to sign in with another companies account (Google) and give access to that account.

  • Why do i need outlook 2007 to get ical on the control panel?

    what is the difference between accessing ical from safari and via control panel? Why do i need to purchase outlook 2007? Is there an advantage?

    This may work for the backup that iTunes makes.
    How to Recover iPod Backup Password to Restore iPod from Bakcups
    Note that synced media like apps and music are NOT included in the iPod backup that iTunes makes.
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Need to upload mass excel sheet using the bapi bapi_acc_document_post.

    I am assigned with an object, where I need to post the records from a mass excel sheet in to ECC or/and BW basing the dimensions using the bapi bapi_acc_document_post.the excel sheet has header and Item data. I am pretty much new to this bapi's
    please do the need ful

    Check report "ACC_BAPI_TEST_INVOICE_RECEIPT",
    this report calls BAPI "BAPI_ACC_INVOICE_RECEIPT_POST",
    but the parameters are nearly the same.
    Best Regards, Dirk

  • Do I need iPhoto 08 to see and use the mobileme features?

    I currently have the iPhoto (ver 6) that came with my Mac Pro. I have a lot of expensive photo editing software on my mac that I do graphic design with so spending $80 on the iLife upgrade seems like a waste of $$ to me. I would however like to use the Mobile Me icon that appears in the Mobile Me demos to move photos to and from my iPhone 3G as well as the Mobile Me website. Do I have to upgrade to iLife 08 to get this or can I make this work with iPhoto 6?
    Thanks for your help!
    Will H.

    I would however like to use the Mobile Me icon that appears in the Mobile Me demos to move photos to and from my iPhone 3G as well as the Mobile Me website.
    iPhoto does not need to be part of this at all, but if you want it to be then you'll need iPhoto 08.
    http://www.apple.com/mobileme/features/mac.html
    http://www.apple.com/mobileme/features/iphone.html
    Regards
    TD

  • Why do I get a memory leak when I use the Write Data Storage VI in a loop

    I have a large application that I am collecting various data points from. For the most part they are simple scalar values that need to be logged on a regular basis.  I was attempting to use the new TDM files and the storage VI's  I though everything was working until I looked at the taskmanager and noticed that when the logging loop ran my CPU eventually went to 100% and the process memory grew from about 80,000K to 100,000K and eventually locks up the system. 
    I am using a state machine arch. 
    State 1 - open file (open create) mode) 
    State 2 - Write Channel Group Properties
    State 3 - Loop writes 24 distinct data points to a TDM files in append mode
    State 3 - Repeats [creating new rows of the same 24 data point (wait time about 1 sec)]
    State 4 - Close file on exit.
    Any help on this problem would be appreciated.

    The way I see it, it should be this way.
    Message Edited by Pana-man on 09-30-2005 08:15 PM
    Message Edited by Pana-man on 09-30-2005 08:18 PM
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?
    Attachments:
    nextWeek.jpg ‏43 KB

  • HT201269 I upgraded to the 5c from an old 3G type, I need to change over, do I use the computer, bluetooth or is there a procedure to follow?

    I upgraded my old 3G Iphone to the new 5C and need to transfer the data and number.  Is there a procedure to do this or do I just use the USB from the phone to my computer and use the ITUNEs.  

    Yes, use current iTunes on computer, Restore from back up of your iPhone 3g.

  • Why Shows my iPad Old Sites when i am using the back Button in safari

    When i am using Safari on my iPad for Reading a Onlinemagazin or Newspaper and i go into an Artikel and then use the Backbutton to go back to the Mainpage, it Shows me an Old Mainpage from Day ago!
    You have to  use the Refreshbutton to get the valid Mainpage again.
    Why?
    I also dont want that New MultiTabs, i want to Shut it off!

    When i am using Safari on my iPad for Reading a Onlinemagazin or Newspaper and i go into an Artikel and then use the Backbutton to go back to the Mainpage, it Shows me an Old Mainpage from Day ago!
    You have to  use the Refreshbutton to get the valid Mainpage again.
    Why?
    I also dont want that New MultiTabs, i want to Shut it off!

Maybe you are looking for

  • Can I dock my windows Laptop with IMAC?

    Hi, This would have been a no possibly even 3 years ago, but with the development of common software protocols allowing a flourishing application market, is it now possible for me to dock my Windows PC with a new IMAC. To the extent that the MAC is a

  • How do I have a disclamer at the bottom of all my emails

    How do I have a disclamer at the bottom of all my emails, somthing like "Please note: Under Florida law (Fla.Stat. 668.6076 - effec. 07-01-06), e-mail addresses are public records. If you do not want your e-mail address released in response to a publ

  • Hi I have a new connectivity problem

    Mt magic mouse has intermittently dropped for some time. New batteries usually help when it is getting really annoying. Recently I also had a problem with internet connectivity, there were constant 'looking for networks' messages (not a new router or

  • Bug fix release for macbook pro?

    Does anyone have an estimate when the crashing issues for the macbook pro retina will be fixed? I'm running 10.7.4, and my new macbook is crashing just about everyday. This is getting frustrating.  Over 3 years on the previous model macbook pro, I ca

  • FORALL ... SAVE EXCEPTIONS

    Hi folks, I want to transfer BULK data from exception_test1 to exception_test2 with FORALL ... SAVE EXCEPTIONS procedure execute successfull but no data transfer & no exception raise.. create or replace PROCEDURE forall_exception AS TYPE t_tab IS TAB