Comprehensive ABAP Turtorials for Newbies.

Published: 28th June 2011
Views: N/A

ABAP Tutorials on Knowledge ABAP Objects

Depending on your existing understanding of procedural programming with ABAP, we'll reveal the object-oriented strategy and motivate you to work with it. The main emphasis might be on explanation. At this stage, it can be crucial to introduce you into the matter and its ideas, to ensure we could construct on this expertise later on. For now, it would not make feeling to try to argue a conclusive situation for or versus the object-oriented method. Ahead of you can make a professional judgement, you will want to acquire to learn all object-oriented ideas and their rewards and disadvantages. Regardless of whether this sort of choice is created inside your group or by your progress manager, you need to be able to lead for the discussion.

As we can see in the programming language Simula 67, object-oriented programming was designed at approximately the identical time because the logical
and procedural programming models. Prior to now, COBOL and, earlier mentioned all, the procedural programming product as expressed in languages like C or Pascal ended up dominant in enterprise software progress. Before ABAP, SAP originally applied a macro assembler. Even today, many developers nonetheless have a lot more expertise with procedural programming than object-oriented programming. Consequently, this introduction to object-oriented programming also employs references to the procedural product in its explanations.

ABAP was designed using the intention of bettering reporting. It absolutely was created comparatively independently being an in-house programming language, while it was influenced by other programming languages like COBOL and PASCAL. ABAP/4 was then extended to form ABAP Objects. Hence, ABAP Objects unites object-oriented and procedural factors in a single programming language. With the object-oriented portion, only those object-oriented concepts that had proved their worth for enterprise application progress in other languages, this kind of as Java, C++, and Smalltalk, had been adopted. ABAP Objects, like ABAP/4 just before it, also has some exclusive, very beneficial ideas.

Info and capabilities usually are kept separate from the procedural programming product. World-wide variables for the plan generally consist of the info, even though subroutines consist of the functions. Basically, every last subprogram can entry just about every variable. Which means that the programming product alone doesn't assistance steady access to some associated components in the info.

A regular procedural ABAP system consists of sort definitions and data declarations, which explain the framework in the data the system employs when it is actually executed. Modularization models (by way of example, subroutines or purpose modules) could be encapsulated. Nevertheless, within the most important program stage, there is no distinctive protection for that global information objects. Any variables is often accessed by any implies.

Every time a operate module is called in the main program, its function group is loaded in to the inner session. The purpose group remains active till the key system is finished. The primary method as well as perform groups that were known as in it are all saved in separate memory spots. Whether or not their info objects hold the very same names, they can be not shared. You could only call the operate modules on the purpose groups from your most important
system. In turn, the operate modules can access another parts ?

in particular the global info ? on the function groups. In other words, it's not at all attainable to entry the operate group's global data right from the principal program. Encapsulation also incorporates the concept which the implementation of a support is often concealed from the system's other components, to ensure that these cannot and do not must make assumptions concerning the inner position of your modularization unit. By doing this, the design and style of those other components will not be dependent on a distinct implementation of the other modularization units. For that reason, a purpose group is often a unit of data and functions that manages this data. Encapsulated access to data and providers ? among the list of lots of concepts of the object-oriented programming product ? can therefore be supported in the procedural part of ABAP Objects. This meant that BAPIs can be implemented as function modules and Organization Objects might be implemented as function groups.

The fictional perform group S_VEHICLE offers a user or client together with the services INC_SPEED, DEC_SPEED, and GET_SPEED. These services will be the operate group's interface and access the world-wide info object Speed, which belongs on the whole purpose group.

Should the principal program is to work with numerous autos, this is certainly not feasible devoid of excess programming and administrative energy. Most of all, an individual particular auto could possibly no extended be represented by a whole purpose group.

The potential for building a number of runtime cases inside of a capsule for every system context is among the important traits of object-oriented programming. With this illustration, four vehicles were made, all of which have different characteristic cases. Nonetheless, they all reveal the same info framework, exactly the same selection of capabilities, and also the ability to defend their info against entry from outside.

Much like the operate groups, the objects may also be saved inside the same internal session as the program that is definitely becoming employed. Furthermore, all info regions are separated from each other and are hence secured.

You may get extra ABAP Tutorials at ERP Database on ABAP Tutorials here.

Report this article Ask About This Article


Loading...
More to Explore