What is ABAP? Explain ABAP OOP feature in detail?

ABAP stands for Advanced Business Application Programming. It is one of the primary programming languages used for developing programs and applications for SAP R/3 systems and its related modules. It is a high-level language with respect to SAP as it is understood and known only to SAP environment.

The latest version of ABAP which is ABAP Objects follows Object Oriented paradigm. Also, it is fully backward compatible with applications written in previous versions of ABAP whether it is ABAP/4 or other which were highly impressed by COBOL.

ABAP serves as an abstracted layer over the database and runs on top of different underlying databases. From a specialized viewpoint, one majorly performs execution and tuning of the WORK PROCESSES in the SAP framework here, building client profiles and also, doing the fundamental interfacing between the Operating systems and the Oracle Database.

ABAP Object-Oriented Programming Features

Being an Object Oriented Programming language, ABAP Objects fully supports core OOP features. Let's explore each feature in detail ?

Classes and Objects

In ABAP OOP, classes are defined using the CLASS statement and contain attributes (data) and methods (behavior) ?

CLASS lcl_employee DEFINITION.
  PUBLIC SECTION.
    METHODS: constructor IMPORTING iv_name TYPE string,
             display_info.
  PRIVATE SECTION.
    DATA: mv_name TYPE string.
ENDCLASS.

CLASS lcl_employee IMPLEMENTATION.
  METHOD constructor.
    mv_name = iv_name.
  ENDMETHOD.
  
  METHOD display_info.
    WRITE: / 'Employee Name:', mv_name.
  ENDMETHOD.
ENDCLASS.

Encapsulation

ABAP provides three visibility levels: PUBLIC (accessible from anywhere), PROTECTED (accessible within class and subclasses), and PRIVATE (accessible only within the same class).

Inheritance

Classes can inherit from other classes using the INHERITING FROM clause ?

CLASS lcl_manager DEFINITION INHERITING FROM lcl_employee.
  PUBLIC SECTION.
    METHODS: constructor IMPORTING iv_name TYPE string
                                  iv_department TYPE string,
             display_info REDEFINITION.
  PRIVATE SECTION.
    DATA: mv_department TYPE string.
ENDCLASS.

Polymorphism

ABAP supports polymorphism through method redefinition and interfaces. Methods can be overridden in derived classes to provide specific implementations while maintaining the same interface.

Conclusion

ABAP Objects brings modern object-oriented programming capabilities to SAP development, enabling developers to create maintainable, reusable, and scalable applications while maintaining full backward compatibility with traditional ABAP code.

Updated on: 2026-03-13T18:03:01+05:30

471 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements