SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Introduction and Concepts of Object
Oriented ABAP
Vikram Aditya
SAP Architect
Email: aditya@jhsoftech.com
www.jhsoftech.com
What is Object Orientation?
• In the past, information systems used to be defined
primarily by their functionality: data and functions
were kept separate and linked together by means of
input and output relations.
• The object-oriented approach, however, focuses on
objects that represent abstract or concrete things of
the real world. These objects are first defined by their
character and their properties which are represented
by their internal structure and their attributes (data).
The behaviour of these objects is described by
methods (functionality).
www.jhsoftech.com
Comparison between Procedural and
Object Oriented Programming
• Features Procedure Oriented approach Object Oriented
approach Emphasis Emphasis on tasks Emphasis on
things that does those tasks.
• Modularization Programs are divided into smaller
programs known as functions Programs are organized
into classes and objects and the functionalities are
embedded into methods of a class. Data security Most
of the functions share global data Data can be hidden
and cannot be accessed by external sources.
Extensibility Relatively more time consuming to modify
for extending existing functionality. New data and
functions can be easily added whenever necessary O
www.jhsoftech.com
www.jhsoftech.com
What is an Object ?
• Objects form a capsule which combines the character
to the respective behaviour. Objects should enable
programmers to map a real problem and its proposed
software solution on a one-to-one basis.
• Typical objects in a business environment are, for
example, ‘Customer’, ‘Order’, or ‘Invoice’. From Release
3.1 onwards, the Business Object Repository (BOR) of
SAP Web Applicaton Server ABAP has contained
examples of such objects. The BOR object model will
be integrated into ABAP Objects in the next Release by
migrating the BOR object types to the ABAP class
library.
www.jhsoftech.com
ABAP Objects
• A comprehensive introduction to object
orientation as a whole would go far beyond the
limits of this introduction to ABAP Objects. This
documentation introduces a selection of terms
that are used universally in object orientation and
also occur in ABAP Objects. In subsequent
sections, it goes on to discuss in more detail how
these terms are used in ABAP Objects. The end of
this section contains a list of further reading,
with a selection of titles about object orientation
www.jhsoftech.com
Objects
• Objects are instances of classes. They contain
data and provides services. The data forms the
attributes of the object. The services are known
as methods (also known as operations or
functions). Typically, methods operate on private
data (the attributes, or state of the object), which
is only visible to the methods of the object. Thus
the attributes of an object cannot be changed
directly by the user, but only by the methods of
the object. This guarantees the internal
consistency of the object
www.jhsoftech.com
Classes
• Classes describe objects. From a technical
point of view, objects are runtime instances of
a class. In theory, you can create any number
of objects based on a single class. Each
instance (object) of a class has a unique
identity and its own set of values for its
attributes
www.jhsoftech.com
Object References
• In a program, you identify and address objects
using unique object references. Object
references allow you to access the attributes
and methods of an object.
• In object-oriented programming, objects
usually have the following properties:
www.jhsoftech.com
Encapsulation
• Objects restrict the visibility of their resources
(attributes and methods) to other users. Every
object has an interface, which determines
how other objects can interact with it. The
implementation of the object is encapsulated,
that is, invisible outside the object itself
www.jhsoftech.com
Inheritance
• You can use an existing class to derive a new
class. Derived classes inherit the data and
methods of the superclass. However, they can
overwrite existing methods, and also add new
ones.
www.jhsoftech.com
Polymorphism
• Identical (identically-named) methods behave
differently in different classes. In ABAP
Objects, polymorphism is implemented by
redefining methods during inheritance and by
using constructs called interfaces
www.jhsoftech.com
Uses of Object Orientation
• Below are some of the advantages of object-oriented
programming:
• Complex software systems become easier to understand,
since object-oriented structuring provides a closer
representation of reality than other programming
techniques.
• In a well-designed object-oriented system, it should be
possible to implement changes at class level, without
having to make alterations at other points in the
system. This reduces the overall amount of maintenance
required.
• Through polymorphism and inheritance, object-oriented
programming allows you to reuse individual components.
www.jhsoftech.com
Uses of Object Orientation
• In an object-oriented system, the amount of work
involved in revising and maintaining the system is
reduced, since many problems can be detected and
corrected in the design phase.
• Achieving these goals requires:
• Object-oriented programming languages
• Object-oriented programming techniques do not
necessarily depend on object-oriented programming
languages. However, the efficiency of object-oriented
programming depends directly on how object-oriented
language techniques are implemented in the system
kernel.
www.jhsoftech.com
Object-oriented tools
• Object-oriented tools allow you to create object-oriented
programs in object-oriented languages. They allow you to
model and store development objects and the relationships
between them.
Object-oriented modelling
• The object-orientation modelling of a software system is
the most important, most time-consuming, and most
difficult requirement for attaining the above goals. Object-
oriented design involves more than just object-oriented
programming, and provides logical advantages that are
independent of the actual implementation.
www.jhsoftech.com
Overview
• This section of the ABAP User’s Guide provides an
overview of the object-oriented extension of the
ABAP language. We have used simple examples
to demonstrate how to use the new features.
However, these are not intended to be a model
for object-oriented design. More detailed
information about each of the ABAP Objects
statements is contained in the keyword
documentation in the ABAP Editor. For a
comprehensive introduction to object-oriented
software development, you should read one or
more of the titles listed below.
www.jhsoftech.com
Working with class methods in OOABAP
What is a method in a Class ?
• Methods are coding blocks of a class, which can provide
some business functionality (ex: read material data etc),
these methods are similar to Function Modules.
• Methods can access all attributes of a class (defined under
attributes tab), can access user defined types ( declared
under types tab).
• The methods can be called using key word CALL METHOD in
SAP ABAP programs.
Uses of methods in SAP classes?
• These methods can be reusable in multiple ABAP programs,
a class may contain more than one method.
www.jhsoftech.com

