Enhancement Framework Vgsh Ku Enhancement Framework The Enhancement

  • Slides: 19
Download presentation
Enhancement Framework Vιgиєsh Kuмαя

Enhancement Framework Vιgиєsh Kuмαя

Enhancement Framework �The Enhancement Framework enables you to add 2 functionality to standard SAP

Enhancement Framework �The Enhancement Framework enables you to add 2 functionality to standard SAP software without actually changing the original repository objects, and to organize these enhancements as effectively as possible. �With this new technology you can enhance global classes, function modules, Web Dynpro ABAP components, and all source code units using implicit enhancement options provided by the system. �An application developer can also define additional explicit enhancement options for source code plug-ins and new kernel-based BAd. Is, which are also integrated in this new framework. 12/13/2021

Previous Concepts �Modifications – changes to development objects delivered by SAP with or without

Previous Concepts �Modifications – changes to development objects delivered by SAP with or without the Modification Assistant �Enhancements – inserting user developments into SAP development objects at predefined positions using customer exits, appends, includes, and classical Business Add-Ins (BAd. Is). �The new Enhancement Framework is intended to integrate the existing enhancement and modification concepts, to replace and improve some of them, and to add some new ones to address recent developments like Web Dynpro, for example. 3 12/13/2021

Initial Settings �To be able to enhance repository objects, the software component they belong

Initial Settings �To be able to enhance repository objects, the software component they belong to should have the property Modifiable , Not modifiable, enhanceable only. �For details about setting this property, use Setting the System Change Option. 4 12/13/2021

Integration �The main tool for performing enhancements is the Enhancement Builder, which is integrated

Integration �The main tool for performing enhancements is the Enhancement Builder, which is integrated in the ABAP Workbench. �The enhancements can be switched using the Switch Framework. �An enhancement takes effect when the package in which the above enhancement components are defined is assigned to a switch of the Switch Framework, and this switch is not deactivated. 5 12/13/2021

Modifications and Enhancements �In contrast to modifications, with the new technology it becomes possible

Modifications and Enhancements �In contrast to modifications, with the new technology it becomes possible to have enhancements on different development levels, for example: �core development �application development �add-on development �customer development 6 12/13/2021

It is possible to create multiple enhancement implementations on different layers or to replace

It is possible to create multiple enhancement implementations on different layers or to replace an enhancement implementation 7 12/13/2021

Enhancement Framework �The basic idea of Enhancement Framework is to make modification-free enhancements of

Enhancement Framework �The basic idea of Enhancement Framework is to make modification-free enhancements of development objects such as programs, function modules, global classes, and Web Dynpro components. �All these technologies and the new kernel-based BAd. I are now integrated in one Framework. 8 12/13/2021

Enhancement Framework Features �Enhancements of existing development objects on different levels - for example,

Enhancement Framework Features �Enhancements of existing development objects on different levels - for example, in an industry solution, in the IT department of the customer, and finally in a customer's company. �Better upgrade support �Switching of enhancements with the Switch Framework �Support for grouping enhancements and appropriate tool support for documentation. 9 12/13/2021

Enhancement Options For Modification-Free Enhancements � The basic concept is the enhancement option. �

Enhancement Options For Modification-Free Enhancements � The basic concept is the enhancement option. � Think of an enhancement option as a hook where you 10 can attach the enhancement implementation elements to. � If an SAP system provides these hooks, you can add an implementation element there at later stages of development in other system, without modifying the original SAP code. � This is possible because enhancement implementation elements are in a package of their own and transport objects in their own right. � This way, you avoid all the trouble with modifications that stems from the fact that modifications are, from a technical point of view, part of the compilation unit 12/13/2021 they modify.

Explicit and Implicit Enhancement Options � Principally, there are two types of enhancement 11

Explicit and Implicit Enhancement Options � Principally, there are two types of enhancement 11 options: � The developer of the corresponding development object must insert the options of one kind into the coding so that enhancements can be done there at a later time. � These preconceived enhancement possibilities are called explicit enhancement options. � You can perform enhancements on implicit enhancement options without the developer of the appropriate compilation unit having to do anything. � Enhancement options are always available in programs, global classes, function modules, and includes. � In other words, the implicit enhancement options are for free, provided by the framework, while the explicit 12/13/2021 ones need to be inserted explicitly, as the name

