OO (Object Oriented) ABAP – Introduction

 

This video is an introduction to the new ways of thinking and the related concepts of OO (Object Oriented) ABAP.

An example of encapsulating data using a function group is presented, and the advantage of using OO ABAP instead of procedural programming is demonstrated.

Introduction

  • Based on your existing knowledge of procedural programming with ABAP, I will explain the object-oriented approach using a Function Group.
  • I will illustrate one of the advantages of using object-oriented programming over procedural programming.
  • Let’s start by encapsulating data - a concept of the object-oriented programming mode – using a function group in ABAP.

Encapsulating Data: Speed

Function Group with functions to control the speed of a car.

FUNCTION-POOL zfg_vehicle.

*speed is a global variable

*used in the function-pool

DATA: speed TYPE i.

FUNCTION zfm_increase_speed.
ADD i_speed TO speed.

ENDFUNCTION.

FUNCTION zfm_decrease_speed.
SUBTRACT i_speed FROM speed.

ENDFUNCTION.

FUNCTION zfm_get_speed.
e_speed = speed.

ENDFUNCTION.

Share this on Social Media

Facebook
Twitter
LinkedIn
Pinterest
WhatsApp

Unit 1 – SAP System Architecture

Unit 2 – Object Navigator, Repository and ABAP Programs

Unit 3 – Transparent tables in the ABAP Dictionary

Unit 4 – Basic ABAP statements, ABAP Structures and ABAP Logical Expressions

Unit 5 – ABAP Data Retrieval

Unit 6 – SAP Analysis Tools

Unit 7 – ABAP Subroutines

Unit 8 – ABAP Events

Unit 9 – ABAP User Interface

Unit 10 – Function Modules, Methods, ALV and BAPI

Unit 11 – Adjusting SAP Standard Software

Unit 12 – ABAP Debugger, Selection Screens, and Table Controls

Unit 13 – ABAP Web Dynpro

Unit 14 – Advanced Topics

Unit 15 – Advanced Topics II

Object Oriented (OO) ABAP

ABAP for SAP HANA (Introduction)

OData and SAP Netweaver Gateway