Professional Documents
Culture Documents
General
Classes
Object handling
Interfaces
Classes
Inheritance
Polymorphism
ABAP Objects
Global Classes
Local Classes
CLASS<class> IMPLEMENTATION
…………………….
ENDCLASS
Public Section
Private Section
Protected Section
Creating objects :
CREATE OBJECT<objr>.
Assigning reference :
<cref1> = <cref2>
Object life time :
Object exists as long as it is being used in the program.
An object is in use in the program as long as,
Special methods
Event handler methods :
METHODS <meth> FOR EVENT <evt> OF <class>
Constructors :
Instance constructors : CONSTRUCTOR
Redefining methods :
Redefine an inherited public/protected instance method in a
subclass & make its function more specialized
METHODS <method name> REDEFINITION.
DEFINING INTERFACE
– LOCAL INTERFACE
INTERFACE <INTF>
……
ENDINTERFACE.
Implementing interface :
IMPLEMENTING IN A CLASS USING
INTERFACES <intf>
METHODS IN A INTERFACE implemented in the
implementation part of a class
METHOD <intf~meth>
…
ENDMETHOD.
Aliases
ALIASES <name> FOR <intf~meth>
An alias name is a short form of the full name of a COMPONENT
that you add to a class by implementing the interface to which it
belongs
Interface reference :
DATA <iref> TYPE REF TO <INTF>
CAN ADDRESS INTF’ COMPONENTS BY
<iref>-><icomp>
<iref> = <cref>
Data objects contain the data with which ABAP programs work at
runtime. They are not persistent, but only exist for the duration of the
program.
All of the data objects that are defined in the declaration part of a
program using statements such as DATA are created statically .
Declaring events :
Instance events : EVENTS <evt> EXPORTING
Instance method :
Static method :