8/10/2019 Chapter 02_Enhancement Framework
1/64
IBM Global Business Services
IBM Corporation 2013July 2009
SAP Enhancement Framework A Great Way ofEnhancing the SAP Code
8/10/2019 Chapter 02_Enhancement Framework
2/64
IBM Global Business Services
IBM Corporation 20132 Enhancement Framework July 2009
Learning Objectives
Understand the fundamental idea of the Enhancement Framework and SwitchFramework (available in SAP NetWeaver 2004s)
Reduce TCO by using enhancement technologies instead of modifications
Enhance SAP standard objects and understand how Enhancement definitionsare created
8/10/2019 Chapter 02_Enhancement Framework
3/64
IBM Global Business Services
IBM Corporation 20133 Enhancement Framework July 2009
Enhancement Framework in SAP NetWeaver
8/10/2019 Chapter 02_Enhancement Framework
4/64
IBM Global Business Services
IBM Corporation 20134 Enhancement Framework July 2009
Adapting SAP
One of the advantages of SAP software is the possibility to adapt the software of own requirements and
the possibility of keeping the adaptations during upgrade.
Ways of adaptations:
1. CustomizingConfigurations done in SAP (T Code SPRO)
2. EnhancementAdditional Customer Requirements typical for a client and which is not available
in Standard SAP
3. ModificationsChanging the Standard SAP Code to enhance the code to add new
functionalities.
8/10/2019 Chapter 02_Enhancement Framework
5/64
IBM Global Business Services
IBM Corporation 20135 Enhancement Framework July 2009
Modification vs. Enhancement - Motivation
Disadvantages of Modifications 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)
Advantage of Enhancements
Enhancing objects instead of modifying them reduces the effort of adjustment
during Service Pack import or upgrade.
In ECC 6.0 Enhancement Functionality becomes more flexible and easier. ECC
6.0 introduces a new facility on enhancement called Enhancement Point.
8/10/2019 Chapter 02_Enhancement Framework
6/64
IBM Global Business Services
IBM Corporation 20136 Enhancement Framework July 2009
Evolution of SAP Enhancement Technology
8/10/2019 Chapter 02_Enhancement Framework
7/64
IBM Global Business Services
IBM Corporation 20137 Enhancement Framework July 2009
Source Code Plug-in
Implicit
Enhancement
Explicit
Enhancement
Source Code Plug-in
8/10/2019 Chapter 02_Enhancement Framework
8/64
IBM Global Business Services
IBM Corporation 20138 Enhancement Framework July 2009
Implicit Enhancement vs. Explicit Enhancement
Implicit Enhancement Option
At common enhancement places, implicit Enhancement options are
available.
Examples:
End of Executable Program, Include, Function group, Dialog module
Begin/End of Form routine / Function module / Method
End of a structure
End of Private/Protected/Public Section of a local class
Explicit Enhancement Option
Predefined enhancement options can be defined in source code.
They are additionally stored inside Enhancement Spots.
8/10/2019 Chapter 02_Enhancement Framework
9/64
IBM Global Business Services
IBM Corporation 20139 Enhancement Framework July 2009
Enhancement - Relations
8/10/2019 Chapter 02_Enhancement Framework
10/64
IBM Global Business Services
IBM Corporation 2013July 2009
Implicit Enhancements
8/10/2019 Chapter 02_Enhancement Framework
11/64
IBM Global Business Services
IBM Corporation 201311 Enhancement Framework July 2009
Step 1 - Activate the enhancement functionality
Using SE80 open the program/include you want to enhance and click on the enhancement button or
press or go to Program > Enhance
8/10/2019 Chapter 02_Enhancement Framework
12/64
IBM Global Business Services
IBM Corporation 201312 Enhancement Framework July 2009
Step 2 - Enhancement functionality activated
The SE80 screen will now look something like below. Menu add new buttons for Enhancement.
8/10/2019 Chapter 02_Enhancement Framework
13/64
IBM Global Business Services
IBM Corporation 201313 Enhancement Framework July 2009
Step 3 - Show implicit enhancement points
Go to menu Edit->Enhancement Operations->Show Implicit Enhancement Optionsto display implicit
enhancement points within the ABAP code
8/10/2019 Chapter 02_Enhancement Framework
14/64
IBM Global Business Services
IBM Corporation 201314 Enhancement Framework July 2009
Step 4 - Enhancement points with the code
Once you have done this, you will be able to see all the implicit enhancement points available within your
code, these are denoted by the line of quotation marksand the black arrow at the start.
8/10/2019 Chapter 02_Enhancement Framework
15/64
IBM Global Business Services
IBM Corporation 201315 Enhancement Framework July 2009
Step 5 - Create an implicit enhancement point
In order to implement an implicit enhancement point simply right click on the required enhancement point
and select Enhancement Implementation> create.
8/10/2019 Chapter 02_Enhancement Framework
16/64
IBM Global Business Services
IBM Corporation 201316 Enhancement Framework July 2009
Step 6 - Enhancement point type
Next click on the Codebutton to create a code implementation.
8/10/2019 Chapter 02_Enhancement Framework
17/64
IBM Global Business Services
IBM Corporation 201317 Enhancement Framework July 2009
Step 7 - Name and description
Next give the enhancement point a name and description. Click the green tick.
8/10/2019 Chapter 02_Enhancement Framework
18/64
IBM Global Business Services
IBM Corporation 201318 Enhancement Framework July 2009
Step 8Package information
Once you click the green button, it will ask for Package. Enter the package name and click to Save button.
8/10/2019 Chapter 02_Enhancement Framework
19/64
IBM Global Business Services
IBM Corporation 201319 Enhancement Framework July 2009
Step 9 - Change request
Next assign the Transport number.
8/10/2019 Chapter 02_Enhancement Framework
20/64
IBM Gl b l B i S i
8/10/2019 Chapter 02_Enhancement Framework
21/64
IBM Global Business Services
IBM Corporation 201321 Enhancement Framework July 2009
Summary
Implicit Enhancement is present in SAP standard program mostly in belowmentioned places.
End of Executable Program, Include, Function group, Dialog module
Begin/End of Form routine / Function module / Method
End of a structure End of Private/Protected/Public Section of a local class
IBM Gl b l B i S i
8/10/2019 Chapter 02_Enhancement Framework
22/64
IBM Global Business Services
IBM Corporation 201322 Enhancement Framework July 2009
Enhancement Spot
Implementation of Enhancement
IBM Gl b l B i S i
8/10/2019 Chapter 02_Enhancement Framework
23/64
IBM Global Business Services
IBM Corporation 201323 Enhancement Framework July 2009
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.
One enhancement spot can manage several enhancement options of a
Repository object.
Conversely, several enhancement spots can be assigned to one enhancementoption.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
24/64
IBM Global Business Services
IBM Corporation 201324 Enhancement Framework July 2009
How to Find an Enhancement Spot
8/10/2019 Chapter 02_Enhancement Framework
25/64
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
26/64
IBM Global Business Services
IBM Corporation 201326 Enhancement Framework July 2009
Double click to display the enhancement object
The Enh Spot by the name ES_LV61A501 is present.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
27/64
IBM Global Business Services
IBM Corporation 201327 Enhancement Framework July 2009
Create Enhancement
Click on Enhance Icon (Spiral)
Click on the Ehnancement Spot ES_SAPLEINK and in Enhancement
Implementation Click on Create
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
28/64
IBM Global Business Services
IBM Corporation 201328 Enhancement Framework July 2009
Create Enhancement (Cont.)
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
29/64
IBM Global Business Services
IBM Corporation 201329 Enhancement Framework July 2009
Create Enhancement Implementation
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
30/64
IBM Global Business Services
IBM Corporation 201330 Enhancement Framework July 2009
Enhancement is created in SAP
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
31/64
IBM Global Business Services
IBM Corporation 201331 Enhancement Framework July 2009
Code Logic
Write your code, save and activate. An active version of the Enhancement iscreated
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
32/64
IBM Global Business Services
IBM Corporation 201332 Enhancement Framework July 2009
Exercise
Create an Explicit Enhancement Spot Implementation Save and activate
Check if the Enhancement is created or not
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
33/64
IBM Global Business Services
IBM Corporation 201333 Enhancement Framework July 2009
Function Group Enhancement - Technology
Function Group Enhancements allows adding new optional parameters to existingfunction modules
Transaction SE37
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
34/64
IBM Global Business Services
IBM Corporation 201334 Enhancement Framework July 2009
Create Enhancement
Go to SE37 and select a Function Module Click on the Function Module Menu
Click on Enhance Interface
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
35/64
IBM Corporation 201335 Enhancement Framework July 2009
Create Implementation and Add New Parameter
Create Enhancement Pop Up box comes, click on Create Icon
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
36/64
IBM Corporation 201336 Enhancement Framework July 2009
Run Function Module and check new parameter
Save and Activate Test the changes
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
37/64
IBM Corporation 201337 Enhancement Framework July 2009
Exercise
Go To SE37 Enhance a Function Module Interface
Save and activate
Execute to Test
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
38/64
IBM Corporation 201338 Enhancement Framework July 2009
Class/Interface Enhancements
Class/Interface Enhancements allow addition of: optional parameters to existing methods
methods
events and event handlers
references to interfaces
Exits to existing methods Pre-ExitCalled at the beginning of a method
Post-ExitCalled at the End of a method
Overwrite-ExitReplaces the original method
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
39/64
IBM Corporation 201339 Enhancement Framework July 2009
Add new method and parameters
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
40/64
IBM Corporation 201340 Enhancement Framework July 2009
Kernel BAdi Technology
What are BAdIs? Business Add-Ins
is an anticipated point of extensionthese points act like
sockets and exist in the original coding
has a well-defined interface in contrast to source code plug-ins
and is therefore more stable to changes in the original codingKernel BAdIs - New Features
Are integrated directly in the ABAP Language/Runtime
Improved filter support allows non-character filter types
(packed, numeric, string) and complex filter conditions
Enable reusable implementation instances (Stateful BAdI) Control of the lifetime of implementations (BAdI-context)
Allow for inheritance of implementations
Can be switched by the Switch Framework
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
41/64
IBM Corporation 201341 Enhancement Framework July 2009
Comparison: Usage of Old BAdIs vs. new BAdIs
Classic and new BAdIs differ in a number of features that are important formigration:
BAdI object
With classic BAdIs, a BAdI object is created by calling a factory method, and
referenced via a reference variable of the type of the BAdI interface.
With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas ahandle for the calls of BAdI methods, and referenced via a reference variable of
the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which
otherwise is invisible to the outside.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
42/64
IBM Corporation 201342 Enhancement Framework July 2009
Passing comparison values for the filter
With the classical BAdIs, the filter values are stored in a structure and passedwith the call of the BAdI methods.
With the new BAdIs, the comparison values for the filters used to search for
implementations are passed when the BAdI object is created with the GET BADI
statement.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
43/64
IBM Corporation 201343 Enhancement Framework July 2009
Calling BADI Methods
Passing comparison values for the filterA classic BAdI can be called only once and the call positions are registered
centrally.
With new BAdIs, multiple calls are possible and the call positions are not
registered centrally.
For the above reasons, an automatic call migration is not possible.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
44/64
IBM Corporation 201344 Enhancement Framework July 2009
Transaction SE18
Go to SE18 There are two options available in the BAdi Builder
Enhancement Spot
BAdi Name
Give a BAdi name and click the button Display
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
45/64
IBM Corporation 201345 Enhancement Framework July 2009
BADI Definition
Display the BAdi Check the Enhancement
spot to which the BAdi
is migrated
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
46/64
IBM Corporation 201346 Enhancement Framework July 2009
Create a BAdi Enhancement
Give the BAdi Name and from the menu select Enhancement Implementation Create
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
47/64
IBM Corporation 201347 Enhancement Framework July 2009
Implementation
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
48/64
IBM Corporation 201348 Enhancement Framework July 2009
Save and Activate the BAdi
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
49/64
IBM Corporation 201349 Enhancement Framework July 2009
Sample Code in method PROCESS_ITEM
8/10/2019 Chapter 02_Enhancement Framework
50/64
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
51/64
IBM Corporation 201351 Enhancement Framework July 2009
Check Enhancement via SE18
Go Back to SE18 and give the BAdi Name in the Enhancement Spot RadioButton
Click Display Button
Expand the BAdi Definition, you can see the implemented Enhancement
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
52/64
IBM Corporation 201352 Enhancement Framework July 2009
Exercise
Create a BADI Enhancement Implementation in SE18 Create a method
Activate the Implementation
Check it in SE18
Reconfirm the Implementation in Enhancement Spot Display in SE18
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
53/64
IBM Corporation 201353 Enhancement Framework July 2009
Custom BAdi Migration
Automatic migration from BAdI Builder (SE18)
SE18Utilities Migrate Classical BAdi (Cntrl+F3)
Specify Enhancement Spot for BAdI Definition
Specify Enhancement Implementation for BAdI Implementation
Benefits
No special knowledge necessary
Effort: approximately 5 minutes per BAdI.
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
54/64
IBM Corporation 201354 Enhancement Framework July 2009
Overview
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
55/64
IBM Corporation 201355 Enhancement Framework July 2009
Switch Framework
Goal of Switch Framework: Control visibility of repository objects at runtime through
switches
The Switch Framework can be used to
Switch on industry solutions / Enterprise Add-ons
Develop new functions without affecting existing ones
Enhance delivered systems at partner and customer site in the
context of the enhancement framework with own functions
8/10/2019 Chapter 02_Enhancement Framework
56/64
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
57/64
IBM Corporation 201357 Enhancement Framework July 2009
Switchable Objects
By package assignment Appends, SI-, CI-includes for structures in DDIC
Fixed value appends to domains
Secondary Indexes
Append Search Helps
Enhancement Implementations
Switch Business Configuration Sets ( Switch BC-Sets)
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
58/64
IBM Corporation 201358 Enhancement Framework July 2009
Switchable Objects
By direct assignment Screen elements & Flow logic
Menu entries & functions
IMG nodes
Customizing
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
59/64
IBM Corporation 201359 Enhancement Framework July 2009
SFW1
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
60/64
IBM Corporation 201360 Enhancement Framework July 2009
SFW2
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
61/64
IBM Corporation 201361 Enhancement Framework July 2009
SFW3
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
62/64
IBM Corporation 201362 Enhancement Framework July 2009
SFW5
Industry Solutions Tcode -SFW5
Select a function and activate it
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
63/64
IBM Corporation 201363 Enhancement Framework July 2009
Switch Framework: Architecture
IBM Global Business Services
8/10/2019 Chapter 02_Enhancement Framework
64/64
Links
Please visit the following web links for more detailshttp://help.sap.com
http://sdn.sap.com
http://help.sap.com/http://sdn.sap.com/http://sdn.sap.com/http://help.sap.com/Top Related