0% found this document useful (0 votes)
167 views43 pages

Enhancement Framework: Olivia Suarez

This document provides an overview of SAP enhancement frameworks, including user exits, customer exits, source code enhancement, function group enhancement, class enhancement, and BADIs. It describes the different enhancement types and how to implement enhancements using various technologies like source code plug-ins, function module parameters, and class methods. The document also reviews the switch framework for activating and deactivating enhancements.

Uploaded by

cha108224027088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views43 pages

Enhancement Framework: Olivia Suarez

This document provides an overview of SAP enhancement frameworks, including user exits, customer exits, source code enhancement, function group enhancement, class enhancement, and BADIs. It describes the different enhancement types and how to implement enhancements using various technologies like source code plug-ins, function module parameters, and class methods. The document also reviews the switch framework for activating and deactivating enhancements.

Uploaded by

cha108224027088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Enhancement Framework

Olivia Suarez
Agenda
• Overview
• User Exits
• Customer Exits
• Enhancement Technologies
– Source code enhancement
– Function group enhancement
– Class enhancement
– BADI
• Switch Framework
Enhancement
• Customizing - defining system behavior through standard SAP
provided mechanism without coding
• Enhancement - adding custom code at strategic hook positions
provided by SAP
• Modification - modifying SAP supplied code directly – often
called Core-Mod

• Enhancement Types:
– Program Exit -> to implement additional or alternative functions
– Menu Exit -> to include an additional menu entry with customer functions
in an SAP screen
– Screen Exit -> to include additional fields in an SAP screen
User Exit
• ‘User-Exit’ is one of the very first mechanisms provided by
SAP to execute custom code in between the standard SAP
control flow.
Customer Exit
• ‘Customer-Exit’ is better than the user-exit, in the sense
that it is implemented using Function Modules and so has a
well defined parameter interface.
Source Code Enhancement
• This is to be used whenever enhancement needs to be
incorporated directly into the ABAP source code. This
technology is also called as Source Code Plug-In.
– Implicit enhancement option -> placed at certain points in the SAP
program and they are not explicitly provided by SAP Development
– Explicit enhancement option -> provided by SAP Development

• In order to implement any of these Source code


enhancements, you need to be in the ‘Change
Enhancement mode’ (the spiral icon ).
Source Code Enhancement
Source Code Enhancement
Source Code Enhancement
• Implicit Enhancement Option/Point
Enhancement options are automatically available at certain
pre-defined places. Some of the implicit options are:
– At the end of all the programs
(Includes, Reports, Function pool, Module pool, etc.)
– At the beginning and end of all FORM subroutines
– At the end of all Function Modules
– At the end of all visibility areas of local class
Source Code Enhancement
• Implicit Enhancement Option/Point (cont’d)
– To view all the implicit options available in a source
code:
choose ‘Edit -> Enhancement Operations -> Show
Implicit Enhancement Options’
– To implement implicit enhancements:
position the cursor on any of these implicit points and
choose ‘Create Implementation’ from the menu.
Source Code Enhancement
• Implicit Enhancement Option/Point (cont’d)
Source Code Enhancement
• Implicit Enhancement Option/Point (cont’d)
Source Code Enhancement
• Explicit Enhancement Option
– Enhancement-Point
Option to insert source code in SAP programs, function
modules, and methods
– Enhancement-Section
Option to replace source code in SAP programs, function
modules, and methods.
When the Enhancement-Section is implemented, only the
implementation gets executed and the original code
doesn’t get executed. The replaced SAP source code is
enclosed by the statements ENHANCEMENT-SECTION and
END-ENHANCEMENT-SECTION.
Function Group Enhancement
• All application function modules (BAPI) can be enhanced by
adding parameters to the standard function module
interface. These parameters must be ‘optional’ in nature,
since adding a mandatory parameter will require all calls to
be changed.
• Any function module that is part of the Central Basis cannot
be enhanced.
Function Group Enhancement
• Compatible enhancements for a BAPI are:
– New optional fields in structures, if these are added to the end
of a structure.
– New optional parameters.   

• Incompatible enhancements for a BAPI are:


– Changes to the field length.
– Changes to the field type.
– Inserting a field within a structure.
– Deleting parameters and fields.
– Adding new mandatory fields or mandatory parameters. 
Function Group Enhancement
Function Group Enhancement
Class Enhancement
• You can enhance the components of a global class or global
interface by:
– Inserting new attributes and methods
– Inserting new, optional formal parameters for methods
– Adding the implementation of a pre and/or post method for
an existing method of a class.
A pre-method is called directly after the call of the existing
method before the first statement.
A post-method is called after the last statement of the
existing method before ENDMETHOD.
Class Enhancement
Class Enhancement
BADI
• The Business-Add-In technology represents a modern
enhancement technology for SAP developers who want to
provide the option to branch to customer functions in their
programs.
• This was the first object-oriented way to enhance the ABAP
system.

– Classic BADI -> implemented purely at the ABAP Workbench level


– Kernel BADI -> implemented at the ABAP language level
BADI
• Classic BADI
BADI
• Classic BADI
BADI
• Kernel BADI
– To improve performance
– To implement filter concept
– To use option to inherit attributes from sample
implementations
– To integrate into a new Enhancement Framework
BADI
• Kernel BADI
BADI
• Kernel BADI
BADI
Steps for Defining BADI (SE18):
1. Go to transaction SE18 and create an Enhancement Spot.
2. Create a BADI Definition. Enter the description of the
definition.
3. Enter the name of the interface.
4. Double click on the interface and Enter the name of the
method you want to create.
5. Click the Parameters pushbutton to create parameters for the
method.
6. Save and Activate.
Steps for Defining BADI

1.

2.
Steps for Defining BADI (cont’d)

3.

4.

5.
BADI
Steps for Creating a BADI Implmentation (SE19):
1. Double click on Implementation. Enter the Enhancement
Name.
2. Enter the name and description of the implementation. Press
enter.
3. Double click on the method name. Write the processing code.
4. Save and Activate.
Steps for Creating a BADI Implementation

1.

2.
Steps for Creating a BADI Implementation (cont’)

3.
BADI
• Multiple-Use BADI
Any number of Implementations can be created for a
multiple-use BADI. There can be more than one active
implementations of such BADI.
– Can Use Importing as well as Changing Parameters
– Order in which BADI implementations are called cannot be
controlled technically.
– Chances that changing parameter of one implementation can
be overwritten by other implementations.
BADI
• Filter-Dependent BADI
– Implementation can differ based on the filter value.
– An Implementation of BADI Definition should exist for
each filter value.
– More than one Filter value can refer to same
implementation.
Switch Framework
• Switch Framework is used to create switches and to assign
packages, screen elements and menu entries to them.
Business functions are used to group these switches.
• Transaction SFW5 is used to activate and deactivate
business functions.
• Switch Framework is also used to activate and deactivate
enhancement implementations
Switch Framework
Switch Framework
Creating, assigning, activating/deactivating Switch:
1. Define a switch (SFW1)
Switch Framework
Creating, assigning, activating/deactivating Switch:
2. Assign packages to a switch (SFW1)
Switch Framework
Creating, assigning, activating/deactivating Switch:
3. Define a business function (SFW2)
Switch Framework
Creating, assigning, activating/deactivating Switch:
4. Assign switch to a business function (SFW2)
Switch Framework
Creating, assigning, activating/deactivating Switch:
5. Activate/deactivate business function (SFW5)
Other References
• To find User Exits and Customer Exits
Adobe Acrobat
Document

• To find BADIs
Microsoft Office
Word Document
Thank you

The End.

You might also like