0% found this document useful (0 votes)
14 views

Object Oriented Programming

This document discusses object-oriented programming in ABAP and some key differences from Java. It notes that achieving an optimal object-oriented design is complex and recommends consulting relevant literature. While general class structure can transfer to ABAP from other languages, the depth of differences increases so detailed designs may need modification. It provides some basic recommendations for ABAP object-oriented development focusing on encapsulation, modularization, static classes, inheritance, references and local types.

Uploaded by

AlyDeden
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Object Oriented Programming

This document discusses object-oriented programming in ABAP and some key differences from Java. It notes that achieving an optimal object-oriented design is complex and recommends consulting relevant literature. While general class structure can transfer to ABAP from other languages, the depth of differences increases so detailed designs may need modification. It provides some basic recommendations for ABAP object-oriented development focusing on encapsulation, modularization, static classes, inheritance, references and local types.

Uploaded by

AlyDeden
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Object-Oriented Programming

Achieving an optimal object-oriented design is not an easy task and this is not the subject of
these programming guidelines. It is definitely worth consulting the relevant literature for this
topic. The rules below are limited to basic recommendations (for making source codes easier to
understand and maintain) and ABAP specifics on working with global and local classes.
Developers who have experience with object-oriented development in other programming
languages should be aware of the differences between ABAP Objects and Java:

In Java, all superior data objects (especially container variables such as strings) are
modeled using classes. By contrast, ABAP provides very powerful, predefined types.
Besides the predefined ABAP strings, internal tables are also provided that are used for
structured data storage. These tables represent the most powerful ABAP type. Therefore,
it is generally not beneficial to implement own container types using ABAP classes.

Java reaches a high processing speed for methods, by using optimizations and JIT
compilation. In ABAP, however, the high processing speed is primarily attained using
very powerful and complex individual statements. This is another reason why
implementing own container classes is usually not beneficial. Direct access to a suitable
internal table, for example, is always faster than handwritten access logic in ABAP.

Of course, you can transfer algorithms and a general class structure to ABAP, from an
application written in another object-oriented programming language. However, the greater the
depth, the greater the differences. Therefore, you need to make appropriate modifications, in
order to transfer a detailed design in a different language to ABAP Objects.

Encapsulation

Modularization

Static Classes and Singletons

Inheritance

Class References and Interface References

Local Types for Global Classes

Instance Constructor

You might also like