KEMBAR78
Class. They Are Declared With The Class-Keywords: Is Interface The Leaky Bucket of Oops Design? | PDF | Computers
0% found this document useful (0 votes)
36 views1 page

Class. They Are Declared With The Class-Keywords: Is Interface The Leaky Bucket of Oops Design?

The document discusses the different components of classes in ABAP Objects including static components, instance components, attributes, methods, events, and interfaces. Static components exist globally for a class while instance components exist separately for each object instance. Attributes define data and constants while methods provide functionality. Events can trigger methods in other classes.

Uploaded by

Pankaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views1 page

Class. They Are Declared With The Class-Keywords: Is Interface The Leaky Bucket of Oops Design?

The document discusses the different components of classes in ABAP Objects including static components, instance components, attributes, methods, events, and interfaces. Static components exist globally for a class while instance components exist separately for each object instance. Attributes define data and constants while methods provide functionality. Events can trigger methods in other classes.

Uploaded by

Pankaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

  

Static Components: (Attributes / Methods)


These Static components exist globally for a class and are referred to using static
component selector =>. In the code, if you see => or use => then you should
correlate that it is Static Component (it can be an attribute i.e. variables/constants or it
might be methods).

The static component only exists once per class and are valid for all instances of the
class. They are declared with the CLASS- keywords

 Instance Components: (Attributes / Methods)


These Instance components exist separately in each instance (object) of the class and
are referred using instance component selector using ->. So know you know the

difference between => and -> in ABAP Objects. 

We will dedicate a whole article on Static and Instant concept in future posts.

1. Attributes: Any data, constants, types declared within a class form the
attribute of the class.
2. Methods: Block of code providing some functionality offered by the class can
be compared to function modules or subroutines/performs. They can access
all of the attributes of a class.
Methods are defined in the definition part of class and implemented in the
implementation part using the processing block.

Declaration:

METHODS <Method name>.


Implementation:

METHOD <method name>

………

END METHOD.
Methods are called using the CALL METHOD statement.

3. EVENTS: A mechanism set within the class which can help a class to trigger
methods of another class.
4. Interfaces: Interfaces are independent structures that you can implement in
a class to extend the scope of the class. We will discuss Interfaces in
subsequent parts. For now, check this interesting post on Interface – Is
INTERFACE the Leaky Bucket of OOPs Design?

You might also like