SlideShare a Scribd company logo
2
Most read
4
Most read
12
Most read
OOPS CONCEPTS
By Biswajit
Object-Oriented Programming is a methodology or
paradigm to design a program using classes and
objects. It simplifies the software development and
maintenance by providing some concepts:
1. Class
2. Object
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
CLASS
 A class is a user defined data type with attributes,
methods, events, user-defined types, interfaces etc
for a particular entity or business application.
COMPONENTS OF A CLASS
 Attributes: Attributes are variables, constants declared within
a class .
 Methods: Methods are coding blocks which provides some
functionality .
 These methods are similar to Function Modules in ABAP.
 Methods can access all attributes of it`s own class.
 Methods are defined in definition part and implemented in
implementation part.
 We can call methods using CALL METHOD statement.
 Events: Event is a mechanism through which one method of
a class can raise method of other class, without hazard of
instantiating that class.
 Interfaces: Interfaces are similar to classes which contain
methods Without any implementation.
 Interfaces are mainly used to extend the scope or functionality
of the class.
INSTANCE AND STATIC COMPONENTS
 Instance components : These components exist
separately in each instance (object) of the class
and are referred using instance component selector
using ->
 Static components : These components exists
globally for a class and are referred to using static
component selector => .
VISIBILITY OF COMPONENTS OF CLASS
 Public section: Data declared in public section can
be accessed by the class itself, by its subclasses as
well as by other users outside the class.
 Protected section: Data declared in the protected
section can be accessed by the class itself, and
also by its subclasses but not by external users
outside the class.
 Private Section: Data declared in the private
section can be accessed by the class only, but not
by its subclasses and by external users outside the
class.
GLOBAL CLASS AND LOCAL CLASS
 Global Class: Global classes and interfaces are
defined in the Class Builder (Transaction SE24) in
the ABAP Workbench. All of the ABAP programs in
an R/3 System can access the global classes.
 Local Class: Local classes are define in an ABAP
program (Transaction SE38) and can only be used
in the program in which they are defined.
OBJECT
 Objects are nothing but instances of classes, each
object has a unique identity that is memory and it`s
own attributes.
SYNTAX
DATA <instance> TYPE REF TO <class name> .
CREATE OBJECT <instance> .
INHERITANCE
 When one object acquires all the properties and
behaviours of parent object i.e. known as
inheritance. It provides code reusability.
 Inheritance is the concept of passing the behavior
of one class to another class.
 SUPER is the keyword used to represent the super
class in oops, you can access the methods and
attributes the super class using this word super.
 REDIFINATION is the keyword which is used to
overwrite the parent class methods with new
definition.
POLYMORPHISM
 It is a concept by which the same method names
will behave differently in different classes i.e each
method will have its own implementation in different
different classes but with the same name.
 Interface is one of the concept in Object Oriented
ABAP to achieve Polymorphism.
ABSTRACTION
 Hiding internal details and showing
functionality is known as abstraction. For
example: phone call, we don't know the internal
processing.
 In SAP, we use abstract class and interface to
achieve abstraction.
ENCAPSULATION
 Binding (or wrapping) code and data together
into a single unit is known as encapsulation .
 Wrapping up of data into single unit. Or, restriction
on visibility of attributes and methods in the class.
We have 3 levels of visibility:
1. Private
2. Protected
3. Public
THE END

More Related Content

What's hot (20)

PPTX
SAP ABAP using OOPS - JH Softech
Vikram P Madduri
 
PPT
Module pool programming
Subhojit- Opekkhay
 
PPT
ABAP Programming Overview
sapdocs. info
 
PPT
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
Garuda Trainings
 
PPT
abap list viewer (alv)
Kranthi Kumar
 
PPTX
CDS Views.pptx
Suman817957
 
PPT
Ab1011 module pool programming
Satheesh Kanna
 
PDF
Sap abap material
Kranthi Kumar
 
PPTX
Reports
Jugul Crasta
 
PDF
Sap Abap Reports
vbpc
 
PPTX
SAP Adobe forms
Jugul Crasta
 
DOCX
Badis
Rajesh Kumar
 
PPT
User exit training
Jen Ringel
 
PDF
Abap reports
Milind Patil
 
PPTX
Sap abap
Jugul Crasta
 
PPT
Alv theory
Phani Kumar
 
PDF
Enhancement framework the new way to enhance your abap systems
Kranthi Kumar
 
DOCX
Sap abap modularization interview questions
Pradipta Mohanty
 
PDF
Dialog programming ABAP
Jefferson Mutuva
 
PDF
SAP ABAP data dictionary
Revanth Nagaraju
 