Explicit Enhancement Technologies �There are two types of explicit enhancement options: �Enhancement points allow

Explicit Enhancement Technologies �There are two types of explicit enhancement options: �Enhancement points allow you to insert source code plug-ins. �These are additional code lines that, if they exist, are executed there additionally. �Explicit enhancement options of the type Enhancement Section behave in the same way the only difference being that the source code plug-in replaces the section in the original code. 12 12/13/2021

�Business Add-Ins (BAd. Is) are "hooks" for object 13 plug-ins. �A BAd. I definition

�Business Add-Ins (BAd. Is) are "hooks" for object 13 plug-ins. �A BAd. I definition comprises an interface with methods. �BAd. Is are enhanced by classes that implement the BAd. I interface. �If you instantiate a BAd. I and then call its methods, you can, among other things, specify which method implementations are to be carried out on the basis of filter values. �In other words, a BAd. I method call is a dynamic method call with a specified interface, for which it is not determined until runtime which method 12/13/2021 implementations are to take place.

Implicit Enhancement Technologies � Implicit enhancement options are fixed points in compilation units -

Implicit Enhancement Technologies � Implicit enhancement options are fixed points in compilation units - that is, points that remain intact even if the code is changed � You can always insert source code plug-ins before the first and after the last line of includes, methods, reports, and function modules. � You can always add further optional parameters to function modules. � For global classes, there are different permanent, implicit options for enhancements: You can insert additional attributes or methods, and you can add optional parameters to existing methods. 14 12/13/2021

Enhancement Framework – Function Module �Way to enhance the Function module to have additional

Enhancement Framework – Function Module �Way to enhance the Function module to have additional logic. �Functional enhancement can also be used for adding additional optional parameters in the FM Signature. �Enhance the Function Module logic �Function module logic enhancement is achieved via Source code enhancements. �There are couple of implicit enhancement points available in every FM. � These enhancement options can be implemented to enhance the functionality of the FM 15 12/13/2021

To implement the enhancement point in the FM: 1 Display the FM in SE

To implement the enhancement point in the FM: 1 Display the FM in SE 37 2 Make sure you are in the Source Code of the FM, Tab Source Code 3 From menu Select Function Module > Enhance Source Code 4 Select menu Edit > Enhancement Operations > Show implicit Enhancement 5 Once you see the implicit points, you can implement the implicit enhancement 16 12/13/2021

Enhancements to global classes �Definition �The enhancements to global classes and 17 interfaces can

Enhancements to global classes �Definition �The enhancements to global classes and 17 interfaces can be separated into: � 1. Enhancements to the source code of methods, local classes, and so on – these enhancements are carried out by means of ABAP Source Code Enhancements. v No source code enhancements are allowed within interface sections and class sections. v The only exception are implicit enhancement options at the end of types. � 2. Enhancements to components of classes and interfaces 12/13/2021

Enhancements to Components of Classes and Interfaces �Inserting new attributes �Inserting new optional formal

Enhancements to Components of Classes and Interfaces �Inserting new attributes �Inserting new optional formal parameters to existing methods (but no new exceptions) �Adding the implementation of a pre and/or post method for an existing method of a class �Adding the implementation of an overwritemethod for an existing method of a class �Inserting new methods. 18 12/13/2021

SAP Structure � The Enhancement Framework enforces some structure on both the enhancement options

SAP Structure � The Enhancement Framework enforces some structure on both the enhancement options and the enhancement implementation elements. � An enhancement option has to be part of an enhancement spot, while an enhancement implementation element has to be part of an (simple) enhancement implementation. � Enhancement spots and implementations serve as containers that can themselves be part of composite enhancement spots and composite enhancement implementations respectively. � Those composite containers can be nested, and, this way, developers can build a complex structure that mirrors enhancement projects, organizational aspects, topic structure of the content etc. 19 12/13/2021