- Enhancement Options For Modification-Free Enhancements
- Explicit and Implicit Enhancement Options
- Container and their Structure in the Enhancement Framework
- Links to Further Material
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 BAdI are now integrated in one Framework that has the following 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.
Enhancement Options For Modification-Free Enhancements
The basic concept is the enhancement option. Think of an enhancement option as a hook where you 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 they modify.
Explicit and Implicit Enhancement Options
Principally, there are two types of enhancement 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 ones need to be inserted explicitly, as the name indicates.
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.
- Business Add-Ins (BAdIs) are "hooks" for object plug-ins. A BAdI definition comprises an interface with methods. BAdIs are enhanced by classes that implement the BAdI interface. If you instantiate a BAdI 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 BAdI method call is a dynamic method call with a specified interface, for which it is not determined until runtime which method implementations are to take place.
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.
Container and their Structure in the Enhancement Framework
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.
Links to Further Material
An enhancement option can never live alone. It is always part of an enhancement spot in the way as there is no such thing as a method that does not belong to a class. For developers, this means that when developing a BAdI they need a spot that the BAdI is part of. On the one hand this assures that each enhancement option can profit from the benefits of the Enhancement Framework. On the other hand, this means that a developer cannot just create a BAdI, but has to be familiar with the container structure of the Enhancement Framework. Working with the Enhancement Framework presupposes good knowledge of its structure. A more detailed introduction can be found in a weblog series on this framework. This series focuses on the technology of the Enhancement Framework, while the series on the use cases gives an outline of the way the Enhancement- and Switch-Framework is used. You should read the first series, if you want to use the Enhancement Framework, maybe implement or define a BAdI or work in a context with a lot of enhancements. The second series is the right one for you if you want to get to know the basic ideas of the Enhancement- and Switch-Framework, understand more about the motivation behind it and what switching is good for, if you have heard about the re-integration of the SAP Industry Solution into the ERP core or the Enhancement Package Strategy of SAP ERP and do not know what this really means. If are really interested in the whole topic start with the second series and the go on with the first one. This way, you work your way outside in.
Weblog Series on the Technology of the Enhancement Framework
- What the New Enhancement Framework Is For - Its Basic Structure and Elements For Beginners: This weblog explains what the new Enhancement Framework is for thereby telling the basic advantages of enhancements over modifications. After reading it, you will understand that the basic structure underlying this framework is simple and straightforward: An enhancement option and its implementation element. This weblog also conveys an idea of why the framework as a whole needs some complexity if it should enable you to structure, organize and manage all the different enhancements in a system.
- The new Enhancement Framework Part 2 - What Else You Need to Know Before Building an Enhancement: This weblog provides some more background knowledge on the new Enhancement Framework. Both weblogs together provide all the information a developer needs before starting to define and implement an enhancement.
- How To Define a New BAdI Within the Enhancement Framework - Part 3 of the Series: This weblog shows how to define a new BAdI in the new Enhancement Framework. You learn how to create a BAdI with the respective tools in the ABAP Workbench, how to use the relevant commands in ABAP and how to provide a default class for a BAdI.
- How to implement a BAdI And How to Use a Filter - Part 4 of the Series on the New Enhancement Framework: In this weblog you learn, how to create a BAdI implementation,how to add a filter to a BAdI definition, how to create a filter condition in a BAdI implementation, and the relevant ABAP code to use a filter when calling a BAdI.
- Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework: In this weblog you learn in which cases it is useful for you to define an enhancement option, if you are a developer outside of SAP. You will understand, in which cases source code enhancements should be your first choice, though, of course, BAdIs are the enhancement technology that SAP recommends in general. So much for the theory. The weblog also shows to define an enhancement point, how to implement it and how to replace an existing implementation. For those still not completely familiar with the structure of the Enhancement Framework, there is again the structure of the entities involved in defining an enhancement point and creating a source code plug-in that implements this enhancement point.
Weblog Series: The Three Use Cases of the Switch- and Enhancement Framework
- The Three Use Cases of the Enhancement and Switch Framework - Part 1: Overview of the Use Cases and the Advantages of Enhancements Over Modifications Learn about the exciting opportunities that the three most important use cases of the Enhancement and Switch Framework offer to you. In part 1 of this weblog series you get to know these use cases from a high level perspective: enhancements instead of modifications, all SAP Industry solutions developed in one system, and the Enhancement Packages of SAP ERP 6.0. And you will understand the basic advantage of enhancements over modifications in some detail.
- The Three Use Cases of the Enhancement and Switch Framework - Part 2: Why One Enhancement in General Needs Other Enhancements Developing enhancements is different from normal development. In this weblog I exlain why even a very small enhancement project requires many enhancements and how the different enhancements interact. You will understand all this by going through an improvement of the example given in weblog one of this series.
- The Three Use Cases of the Enhancement and Switch Framework - Part 3: How to Implement an Enhancement OptionIn this weblog you learn in a step-by-step description how simple it is to replace the implementation of a method by an overwrite method using the Enhancement Framework. The idea is to give you an outline of the procedure, and not to focus on details.
- The Three Use Cases of the Enhancement and Switch Framework - Part 4: The Many Ways to Enhance a SAP Application With the New FrameworkWith the new Enhancement Framework you get plenty of options to enhance SAP development objects for free. In this weblog you get to know all these so-called implicit Enhancement Options and you understand the difference between them and the explicit Enhancement Options.
- The Three Use Cases of the Enhancement- and Switch-Framework - Part 5: The Basics about SwitchingThis weblog tells you all the basic facts about switching with the new Switch Framework. You will both understand how it technically works and what the motivation for switching is.
- The Three Use Cases of the Enhancement- and Switch-Framework - Part 6: The Re-Integration of the SAP Industry Solutions into the ERP Core What is the Re-integration of the SAP Industry Solutions into the ERP core, What are its benefits for the customer, and how is it realized by means of the Switch- and Enhancement Framework? These are the questions that are answered in this weblog.
- The Three Use Cases of the Enhancement and Switch Framework: Part 7 - The Enhancement Package Strategy of SAP ERP 6.0The Enhancement Package Strategy of ERP 6.0 is a new way to get new functionality: You can stay on one stable release and install and activate optional portions of functionality on top of your application just as you like. This weblog gives you an introduction to this strategy and explains how the optional activation is empowered by the Enhancement- and Switch-Framework.
How to Get the Most From the Enhancement and Switch Framework as a Customer - Tips from the Experts
How to proceed when adapting SAP development objects and how to use the Enhancement and Switch Framework best when you want to adapt a SAP application as a customer or partner? This blog gives you guidance on how to do this best and it explains you also why you should proceed this way by summarizing the main benefits of the new framework and its advantages over classic modification technology.