Вы находитесь на странице: 1из 27

Enhancement Framework

Components Enhancement Options Explicit Enhancement Option Implicit Enhancement Option Enhancement Spots Enhancement Implementations

Enhancement Framework.ppt

Introduction to Enhancement Framework

Current options available for Enhancements User-Exits: The very first mechanisms provided by SAP to execute
custom code in between the standard SAP control flow. This is implemented as subroutine call (PERFORM xxx). A classical example for User-Exit is MV45AFZZ include in order processing module of SAP R/3.

Customer Exits: It is implemented using Function Modules and so has

a well defined parameter interface. Also since the custom coding done as part of these customer-exits is located away from the original SAP code, the maintenance is easier than user-exits. (Before 4.6, only through customer-exits)

BADIs: It exist in pre NW04s releases are now called old classicBADIs. This was the first object-oriented way to enhance the ABAP system. This, to a certain extent, allows multiple implementations with limited filter support. The classic-BADIs are implemented using ABAP Objects.

Enhancement Framework.ppt

Evolutions of SAP Enhancement Technology


Enhancement Framework.ppt

Drawbacks of previous Enhancement Techniques

No support for multiple users or projects No support for parallel developments Will appear much more often in adjustment tools Higher adjustment effort (during upgrade & SP import)


Enhancement Framework.ppt

What is Enhancement Framework

New enhancement concept in SAP. Released from SAP NetWeaver 7.0 Replace or incorporate the existing enhancement and modification concepts (solve the issues with the previous concepts). Enables the integration of different concepts for modifying and enhancing development objects. The enhancements of the enhancement concept can be switched on/off using the Switch Framework.
-7Enhancement Framework.ppt

Different components of the Enhancement Framework

The enhancement framework consists of three higher level components : Enhancement Option - Are positions in Repository objects where enhancements can be made. These options are either explicitly defined (by the developer) or exist implicitly. Enhancement Spots - The enhancement spots are used to manage explicit enhancement options. Enhancement spots carry information about the positions at which enhancement options were created. Enhancement Implementation - The enhancement implementations manage the enhancements of the enhancement options, both explicitly and implicitly.
Enhancement Framework.ppt


Enhancement Options

-9Enhancement Framework.ppt

Types of Enhancement Options

Enhancement options can be classified into two categories : Explicit Enhancement Option Are defined explicitly by the developer. Implicit Enhancement Option Always exist and do not have to specified by developer

Managed using enhancement spots

Enhanced using enhancement implementations Are of two types :
Source code plug-in Kernel BADI (or new BADI)

No enhancement spots are needed

Enhanced using Enhancement Implementations Are of three types :
Specific options in programs Parameter interfaces of function modules
Enhancement Framework.ppt

Methods of classes
- 10 -

Enhancement Spots

- 11 Enhancement Framework.ppt

What are Enhancement Spots

Enhancement spots are created to manage explicit enhancement options An explicit enhancement option is always referenced using spot name and option name An enhancement spot can contain multiple enhancement options An enhancement option can be assigned to multiple enhancement spots. A composite enhancement spot can hold multiple simple enhancement spots. Spots are always provided by the application developer No spots are required for implicit enhancement options

- 12 -

Enhancement Framework.ppt

Enhancement Implementation

- 13 -

Enhancement Framework.ppt

What is an Enhancement Implementation

Used to manage enhancements Enhancement Implementations are created by the customer An enhancement can/must be a part of only one enhancement implementation An enhancement implementation can contain multiple enhancements An individual enhancement inside an implementation is known as an enhancement implementation element. An enhancement implementation element for a explicit enhancement option must be associated with an enhancement spot. A composite enhancement option can contain multiple simple enhancement options.

- 14 -

Enhancement Framework.ppt

Representation of Spot and Implementation

- 15 -

Enhancement Framework.ppt

Explicit Options

- 16 Enhancement Framework.ppt

Source Code Plug-in

The following enhancement options are available in the source code:

Enhancement - Point
Can be static (data declaration) or dynamic (coding). Used as a place holder to place additional coding. Can belong to multiple enhancement spots Multiple active implementations possible and will be executed with no guarantee in the order of execution.

Enhancement Section
Can be static or dynamic Used to modify / replace a certain section of code. Only one is active at a time. Can belong to multiple enhancement spots. Implementation gets executed and the original code does not gets executed.
Enhancement Framework.ppt

- 17 -

Source Code Plug - in Editor Modes

Creating enhancement options Use the Change mode for creating enhancement points or sections
Use the button to switch between change display modes

Implementing enhancement options Use the Enhancement mode to create implementations

Use the button to get into the enhancement mode.

Use the

button to leave the enhancement mode.

- 18 -

Enhancement Framework.ppt

Demos for Explicit Enhancement Options

Demo for Enhancement Point

Demo for Enhancement Section:





- 19 -

Enhancement Framework.ppt

BADI Enhancement Option

What are BADIs ?
Business Add Ins Is an anticipated point of exception these points act like sockets and exist in the original coding has well defined interface in contrast to source code plug-ins and is more stable to changes in the original code

Kernel BADIs New Features

Can be switched by switch framework

Integrated directly in the ABAP language runtime

Improved filter support (non-character filter types) Enable Reusable Implementations Stateful BADI Control lifetime of Implementations BADI-Context
Enhancement Framework.ppt

- 20 -

BADI Enhancement Option - Comparison

The new BADI has several advantages over the classic BADIs Classic BADI New BADI

- 21 -

Enhancement Framework.ppt

Demo for Kernel BADI


of Enhancement Spot fro BADI


of Enhancement Implementation for BADI


of the BADI from the program

- 22 -

Enhancement Framework.ppt

Implicit Options

- 23 Enhancement Framework.ppt

Source code (Specified points) options :

These are enhancement options at predefined points in a program :

At the end of an Include

At the end of a private, public or a static section of a class At the end of an implementation for a class

At the end of an interface definition

At the end of structure definitions At the start of a procedure (Subroutine, Method, Function) At the end of a procedure At the end of parameter set of a method (Changing, Importing, Exporting) Demo for Implicit Enhancement of Subroutine
Enhancement Framework.ppt

Implicit enhancement options always exist and no enhancement spot is assigned to them.
- 24 -

Parameter Enhancement Option

The parameter enhancement option provides an option to add new parameters to a function module interface The parameters are always optional. The added parameters can be utilized by making other enhancement implementations in the source code. Demo for Parameter enhancement option for Function Module

- 25 -

Enhancement Framework.ppt

Class Enhancement Option

Using the class enhancement options you can : Add new methods to a class / interface Add new attributes (Public / Private / Protected) Add pre or post methods to an existing method

Demo for Class Enhancement Option

- 26 -

Enhancement Framework.ppt

Copyright 2008 Deloitte Development LLC. All rights reserved.