You are on page 1of 91

ABAP OOP

Example of a Class

Defining Classes

Example of Attributes

Definition of Attributes, Types, and Constants

Visibility Sections of Attributes

Accessing Private Attributes

Comparison of Instance Attributes with Static Attributes

Instance Attributes and Static Attributes in the Program Context

Syntax for Methods

Visibility Sections of Methods

Accessing Private Methods

Comparison of Instance Methods and Static Methods

Visibility Sections and UML Notation

Overview of Instances of Classes

Definition of Reference Variables

Creating Objects

Reference Semantics of Object References

Garbage Collector

Reference Administration with Multiple Instantiation

Example of Aggregation

Calling Methods

Calling Instance Methods Syntax

Calling Static Methods - Syntax

Functional Methods

Functional Methods Examples

Accessing Public Attributes

(Instance) Constructor

Constructor Example

Example of a Static Constructor

Self-Reference

Example of Generalization/Specialization

Characteristics of Generalization/Specialization

Inheritance Syntax

Redefining Methods

Preserving Semantics During Redefinition

Definition of the constructor in subclasses

Rules for Calling the Constructor

Inheritance and Visibility

Protected Versus Private Section

Up-Cast (Widening Cast) with object references

Static and Dynamic Types of References

Generic Access After Up-Cast Assignments

Row Type of the Internal Table in the Application Example

Up-Cast and Generic Access in the Application Example

Polymorphism: Generic Access Using the Superclass Reference

Generic Calls in the Procedural Programming Model

Down Cast (Narrowing Cast) with Object References

Specific Access After Down Cast Assignments

Down Cast and Exception Handling in the Application Example

Central Definition of Shared Components

The Client Defines the Protocol

Interfaces in UML Notation

Defining and Implementing an Interface

Addressing Interface Components Using Object References

Up-Cast with Interface References

Row Type of the Internal Table in the Application Example

Polymorphism Generic Access Using the Interface Reference

Down-Cast Assignment and Exception Handling in the Application Example

Interface Hierarchy in the Application Example

Compound Interface in UML Notation

Definition and Implementation of Compound Interfaces: Syntax

Addressing Components in Compound Interfaces Syntax

Using Interfaces

Event-Controlled Method Calls

Event Handling in a UML Class Diagram

Triggering and Handling Events

Defining and Triggering Events Syntax

Handling Events Syntax

Registering Event Handling

Registering Event Handling Syntax

Creating Global Classes in the Object Navigator

Definition of Attributes

Definition of Methods

Definition of Method Signatures

Implementation of Methods

Displaying the Method Definition

Definition of Components Using the Navigation Area

Defining Global Interfaces

Including Global Interfaces

The Class Builder Testing Environment

Redefining an Inherited Method

Separating the Navigation and Editing Areas of the Object Navigator

Object Instantiation Using Drag and Drop

Method Calls Using Drag and Drop

Abstract Classes and Abstract Methods

Final Classes and Methods

Implicit Setting of the Instance Constructors Visibility

Singleton Classes

Areas of Use for Friendship Relationships

Definition of Friendship Relationships

You might also like