Weitere ähnliche Inhalte

Was ist angesagt?

Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPNoman Mohamed Hanif
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systemsKranthi Kumar
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IIAshish Saxena
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.docKranthi Kumar
 
SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hanasitist
 
Core Data Service
Core Data ServiceCore Data Service
Core Data ServiceSujoy Saha
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reportsvbpc
 
HANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWHANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWdheerajad
 
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 IAshish Saxena
 
User exit training
User exit trainingUser exit training
User exit trainingJen Ringel
 

Was ist angesagt? (20)

Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAP
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
Sap abap
Sap abapSap abap
Sap abap
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
Badis
Badis Badis
Badis
 
SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hana
 
Sap abap
Sap abapSap abap
Sap abap
 
Core Data Service
Core Data ServiceCore Data Service
Core Data Service
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reports
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Sp rao abap
Sp rao abapSp rao abap
Sp rao abap
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
HANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEWHANA WITH ABAP OVERVIEW
HANA WITH ABAP OVERVIEW
 
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 Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
Abap Objects for BW
Abap Objects for BWAbap Objects for BW
Abap Objects for BW
 
User exit training
User exit trainingUser exit training
User exit training
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 

Andere mochten auch

Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP PerformancePeterHBrown
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapKranthi Kumar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESKranthi Kumar
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap materialKranthi Kumar
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction eventsKranthi Kumar
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsGaruda Trainings
 
SAP ABAP HR TRAINING
SAP ABAP HR TRAININGSAP ABAP HR TRAINING
SAP ABAP HR TRAININGJoshiRavin
 

Andere mochten auch (15)

Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abap
 
Epic abap
Epic  abapEpic  abap
Epic abap
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
 
IDOCS ALE
IDOCS ALEIDOCS ALE
IDOCS ALE
 
Crm technical
Crm technicalCrm technical
Crm technical
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
 
Sap fico overview
Sap fico overviewSap fico overview
Sap fico overview
 
SAP FICO Overview
SAP FICO OverviewSAP FICO Overview
SAP FICO Overview
 
SAP ABAP HR TRAINING
SAP ABAP HR TRAININGSAP ABAP HR TRAINING
SAP ABAP HR TRAINING
 

Ähnlich wie SAP ABAP using OOPS - JH Softech

Ähnlich wie SAP ABAP using OOPS - JH Softech (20)

OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)
 
ppt_ooad.pdf
ppt_ooad.pdfppt_ooad.pdf
ppt_ooad.pdf
 
Chapter17 oop
Chapter17 oopChapter17 oop
Chapter17 oop
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Object Modelling Technique " ooad "
Object Modelling Technique  " ooad "Object Modelling Technique  " ooad "
Object Modelling Technique " ooad "
 
Adbms 12 encapsulation and its benefits
Adbms 12 encapsulation and its benefitsAdbms 12 encapsulation and its benefits
Adbms 12 encapsulation and its benefits
 
