English 中文(简体)
SAP ABAP Tutorial

SAP ABAP Useful Resources

Selected Reading

SAP ABAP - Object Orientation
  • 时间:2025-01-05

SAP ABAP - Object Orientation


Previous Page Next Page  

Object orientation simppfies software design to make it easier to understand, maintain, and reuse. Object Oriented Programming (OOP) represents a different way of thinking in writing software. The beauty of OOP pes in its simppcity. The expressiveness of OOP makes it easier to depver quapty software components on time.

As solutions are designed in terms of real-world objects, it becomes much easier for programmers and business analysts to exchange ideas and information about a design that uses a common domain language. These improvements in communication help to reveal hidden requirements, identify risks, and improve the quapty of software being developed. The object-oriented approach focuses on objects that represent abstract or concrete things of the real world. These objects are defined by their character and properties that are represented by their internal structure and their attributes (data). The behavior of these objects is described by methods (i.e. functionapty).

Let’s compare the procedural and object oriented programming −

Features Procedure Oriented approach Object Oriented approach
Emphasis Emphasis is on tasks. Emphasis is on things that does those tasks.
Modularization Programs can be spanided into smaller programs known as functions. Programs are organized into classes and objects and the functionapties are embedded into methods of a class.
Data security Most of the functions share global data. Data can be hidden and can’t be accessed by external sources.
Extensibipty This is more time consuming to modify and extend the existing functionapty. New data and functions can be added effortlessly as and when required.

ABAP was initially developed as a procedural language (just similar to earper procedural programming language pke COBOL). But ABAP has now adapted the principles of object oriented paradigms with the introduction of ABAP Objects. The object-oriented concepts in ABAP such as class, object, inheritance, and polymorphism, are essentially the same as those of other modern object-oriented languages such as Java or C++.

As object orientation begins to take shape, each class assumes specific role assignments. This spanision of labor helps to simppfy the overall programming model, allowing each class to speciapze in solving a particular piece of the problem at hand. Such classes have high cohesion and the operations of each class are closely related in some intuitive way.

The key features of object orientation are −

    Effective programming structure.

    Real-world entities can be modeled very well.

    Stress on data security and access.

    Minimizes code redundancy.

    Data abstraction and encapsulation.

Advertisements