SlideShare a Scribd company logo
1 of 13
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

abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
Kranthi Kumar
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
kssr99
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
Kranthi Kumar
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
Pradipta Mohanty
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 

What's hot (20)

ABAP Object oriented concepts
ABAP Object oriented conceptsABAP Object oriented concepts
ABAP Object oriented concepts
 
Abap Objects for BW
Abap Objects for BWAbap Objects for BW
Abap Objects for BW
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part I
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniques
 
Badis
Badis Badis
Badis
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 

Viewers also liked

009 sql server management studio
009 sql server management studio009 sql server management studio
009 sql server management studio
let's go to study
 
Your 2012 Marketing Plan: Simple & Powerful
Your 2012 Marketing Plan: Simple & PowerfulYour 2012 Marketing Plan: Simple & Powerful
Your 2012 Marketing Plan: Simple & Powerful
Infusionsoft
 

Viewers also liked (20)

Sql server 2012 ha dr
Sql server 2012 ha drSql server 2012 ha dr
Sql server 2012 ha dr
 
OOPs fundamentals session for freshers in my office (Aug 5, 13)
OOPs fundamentals session for freshers in my office (Aug 5, 13)OOPs fundamentals session for freshers in my office (Aug 5, 13)
OOPs fundamentals session for freshers in my office (Aug 5, 13)
 
009 sql server management studio
009 sql server management studio009 sql server management studio
009 sql server management studio
 
Javascript and Jquery: The connection between
Javascript and Jquery: The connection betweenJavascript and Jquery: The connection between
Javascript and Jquery: The connection between
 
ASP.NET Core deployment options
ASP.NET Core deployment optionsASP.NET Core deployment options
ASP.NET Core deployment options
 
.Net framework architecture
.Net framework architecture.Net framework architecture
.Net framework architecture
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web Development
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
C# fundamentals Part 2
C# fundamentals Part 2C# fundamentals Part 2
C# fundamentals Part 2
 
Future Web Trends - at Innovation series with Jimmy Wales
Future Web Trends - at Innovation series with Jimmy WalesFuture Web Trends - at Innovation series with Jimmy Wales
Future Web Trends - at Innovation series with Jimmy Wales
 
Your 2012 Marketing Plan: Simple & Powerful
Your 2012 Marketing Plan: Simple & PowerfulYour 2012 Marketing Plan: Simple & Powerful
Your 2012 Marketing Plan: Simple & Powerful
 
HTML 5 Overview
HTML 5 OverviewHTML 5 Overview
HTML 5 Overview
 
Asp.net page lifecycle
Asp.net page lifecycleAsp.net page lifecycle
Asp.net page lifecycle
 
HTML 5
HTML 5HTML 5
HTML 5
 
Labsheet_3
Labsheet_3Labsheet_3
Labsheet_3
 
Oops
OopsOops
Oops
 
Unit i
Unit iUnit i
Unit i
 
SSRP Self Learning Guide Maths Class 10 - In Hindi
SSRP Self Learning Guide Maths Class 10 - In HindiSSRP Self Learning Guide Maths Class 10 - In Hindi
SSRP Self Learning Guide Maths Class 10 - In Hindi
 
Labsheet2
Labsheet2Labsheet2
Labsheet2
 
HTML 5 & CSS 3
HTML 5 & CSS 3HTML 5 & CSS 3
HTML 5 & CSS 3
 

Similar to Oops abap fundamental

FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
AnkurSingh340457
 
Application package
Application packageApplication package
Application package
JAYAARC
 
oops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdf
ArpitaJana28
 

Similar to Oops abap fundamental (20)

Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Oops
OopsOops
Oops
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
 
Object Oriented Javascript part2
Object Oriented Javascript part2Object Oriented Javascript part2
Object Oriented Javascript part2
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
 
My c++
My c++My c++
My c++
 
C# interview
C# interviewC# interview
C# interview
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
OOPS
OOPSOOPS
OOPS
 
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
 
Application package
Application packageApplication package
Application package
 
Nitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptxNitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptx
 
oops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdf
 
oopsinvb-191021101327.pdf
oopsinvb-191021101327.pdfoopsinvb-191021101327.pdf
oopsinvb-191021101327.pdf
 
Oops in vb
Oops in vbOops in vb
Oops in vb
 
Review oop and ood
Review oop and oodReview oop and ood
Review oop and ood
 
Oops
OopsOops
Oops
 

Recently uploaded

Recently uploaded (20)

WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

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