Can we use overload and overwrite concept in OO-abap

hi
can we use overload and overwrite concept in OO-abap

Hi
CLASS zl_lcl_vehicle DEFINITION.
PUBLIC SECTION.
Signature of method
METHODS: set_make
IMPORTING value(im_make) TYPE string " Pass by value
im_model TYPE string," Pass by reference
ENDCLASS. "zl_lcl_vehicle DEFINITION
CLASS zl_lcl_vehicle IMPLEMENTATION.
Implementation of method.
METHOD set_make.
IF im_make IS NOT INITIAL
AND im_model IS NOT INITIAL.
gv_make = im_make.
gv_model = im_model.
ENDIF.
ENDMETHOD. "set_make
ENDCLASS. "zl_lcl_vehicle
Overloading means changing signature as well as implementation of a method.
Overriding is changing only implementation of method with signature unchanged.
From ABAP perspective, only the CONSTRUCTOR method can be overloaded in a subclass i.e both the signature and implementation can be adapted in subclass.
Any other method can't be overloaded. It can only be redefined/overridden i.e implementation changed with signature unchanged.
In ABAP  there is something called a redefinition.
When you inherit a class from a super class, you can redifne a method. You cannot chnage the signature( Interface) of the method. It will remain the same as that of the super class.You must redefine a method in the same visibility section in which it appears in the superclass.
Eg.
CLASS C_SUPER_CLASS DEFINITION .
PUBLIC SECTION.
METHODS: DRIVE ,
STOP.
PROTECTED SECTION.
DATA SPEED TYPE I.
ENDCLASS.
CLASS C_SUPER_CLASS IMPLEMENTATION.
METHOD DRIVE.
SPEED = 0.
WRITE: / 'Bike speed =', SPEED.
ENDMETHOD.
ENDCLASS.
CLASS C_SUB_CLASS DEFINITION INHERITING FROM C_SUPER_CLASS.
PUBLIC SECTION.
METHODS DRIVE REDEFINITION.
ENDCLASS
CLASS C_SUB_CLASS IMPLEMENTATION.
METHOD DRIVE.
SPEED = SPEED + 10.
WRITE: / 'Bicycle speed =', SPEED.
ENDMETHOD.
ENDCLASS.
Regards
Vasu