SAP ABAP using OOPS - JH Softech
Vikram P Madduri
 
Module pool programming
Subhojit- Opekkhay
 
ABAP Programming Overview
sapdocs. info
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
Garuda Trainings
 
abap list viewer (alv)
Kranthi Kumar
 
CDS Views.pptx
Suman817957
 
Ab1011 module pool programming
Satheesh Kanna
 
Sap abap material
Kranthi Kumar
 
Reports
Jugul Crasta
 
Sap Abap Reports
vbpc
 
SAP Adobe forms
Jugul Crasta
 
Badis
Rajesh Kumar
 
User exit training
Jen Ringel
 
Abap reports
Milind Patil
 
Sap abap
Jugul Crasta
 
Alv theory
Phani Kumar
 
Enhancement framework the new way to enhance your abap systems
Kranthi Kumar
 
Sap abap modularization interview questions
Pradipta Mohanty
 
Dialog programming ABAP
Jefferson Mutuva
 
SAP ABAP data dictionary
Revanth Nagaraju
 

Viewers also liked (20)

PPTX
Sql server 2012 ha dr
Joseph D'Antoni
 
PPTX
OOPs fundamentals session for freshers in my office (Aug 5, 13)
Ashoka R K T
 
PPTX
009 sql server management studio
let's go to study
 
PPTX
Javascript and Jquery: The connection between
Clint LaForest
 
PPTX
ASP.NET Core deployment options
Ken Cenerelli
 
PPTX
.Net framework architecture
Fad Zulkifli
 
PPTX
Back to the Basics - 1 - Introduction to Web Development
Clint LaForest
 
PPT
ASP.NET OVERVIEW
Rishi Kothari
 
PPTX
C# fundamentals Part 2
iFour Institute - Sustainable Learning
 
PPT
Future Web Trends - at Innovation series with Jimmy Wales
Matthew Buckland
 
PDF
Your 2012 Marketing Plan: Simple & Powerful
Infusionsoft
 
PPT
HTML 5 Overview
Offir Ariel
 
PPTX
Asp.net page lifecycle
KhademulBasher
 
PPT
HTML 5
Doncho Minkov
 
DOC
Labsheet_3
rohassanie
 
PPTX
Unit i
vijay gupta
 
PDF
SSRP Self Learning Guide Maths Class 10 - In Hindi
kusumafoundation
 
DOC
Labsheet2
rohassanie
 
KEY
HTML 5 & CSS 3
Kevin van Dijk
 
Sql server 2012 ha dr
Joseph D'Antoni
 
OOPs fundamentals session for freshers in my office (Aug 5, 13)
Ashoka R K T
 
009 sql server management studio
let's go to study
 
Javascript and Jquery: The connection between
Clint LaForest
 
ASP.NET Core deployment options
Ken Cenerelli
 
.Net framework architecture
Fad Zulkifli
 
Back to the Basics - 1 - Introduction to Web Development
Clint LaForest
 
ASP.NET OVERVIEW
Rishi Kothari
 
C# fundamentals Part 2
iFour Institute - Sustainable Learning
 
Future Web Trends - at Innovation series with Jimmy Wales
Matthew Buckland
 
Your 2012 Marketing Plan: Simple & Powerful
Infusionsoft
 
HTML 5 Overview
Offir Ariel
 
Asp.net page lifecycle
KhademulBasher
 
HTML 5
Doncho Minkov
 
Labsheet_3
rohassanie
 
Unit i
vijay gupta
 
SSRP Self Learning Guide Maths Class 10 - In Hindi
kusumafoundation
 
Labsheet2
rohassanie
 
HTML 5 & CSS 3
Kevin van Dijk
 
Ad

Similar to Oops abap fundamental (20)

PPTX
02 - ABAP Object Oriented Concepts ( ABAP OO)
deekshanarayan44
 
DOCX
Object oriented basics
vamshimahi
 
PPT
ABAP Objects - SAP training for technicals
Mayford Desouza
 
PDF
Abap Objects for BW
Luc Vanrobays
 
PPTX
SAP-ABAP-Object-Oriented-Programming.pptx
aryans3n
 
PPTX
Object oriented programming
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
object oriented programing lecture 1
Geophery sanga
 
PDF
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
PPT
34. uml
karzansaid
 
PDF
Lecture_1___Introduction_to_OOP.pdf.pdf
AngelaClarito1
 
PPTX
Oops
Jaya Kumari
 
PPTX
Application package
JAYAARC
 
PPTX
OOP Presentation.pptx
DurgaPrasadVasantati
 
PPTX
OOP Presentation.pptx
DurgaPrasadVasantati
 
PPT
Oops slide
Ashok Sharma
 
PPT
Lecture13 abap on line
Milind Patil
 
PPT
Chapter 02 The Object Model_Software E.ppt
AhammadUllah3
 
PPT
Abap Inicio
unifor
 
PPT
Basic Java Concept - Practical Oriented Methodologies
SakthiVinayagam5
 
02 - ABAP Object Oriented Concepts ( ABAP OO)
deekshanarayan44
 
Object oriented basics
vamshimahi
 
ABAP Objects - SAP training for technicals
Mayford Desouza
 
Abap Objects for BW
Luc Vanrobays
 
SAP-ABAP-Object-Oriented-Programming.pptx
aryans3n
 
object oriented programing lecture 1
Geophery sanga
 
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
34. uml
karzansaid
 
Lecture_1___Introduction_to_OOP.pdf.pdf
AngelaClarito1
 
Oops
Jaya Kumari
 
Application package
JAYAARC
 
OOP Presentation.pptx
DurgaPrasadVasantati
 
OOP Presentation.pptx
DurgaPrasadVasantati
 
Oops slide
Ashok Sharma
 
Lecture13 abap on line
Milind Patil
 
Chapter 02 The Object Model_Software E.ppt
AhammadUllah3
 
Abap Inicio
unifor
 
Basic Java Concept - Practical Oriented Methodologies
SakthiVinayagam5
 
Ad

Recently uploaded (20)

PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
Safe Software
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
Safe Software
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 

Oops abap fundamental

  • 2. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts: 1. Class 2. Object 3. Inheritance 4. Polymorphism 5. Abstraction 6. Encapsulation
  • 3. CLASS  A class is a user defined data type with attributes, methods, events, user-defined types, interfaces etc for a particular entity or business application.
  • 4. COMPONENTS OF A CLASS  Attributes: Attributes are variables, constants declared within a class .  Methods: Methods are coding blocks which provides some functionality .  These methods are similar to Function Modules in ABAP.  Methods can access all attributes of it`s own class.  Methods are defined in definition part and implemented in implementation part.  We can call methods using CALL METHOD statement.  Events: Event is a mechanism through which one method of a class can raise method of other class, without hazard of instantiating that class.  Interfaces: Interfaces are similar to classes which contain methods Without any implementation.  Interfaces are mainly used to extend the scope or functionality of the class.
  • 5. INSTANCE AND STATIC COMPONENTS  Instance components : These components exist separately in each instance (object) of the class and are referred using instance component selector using ->  Static components : These components exists globally for a class and are referred to using static component selector => .
  • 6. VISIBILITY OF COMPONENTS OF CLASS  Public section: Data declared in public section can be accessed by the class itself, by its subclasses as well as by other users outside the class.  Protected section: Data declared in the protected section can be accessed by the class itself, and also by its subclasses but not by external users outside the class.  Private Section: Data declared in the private section can be accessed by the class only, but not by its subclasses and by external users outside the class.
  • 7. GLOBAL CLASS AND LOCAL CLASS  Global Class: Global classes and interfaces are defined in the Class Builder (Transaction SE24) in the ABAP Workbench. All of the ABAP programs in an R/3 System can access the global classes.  Local Class: Local classes are define in an ABAP program (Transaction SE38) and can only be used in the program in which they are defined.
  • 8. OBJECT  Objects are nothing but instances of classes, each object has a unique identity that is memory and it`s own attributes. SYNTAX DATA <instance> TYPE REF TO <class name> . CREATE OBJECT <instance> .
  • 9. INHERITANCE  When one object acquires all the properties and behaviours of parent object i.e. known as inheritance. It provides code reusability.  Inheritance is the concept of passing the behavior of one class to another class.  SUPER is the keyword used to represent the super class in oops, you can access the methods and attributes the super class using this word super.  REDIFINATION is the keyword which is used to overwrite the parent class methods with new definition.
  • 10. POLYMORPHISM  It is a concept by which the same method names will behave differently in different classes i.e each method will have its own implementation in different different classes but with the same name.  Interface is one of the concept in Object Oriented ABAP to achieve Polymorphism.
  • 11. ABSTRACTION  Hiding internal details and showing functionality is known as abstraction. For example: phone call, we don't know the internal processing.  In SAP, we use abstract class and interface to achieve abstraction.
  • 12. ENCAPSULATION  Binding (or wrapping) code and data together into a single unit is known as encapsulation .  Wrapping up of data into single unit. Or, restriction on visibility of attributes and methods in the class. We have 3 levels of visibility: 1. Private 2. Protected 3. Public