Object Oriented Programming in SAP ABAP

Object Oriented Programming in SAP ABAP

Object oriented programming tries to map the real world objects with their attributes and methods as realistically as possible in program constructs. The aim is to create the program flow in such a way as if it is taking place in the real world. This makes the interaction between the developer and the user easier. The user can formulate business requirements on a program in the language in which the user is familiar with and the developer can convert these directly instead of the classic programming model.

In the object oriented programming model a different approach is used. Attributes and methods which belong to a specific object are grouped together and made accessible to the user using a well defined interface behind which the actual implementation details are hidden. so, the attributes of the object are only changed by the methods of the object and not directly by the user of and object. This ensures that the status of the object is always consistent.

When do you call an object an object oriented programming? if it has these features.

Abstraction
Abstraction refers to the ability to reflect the real world  processes as realistically as possible through programming. These processes can be a business or a technical nature.

Encapsulation
Implementation details are hidden behind well-defined an documented interfaces. They ensure that the abstract representation of a object is used only in accordance with its spefication.

Inheritance
New abstractions i.e. classes are derived from existing ones. They inherit all the attributes and methods of the higher class and can expand and specialize them.

Polymorphism
Different objects can present the same interface to the outside. A user only needs to know the interface and need not know every minute details of the classes.

3 thoughts on “Object Oriented Programming in SAP ABAP

Leave a Reply

Your email address will not be published.

%d bloggers like this: