1 - ABAP OOPS - Introduction

SAP ABAP by Rahul Mehta
28 Feb 202208:05

Summary

TLDRThis video introduces ABAP object-oriented programming (OOP) fundamentals, explaining that OOP centers on classes and objects. It defines a class as a collection of elements—methods, attributes, events, interfaces—and an object as an instance or result of a class, illustrated with a phone (Samsung vs iPhone) example. The presenter distinguishes global classes (reusable across programs; created via transaction SC24) from local classes (program-specific; created inside programs or via SC38). Finally, four global class types are outlined: usable (regular) classes, exception classes, persistence classes for database operations, and unit test classes. The next video will create a usable ABAP class.

Takeaways

  • 😀 OOPs (Object-Oriented Programming System) is based on two main concepts: Class and Object.
  • 😀 A class is a collection of objects, and an object is an instance or result of a class.
  • 😀 In OOPs, methods, attributes, events, interfaces, and friends can all be part of a class.
  • 😀 A simple example of a class is a 'Phone,' with objects like 'Samsung' and 'iPhone,' where each object has properties like width and height.
  • 😀 There are two types of classes in ABAP: Global Class and Local Class.
  • 😀 A Global Class can be reused across multiple programs, whereas a Local Class is restricted to the program it’s created in.
  • 😀 SC11 is used to create reusable structures, similar to how SC24 is used to create Global Classes in ABAP.
  • 😀 Local Classes are created in a program using the `types` statement and can only be used within that program.
  • 😀 Four types of Global Classes exist in ABAP: Usual ABAP Class, Exception Class, Persistence Class, and Unit Test Class.
  • 😀 SC24 is the transaction code used for creating Global Classes, while SC38 is used for Local Classes in ABAP.
  • 😀 The Usual ABAP Class in OOPs is similar to a Function Module in Core ABAP, used to write business logic.

Q & A

  • What does OOPS stand for?

    -OOPS stands for Object-Oriented Programming System.

  • What are the two main concepts of OOPS?

    -The two main concepts of OOPS are classes and objects.

  • How is a class defined in OOPS?

    -A class is defined as a collection of objects. It can include methods, attributes, events, interfaces, and friends.

  • What is an object in OOPS?

    -An object is an instance or result of a class. It represents a specific implementation or example of the class.

  • Can you give an example to explain the relationship between class and object?

    -Yes. For example, if we have a class called 'Phone', the objects could be 'Samsung' and 'iPhone'. Both have properties like width and height, but they belong to the same class 'Phone'.

  • What are the two types of classes in ABAP OOPS?

    -The two types of classes in ABAP OOPS are Global Classes and Local Classes.

  • What is a Global Class in ABAP?

    -A Global Class is reusable across multiple programs. It is created using transaction code SE24 and can be used anywhere within the system.

  • What is a Local Class in ABAP?

    -A Local Class is created within a single program using transaction code SE38. It cannot be reused in other programs.

  • What are the four types of Global Classes in ABAP?

    -The four types of Global Classes in ABAP are: (1) Usual ABAP Class, (2) Exception Class, (3) Persistence Class, and (4) Unit Test Class.

  • What is the purpose of a Usual ABAP Class?

    -A Usual ABAP Class is used to write and execute logic, similar to function modules in core ABAP programming.

  • What is the role of an Exception Class in ABAP?

    -An Exception Class is used to raise and handle exceptions, allowing for better error handling in programs.

  • What is a Persistence Class used for?

    -A Persistence Class is used for performing database operations such as insert, update, and delete, similar to SQL commands in core ABAP.

  • What is the function of a Unit Test Class in ABAP?

    -A Unit Test Class is used to write and run unit test cases to validate the correctness of code implementations.

  • Which transaction code is used to create Global Classes in ABAP?

    -Global Classes are created using the transaction code SE24.

  • Which transaction code is used to create Local Classes in ABAP?

    -Local Classes are created within a program using the transaction code SE38.

Outlines

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Mindmap

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Keywords

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Highlights

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Transcripts

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen
Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
OOP BasicsABAP ProgrammingObject-OrientedClasses & ObjectsGlobal ClassLocal ClassSAP ABAPSoftware DevelopmentCoding TutorialTech EducationProgramming Concepts
Benötigen Sie eine Zusammenfassung auf Englisch?