Handout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignHandout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and Design
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object Oriented Program Class 12 Computer Science
Object Oriented Program Class 12 Computer ScienceObject Oriented Program Class 12 Computer Science
Object Oriented Program Class 12 Computer Science
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
RRC AD
RRC ADRRC AD
RRC AD
 

Kürzlich hochgeladen

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Kürzlich hochgeladen (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

SAP ABAP using OOPS - JH Softech

  • 1. Introduction and Concepts of Object Oriented ABAP Vikram Aditya SAP Architect Email: aditya@jhsoftech.com www.jhsoftech.com
  • 2. What is Object Orientation? • In the past, information systems used to be defined primarily by their functionality: data and functions were kept separate and linked together by means of input and output relations. • The object-oriented approach, however, focuses on objects that represent abstract or concrete things of the real world. These objects are first defined by their character and their properties which are represented by their internal structure and their attributes (data). The behaviour of these objects is described by methods (functionality). www.jhsoftech.com
  • 3. Comparison between Procedural and Object Oriented Programming • Features Procedure Oriented approach Object Oriented approach Emphasis Emphasis on tasks Emphasis on things that does those tasks. • Modularization Programs are divided into smaller programs known as functions Programs are organized into classes and objects and the functionalities are embedded into methods of a class. Data security Most of the functions share global data Data can be hidden and cannot be accessed by external sources. Extensibility Relatively more time consuming to modify for extending existing functionality. New data and functions can be easily added whenever necessary O www.jhsoftech.com
  • 5. What is an Object ? • Objects form a capsule which combines the character to the respective behaviour. Objects should enable programmers to map a real problem and its proposed software solution on a one-to-one basis. • Typical objects in a business environment are, for example, ‘Customer’, ‘Order’, or ‘Invoice’. From Release 3.1 onwards, the Business Object Repository (BOR) of SAP Web Applicaton Server ABAP has contained examples of such objects. The BOR object model will be integrated into ABAP Objects in the next Release by migrating the BOR object types to the ABAP class library. www.jhsoftech.com
  • 6. ABAP Objects • A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation www.jhsoftech.com
  • 7. Objects • Objects are instances of classes. They contain data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object www.jhsoftech.com
  • 8. Classes • Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes www.jhsoftech.com
  • 9. Object References • In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object. • In object-oriented programming, objects usually have the following properties: www.jhsoftech.com
  • 10. Encapsulation • Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself www.jhsoftech.com
  • 11. Inheritance • You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones. www.jhsoftech.com
  • 12. Polymorphism • Identical (identically-named) methods behave differently in different classes. In ABAP Objects, polymorphism is implemented by redefining methods during inheritance and by using constructs called interfaces www.jhsoftech.com
  • 13. Uses of Object Orientation • Below are some of the advantages of object-oriented programming: • Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques. • In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required. • Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components. www.jhsoftech.com
  • 14. Uses of Object Orientation • In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase. • Achieving these goals requires: • Object-oriented programming languages • Object-oriented programming techniques do not necessarily depend on object-oriented programming languages. However, the efficiency of object-oriented programming depends directly on how object-oriented language techniques are implemented in the system kernel. www.jhsoftech.com
  • 15. Object-oriented tools • Object-oriented tools allow you to create object-oriented programs in object-oriented languages. They allow you to model and store development objects and the relationships between them. Object-oriented modelling • The object-orientation modelling of a software system is the most important, most time-consuming, and most difficult requirement for attaining the above goals. Object- oriented design involves more than just object-oriented programming, and provides logical advantages that are independent of the actual implementation. www.jhsoftech.com
  • 16. Overview • This section of the ABAP User’s Guide provides an overview of the object-oriented extension of the ABAP language. We have used simple examples to demonstrate how to use the new features. However, these are not intended to be a model for object-oriented design. More detailed information about each of the ABAP Objects statements is contained in the keyword documentation in the ABAP Editor. For a comprehensive introduction to object-oriented software development, you should read one or more of the titles listed below. www.jhsoftech.com
  • 17. Working with class methods in OOABAP What is a method in a Class ? • Methods are coding blocks of a class, which can provide some business functionality (ex: read material data etc), these methods are similar to Function Modules. • Methods can access all attributes of a class (defined under attributes tab), can access user defined types ( declared under types tab). • The methods can be called using key word CALL METHOD in SAP ABAP programs. Uses of methods in SAP classes? • These methods can be reusable in multiple ABAP programs, a class may contain more than one method. www.jhsoftech.com