Skip to end of metadata
Go to start of metadata
Introduction

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

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.

3 Comments

  1. Unknown User (s2li9ig)

    I'm a newbie who has read some dicussions on the New Enhancement Frameworkooking  but still clueless. I'm looking at BADI_CATSTCO_ADD_DATA and Enhancement Spot ES_CATSTCO_BADI and would like to know how I can insert code so I can manipulate data in CATSCO. Is there a step by discription available for this?

    Thanks,

  2. Anonymous

    Hello Thomas,

    I am creating an enhancement implementation in ECC6.0 version of SAP using SE19 under the Enhancement spot radio button. I am also activating my class method and getting the desired functionality.

     My main problem lies with the understanding between the classic badi's and Kernel-badi's. The condition mentioned above relates to the same concept as classic badi as per my understanding.

     It would be very helpful if you would clear my confusion as what could be the differentiating factor for use of Kernel badis as compared to the classic badis - Is it performance or what?

    I have understood the concept of enhancement spots via source code implementation - explicit and implicit.

    Best regards,

    Harsh Dave

  3. Your link for "What the New Enhancement Framework Is For - Its Basic Structure adn Elements For Beginners" is no longer working.  I have noticed that it is broken on all pages where I have seen it.  Thanks.