Similar Messages

  • How can I use OmniPortlet and Web Clipping Portlet?

    How can I use OmniPortlet and Web Clipping Portlet?

    You find information on OmniPortlet and Web Clipping in the Portal Developer's Guide.
    o Building Portlets with OmniPortlet
    o Building Content-Based Portlets with Web Clipping
    Peter

  • How can I use excel and word on the IPAD2

    How can I use excel and word documents on my Ipad 2

    There are apps such as Documents To Go which support reading/editting/creating those sorts of documents :
    standard version  -  http://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    premium version  -  http://itunes.apple.com/us/app/documents-to-go-premium-office/id317107309?mt=8

  • How can I use undo and redo with run time menu?

    Hi..I try to built my own menu for graphic programming. How can I use undo and redo in labview with run time menu?

    filozof-
    During runtime, by default, LabVIEW has undo/redo data changes under the edit menu. This will undo/redo changes made to controls during runtime. If you want a more extensive undo/redo (custom for your application), you are going to have to do quite a few things
    1) Create a custom runtime menu (Edit>>RunTime Menu) and place your own undo/redo controls on it
    2) Keep an action history in your program
    3) Catch the Shortcut menu event for your custom undo/redo controls
    4) Reverse the last action in your histroy when you catch the event
    This method would allow you undo entire operations (like resize, move, or whatever kind of functionality you are building into your application) unstead of just undoing data changes.
    Xaq

  • Hi, I have already bought Adobe Photoshop and Lightroom for 1 year. Now I will change my PC to Mac. Can I use Photoshop and Lightroom in my new Mac?

    Hi, I have already bought Adobe Photoshop and Lightroom for 1 year. Now I will change my PC to Mac. Can I use Photoshop and Lightroom in my new Mac?

    Yes.
    Mylenium

  • I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    No. Return it and get your money back if still within the 30 day return window. All US iPhones are carrier locked and cannot be officially unlocked.

  • While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    While using my Iphone 5, all of a sudden  black and white stripes where on the screen. I have tryed to turn the phone off and on again, but there are only the stripes. I can't use it, and nothing happens when I push the buttons. Can someone help me?

    Try resetting your phone, hold the home and sleep/wake button down until the apple symbol comes up, then release. If that doesnt work, you may have damaged your phone and need to take it to an apple genius bar.

  • Can we use exceptions and conditions at the same time?

    can we use exceptions and conditions at the same time? Are there any dependencies between exceptions an conditions?

    Exceptions are used when there are some mistakes , or exceeds the supposed values, we can highligt that in different colours for enabling the validator to notice easily. In this we are giving conditions for considering the value as exceptions. suppose, if the values is out of the range -1 to +1 then exception.
    But conditions can be considered as the restrictions given in measure level also. So please elaborate what you meant by conditions

  • Can i use safary and watch on the tv

    I bought the apple tv device
    from my ipad can i use safary and watch on the tv

    If you want to mirror you need iPad 2 (or later)
    http://support.apple.com/kb/HT5209?viewlocale=en_US&locale=en_US

  • If i download windows with bootcamp does that mean i can still use Macintosh and if so how

    if i download windows with bootcamp does that mean i can still use Macintosh and if so how

    Welcome to Apple Support Communities
    If you installed Windows properly, you can still start in OS X and use it whenever you want. However, Boot Camp changes the startup partition to Windows, so you may note that you can't use Mac OS X.
    There are two ways of starting in OS X:
    1. Hold the Option (Alt) key while your computer is starting until you see all the bootable partitions in the screen, and choose your OS X partition.
    2. Hold the X key while your computer is starting.
    If you have a iMac or a Bluetooth keyboard, make sure you hold the key after hearing the startup chime.
    If you want to start in OS X by default, after starting in OS X, open System Preferences > Startup Disk, and choose the OS X partition

  • Can't use Hosting and Business Catalyst

    I have full CC-Membership, but can't use Hosting and BC.
    Following messages appearing on my CC-Account:
    On the apps-Page:
    "Full Creative Cloud Membership comes with hosting for up to 5 sites. View and manage these sites from the sidebar on the Creative Cloud home page."
    On the sidebar
    "Full Creative Cloud Membership comes with hosting for up to 5 sites."

    Same. This had me perplexed too for a while. And the 'help' pages aren't particularly 'helpful', so I did little poking around in the apps themselves.
    As it turns out, if you open up Dreamweaver and go to the 'Site' menu, there's an option to create a Business Catalyst test site from there (Dreamweaver helpfully crashed for me while doing this, but upon reopening it was all working). You pick a  site name and subdomain, assign a local folder, it asks for your CC/Adobe credentials (because it would make too much sense to just sign in automatically) and you should be good to go.
    After doing this and uploading a dummy test page, when I reloaded the Creative Cloud homepage it was now listing my test site undeneath the aforementioned confusing text in the sidebar.
    Hope that helps.

  • Can't use 'save' and 'save as' in Id, Ia and Ps.

    I can't use 'save' and 'save as' in Id, Ai and Ps. The window flips away. I've got Adobe CC. The Dutch version.

    Yes, it's executable; it tries to execute either way.
    The Unix LF through Smultron seemed to work. However, I don't see such an option in nano - only Mac and DOS. (I'm not too concerned, I'm pretty sure I"ll use Smultron on a regular basis to edit these files.)

  • Tried to use Iphoto and was told I needed upgrade. Try to install upgrade . Upgrade should take an hour if photo library is large. It's now close to three hours and still upgrading.  Can't use Iphoto and don't want to stop if still upgrading...3hours??

    Tried to use Iphoto and was told I needed upgrade. Try to install upgrade . Upgrade should take an hour if photo library is large. It's now close to three hours and still upgrading.  Can't use Iphoto and don't want to stop if still upgrading...3hours??

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • I can't use siri and vocal recognition on sms

    hi,
    i've upgraded my iphone 6 to 8.3 and i have  problem.
    microphone works well on phone calls and vocal note, but i can't use siri and vocal recognition on sms text.
    i must SCREAM at 1cm from microphone and siri understand 20% of what i say, if i speak at normal volume and from a standard distance (20/30cm) siri (and sms) doesn't undrstand anything.
    any idea?
    thanks in advance
    Davide

    Siri FAQ  >  http://www.apple.com/iphone/features/siri-faq.html
    Settings > General > Siri > Siri On.
    To use Siri: Hold the home button for 3-5 seconds and speak to it.
    About Siri  >  http://support.apple.com/kb/HT4992

  • I bought my daughter an ipad mini and used my Apple ID to transfer over her favorites. Now I can't use netflix and hulu. So I want create her an id but it won't let saying too young. I tried to create another one with my age and it still says too young.

    I bought my daughter an ipad mini and used my Apple ID to transfer over her favorites. Now I can't use netflix and hulu. So I want create her an id but it won't let saying too young. I tried to create another one with my age and it still says too young.help!!!

    iTUNES STORE - TERMS AND CONDITIONS
    "This iTunes Service is only available for individuals aged 13 years or older, unless you are under 13 years old and your Apple ID was provided to you as a result of a request by an approved educational institution. If you are 13 or older but under the age of 18, you should review this Agreement with your parent or guardian to make sure that you and your parent or guardian understand it."
    Restart the iPad. Tap Settings > iTunes & App Store then sign in your Apple ID.

Maybe you are looking for

  • AR Statement /Dunning Letter Report Issue

    Hi Guys, I have an issue in the Customer statement report in XMLP. There are two Concurrent Program for this Print Statement (i.e; Print Statement and Statement Generate Program) Here Print Statement runs with respect to the ARXSGPO.rdf file and Stat

  • 64 Bits and Motif

    I compile a Motif application in 64 bit as follows:      CC -xtarget=generic64 -g -c fonttest.C      CC -xtarget=generic64 -g -o fonttest fonttest.o -lstdc++ -lm -lXm -lXt -lX11 it compiles just fine. But when I run it I get the following errors at r

  • How to import DVD-R movie into Keynote?

    I just transferred a video (with audio) from a VHS tape to a DVD-R, using a stand-alone DVD Recorder. Now I need to import this into Keynote. I've tried opening/playing the DVD with iMovie iDVD, and Quicktime but they will not recognize it as a reada

  • Need to display Line item text in PO form...

    Hi, I could see some posts already in this regard but could not follow it and hence posting my query. In the defaut MEDRUCK PO form I could see that the line item text is displayed with the following statement. &TTXIT-TDTEXT& INCLUDE &T166P-TXNAM& OB

  • TS1702 Problem with the Music app on iPhone 4S

    In the music app on my iPhone 4S, I select the "Genres" tab at the bottom menu and when I click on "Rock" it takes me to my "Folk" albums.  In my iTunes on my MBP, they are correctly labeled and when the iPhone is connected to the computer, all seems