2008 May 22 12:09 PM
Dear Experts ,
plz explain me this events and interfaces with some suitable example , im unable to understand this . I m new in oo abap .plz help me.
if you have anyb documents regarding oo abap , plz send me .
Thanks .
Dear Experts ,
plz explain me this events and interfaces with some suitable example , im unable to understand this . I m new in oo abap .plz help me.
if you have anyb documents regarding oo abap , plz send me .
Thanks .
2008 May 22 12:12 PM
Hi,
abap oops
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
Tutorials with Screen shots
http://www.saptechnical.com/Tutorials/OOPS/MainPage.htm
Downlaod the PDF from here.
http://www.esnips.com/doc/6d16a298-9227-4d32-acf1-e91164c89daf/3-ABAP-Objects(P283)
Regards,
Shiva Kumar
2008 May 27 7:44 AM
hi,
hope it helps..
Interfaces are used to define the model of a class.
They also like classes can be either local or global.
Global interfaces are defined through SE24 and local interfaces are defined in program.
Local interface definition
INTERFACE i_bike.
METHODS drive.
ENDINTERFACE.
Interfaces can be used in classes
CLASS c_bicycle DEFINITION.
PUBLIC SECTION.
INTERFACES i_bike.
PRIVATE SECTION.
DATA: speed TYPE i.
ENDCLASS.
CLASS c_bicycle IMPLEMENTATION.
METHOD i_bike~drive.
speed = speed + 10.
ENDMETHOD.
ENDCLASS.
Reward if hepful.
Regards,
Srishti
2008 May 27 10:59 AM
Interface
In its most common form, an interface is a group of related methods with empty bodies. A bicycle's behavior, if specified as an interface, might appear as follows:
interface Bicycle {
void changeCadence(int newValue);
void changeGear(int newValue);
void speedUp(int increment);
void applyBrakes(int decrement);
}
To implement this interface, the name of your class would change (to ACMEBicycle, for example), and you'd use the implements keyword in the class declaration:
class ACMEBicycle implements Bicycle {
// remainder of this class implemented as before
}
Implementing an interface allows a class to become more formal about the behavior it promises to provide. Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler. If your class claims to implement an interface, all methods defined by that interface must appear in its source code before the class will successfully compile.
Event
Event is a platform-independent class that encapsulates events from the platform's Graphical User Interface in the Java 1.0 event model. In Java 1.1 and later versions, the Event class is maintained only for backwards compatibilty.
They are definetely declared in classes. These concepts are related to one other for declaring methods and handling events in our program.
please go through the following links fotr your future reference.[ABAP Objects Examples ][ ABAP Objects Wiki section]
hope its clear to you.
reward points if useful.
Regards,
kalyan.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |