ABAP OOPS CONCEPT PDF

adminComment(0)

Comparison between Procedural and Object Oriented Programming. Features. Procedure In ABAP Objects the whole class definition is separated into three. 11 ABAP Object Services. 1 Introduction to Object-Oriented Programming. ABAP language concepts are not covered in this book, so you have not worked. Sap Abap Objects is Oops concept general tutorials and sample projects with source codes and PDF guides to bestthing.info represents the object-oriented.


Abap Oops Concept Pdf

Author:CHERISH EISENSTEIN
Language:English, Japanese, Hindi
Country:Rwanda
Genre:Politics & Laws
Pages:596
Published (Last):18.09.2015
ISBN:634-5-74005-326-2
ePub File Size:24.66 MB
PDF File Size:17.35 MB
Distribution:Free* [*Sign up for free]
Downloads:46865
Uploaded by: LACHELLE

sented in the same way that they are used in ABAP Objects to imple- ment classes. The classical concepts of ABAP are mentioned where they are still used. Basic OO bestthing.info - Download as PDF File .pdf), Text File .txt) or read online. How to define instance attributes and get them accessed by external users. To better understand the need of the persistent objects we need to first understand the concept of the transient data. The local data for the program like Attributes.

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. 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. From Release 3. 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. 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.

SAP OO ABAP ONLINE TRAINING IN CANADA

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.

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. 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: Encapsulation Objects restrict the visibility of their resources attributes and methods to other users. Static attributes may be variables or con-stants. Methods allow objects to perform operations.

A method instance method always works in a specific object. In other words, it reads and changes the status of this object, and interacts with other objects by calling their methods or by triggering events. A method has a parameter interface, and can pass on exceptions. A class may also contain static meth-ods, which only accessstatic attributes,and can only trigger static events.

Method Interfaces and Method calls Methods in their fundamental role as the operational components of classes. Specialization by Inheritance ABAP Objects supports simple inheritance, whereby a class can be declared as the direct subclass of exactly one superclass. All classes of ABAP Objects are part of an inheritance hierarchy tree originating in one common superclass. In addition to its own components, a subclass also contains the components of its superclass.

The implementation of superclass methods can be overwritten in subclasses. Standalone Interfaces The public visibility section of a class is its external interface. ABAP Objects allows you to create standalone interfaces, which can be used by classes as part of their interface, or even as their complete interface.

Objects belonging to various classes that use the same interface can be handled by outside users in the same way. An standalone interface may also comprise several other interfaces.

Object Reference Variables and Polymorphism Objects in a program can only be accessed by object references in object reference variables. The type of the object reference variables determines exactly what a program can do with an object. There are both class reference variables and interface reference variables.

OO ABAP.pdf - Object Oriented ABAP From SAP Technical...

The latter enable exclusive access to the interface components of a class. The concepts of inheritance and independent interfaces allow you to assign object references between reference variables of different types according to certain rules. This opens up the possibilities of polymorphism, whereby the same reference variable can be used to access objects belonging to different classes with different behavior.

Events and Event Handling A method of an object is normally executed after a direct call. In this case, the calling object and the called object are closely coupled. Events are used to decouple the caller from the called method. An object can trigger an event in a method, and methods of other objects can handle this event. This corresponds to an indirect method call because the calling method does not need to know anything about the possible event handlers.

Shared Objects Objects as instances of classes exist in the memory area of a pro-gram, and are deleted at the latest when the program is exited. As a result, cross-program access to objects is not generally possible. However, ABAP Objects enables cross-program access with shared objects, which are objects in the shared memory of an application server.

Following the example of Java, the interface concept was introduced in place of multiple inheritances. The correct application of inheritance and interfaces represents the crowning achievement of object-oriented programming, and pro-vides a range of options for managing complexity.

The range of options for defining a parameter interface for methods is, in contrast, specific to ABAP. Similarly, the concept of fully integrating events into the language scope of ABAP Objects as independent components of classes is not a feature of all object-oriented programming languages.

Inheritance In object orientation, inheritance refers to the specialization of classes by deriving subclasses from superclasses.

Basic Principles Classes provide a construction plan for objects. You want to implement methods for both classes, which control the objects or return information about their location and speed.

Even at this stage, you can foresee that some parts of the classes will have to be written twice. The inheritance mechanism of an object-oriented programming language provides options that help you to reuse the same or similar parts of a class, and to create a hierarchy of classes. Superclasses and subclasses If we examine the two classes i. To create a hierarchy relationship between these classes, classes can be derived from each other using inheritance.

Derived or more specific classes are referred to as subclasses, while more general classes are called superclasses. According to this concept, each class can have several subclasses but only one superclass. Every class in an object-oriented programming language in which simple inheritance is implemented has a unique position as a node in an inheritance tree.

This also applies to all the classes we have dealt with up to now, although we have not yet spoken of them in terms of inheritance. For each class, a unique path can be traced back through their superclasses in the inheritance tree until you reach exactly one root node. This root node is the superclass of all classes in the inheritance tree. Inheritance simply means that a subclass inherits all components attributes, methods, events, etc. In each subclass, new elements can be added or methods can be redefined in order to specialize, without this having any impact on the superclass.

Elements can only be added in subclasses. It would go against the inheritance concept to remove elements in a subclass. Visibility Sections and Namespaces in Inheritance There are three different visibility sections in a class, in which the components of the class are declared.

A subclass inherits all components of its superclasses without changing their vis-ibility. For that reason, only the public and protected components of its superclasses are visible in a subclass. In contrast, the private com-ponents are contained in the subclass but are invisible. The visibility sections of a subclass therefore contain the following components: PUBLIC The public visibility section of a subclass contains all public com-ponents of all superclasses, plus its own additional public compo-nents.

These components can be accessed externally using compo-nent selectors. These components cannot be accessed externally using component selectors. These components can only be accessed in the method implementations of the subclass.

Since all visible components in a class must have unique names, all Namespace public and protected components of all classes along an inheritance path in the inheritance tree belong to the same namespace and have unique names.

Private components, which are only visible within a class and cannot be used in subclasses, must only have unique names within their own class.

The implications of this are as follows: A superclass is not aware of any subclasses it may have. If you create a non-final class in a class library and release it for use, you can never know, as a developer, which subclasses your class will eventually have other than those you define yourself.

If you then subsequently add new components to the public or protected section of your class, and any of its sub-classes happen to have a component of its own with the same name,this becomes syntactically incorrect. Therefore, it is only secure to add private components.

In global classes, not only the external interface but also the interface with any possible subclasses must remain stable. Therefore, to limit the subclasses of a class to at least the same package, non-final classes should preferably be organized in packages for which the Package Check as Server property is activated Method Redefinition New implemen-tation Access A subclass inherits all public and protected methods additionally to its own components.

When a method is called in the subclass, it is executed in the same way it was implemented in the superclass, and even uses the private components of the superclass.

ABAP Freak Show – July 1st – ABAP OO Tutorial Part 1

However, since the main purpose of inheritance is to specialize classes, the behavior of the method of a superclass may be too general for the more spe-cific purpose of the subclass. In some cases, the implementation of superclass must be enhanced in the subclass, while in other instances, the implementation must be completely changed.

How-ever, the semantics of the method must remain stable for the exter-nal user, because all this user ever sees is the constant interface including the documentation and not the implementation itself. Instance methods can be redefined in subclasses to specialize the behavior of subclass objects. Static methods cannot be redefined. Redefining a method means creating a new implementation of the method in a subclass without changing the interface.

Previous implementations of the method in preceding superclasses remain unchanged. When a method is redefined in a subclass, an additional implementation is created, which hides the previous implementation when the subclass and further subclasses are used.

Every reference that refers to an object of the subclass uses the rede-fined method. This is always the case, regardless of the type of the reference variables. This applies in particular to the self reference me. Therefore, if a superclass method meth1 contains the call of a method meth2 belonging to the same class, which is redefined in a subclass, the call of the meth1 method in an instance of the superclass results in the execution of the original method meth2 , while the call of the meth1 method in an instance of the subclass results in the execution of the redefined method.

Object orientation OO , or to be more precise, object-oriented programming, is a problem-solving method in which the software solution reflects objects in the real world. 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.In theory, you can create any number of objects based on a single class.

An application which is interested in the details of the LION, but don't want to know about them.

In this book, you'll find:

This corresponds to an indirect method call because the calling method does not need to know anything about the possible event handlers. Lets take an example to understand abstraction. Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. Download source code to practice your skills in object cleanup and initialization, inheritance, polymorphism, and more.

ABAP supports a hybrid programming model. We respect your privacy and take protecting it seriously. Because by definition, the persistent data is the data which will be preserved beyond the run time. The concepts of inheritance and independent interfaces allow you to assign object references between reference variables of different types according to certain rules.

ALYSIA from Santa Ana
I relish reading books surprisingly. Look over my other articles. I absolutely love artistic billiards.
>