Enhancements & Modifications
1
Introduction
▪ Enhancements - We enhance the SAP functionalities in customer namespace (name
should start with Z or Y).
▪ Modifications - We enhance the SAP functionalities in SAP namespace(name should not
start with Z or Y).
2
Types of Enhancements and Modifications
▪ The various types of enhancements and modifications are as follows:
Implicit and Explicit enhancements - Enhancement
Customer Exit - Enhancement
BADI (Business Addin’s) - Enhancement
User Exit - Modification
3
Implicit Enhancements
▪ In case of implicit enhancements, implicit point is available at the starting or at the last
of the program, sub routines, function modules etc.
▪ We create the implicit implementation using these implicit points.
4
Explicit Enhancements
▪ In case of explicit enhancements, enhancement-point and enhancement-section are
available at any line.
▪ We create the explicit implementation using these enhancement-point and
enhancement-section.
▪ Enhancement spot is the container for the enhancement-point and enhancement-
section.
5
Enhancement-Point and Enhancement-Section Comparison
▪ Enhancement-Point does not have default implementation whereas Enhancement-
Section has default implementation.
▪ With the help of Enhancement-Point we can only add additional codes, we cannot
replace the existing code whereas with the help of Enhancement-Section we can change
or replace the existing code.
6
Customer Exit
▪ Customer exit is an enhancement. We enhance the SAP functionalities in customer
namespace.
▪ There are 3 types of customer exit.
1. Function Module exit/Function exit
2. Menu exit
3. Screen exit
7
Function Module Exit
▪ The function module exit allows us to add our code to the SAP programs with the help
of function modules.
▪ Syntax : CALL CUSTOMER-FUNCTION 'three digit number’.
▪ The three digit number in the above syntax varies from 000 to 999.
▪ Example : CALL CUSTOMER-FUNCTION ‘001’.
8
Ways to Find a Function Module Exit
▪ Put the break-point on the statement CALL CUSTOMER-FUNCTION.
▪ Pass the package name of the program in SMOD transaction code.
(Utilities-Find-Package)
▪ Pass the package name of the program in SE84 transaction code.
(Enhancements-Customer Exits-Enhancements-Package)
9
Steps to Implement a Function Module Exit
▪ Go to transaction code - CMOD
▪ Provide a project name and click create.
▪ Click on enhancement assignment tab and provide the customer exit name.
▪ Click on components tab - It shows the various function module exits available.
▪ Double click on to required function module exit which navigates to function module.
▪ Write the logic in the Z include of that function module.
▪ Activate the project.
1
0
Menu Exit
▪ Menu exit allows us to add menu items to the menu of SAP programs.
▪ These menu items have function codes that begin with "+" (a plus sign).
▪ We can perform customer specific functionalities on these menu items.
1
1
Ways to Find a Menu Exit
▪ Check for menu items starting with"+" (a plus sign) in the menu bar.
(System-Status-GUI status-Menu Bar)
▪ Pass the package name of the program in SMOD transaction code.
(Utilities-Find-Package)
▪ Pass the package name of the program in SE84 transaction code.
(Enhancements-Customer Exits-Enhancements-Package)
1
2
Steps to Implement a Menu Exit
▪ Go to transaction code - CMOD
▪ Provide a project name and click create.
▪ Click on enhancement assignment tab and provide the customer exit name.
▪ Click on components tab - It shows the various menu exits available.
▪ Double click on to required menu exit.
▪ Provide the various information like - function text, icon, icon text and information text.
1
3
Steps to Implement a Menu Exit(Contd.)
▪ To write the code, we need to implement the required function module exit.
▪ Activate the project.
1
4
Screen Exit
▪ Screen exit allows us to add fields to the screen of SAP programs with the help of
customer subscreen.
▪ SAP provides subscreen areas within a standard screen.
▪ The customer subscreen is called within the standard screen.
▪ Syntax to call customer subscreen in to standard screen: CALL CUSTOMER-SUBSCREEN
<subscreen area> INCLUDING <program name> <customer subscreen number>.
▪ Example - CALL CUSTOMER-SUBSCREEN ‘custscr2’ INCLUDING ‘SAPLXT’ ‘2000’.
1
5
Ways to Find a Screen Exit
▪ Check in the screen flow logic for the statement CALL CUSTOMER-SUBSCREEN.
▪ Pass the package name of the program in SMOD transaction code.
(Utilities-Find-Package)
▪ Pass the package name of the program in SE84 transaction code.
(Enhancements-Customer Exits-Enhancements-Package)
1
6
Steps to Implement a Screen Exit
▪ Go to transaction code - CMOD
▪ Provide a project name and click create.
▪ Click on enhancement assignment tab and provide the customer exit name.
▪ Click on components tab - It shows the various screen exits available.
▪ Double click on the required screen exit.
▪ Create the screen and design the respective layout on the screen.
▪ Change the screen type to subscreen.
1
7
Steps to Implement a Screen Exit(Contd.)
▪ To write the code, we need to implement the required function module exit.
▪ Activate the project.
1
8
Important Points, Transaction Codes and Tables
Imp point : One customer exit can only be assigned to one project at a time.
▪ SMOD - Transaction code to find a customer exit.
▪ CMOD - Transaction code to implement a customer exit.
▪ MODSAP - Table to find a customer exit.
▪ MODACT - Table to find a project for a customer exit.
1
9
BADI
▪ BADI is an enhancement. We enhance the SAP functionalities in customer namespace.
▪ The full form of BADI is Business ADD In's.
▪ It is based upon OOPS concepts (interfaces and classes).
▪ SE18 is the transaction code for BADI definition.
▪ SE19 is the transaction code for BADI implementation.
2
0
Types of BADI
▪ There are 2 types of BADI.
1. Classic BADI.
2. New BADI (Kernel BADI).
2
1
Ways to Find a Classic BADI
▪ We can use SAP class - CL_EXITHANDLER. In this class we have the method name -
GET_INSTANCE.
▪ Pass the package name of the program in SE18 transaction code.
(Click on F4 help of BADI Name-New Selection-Package).
▪ Pass the package name of the program in SE84 transaction code.
(Enhancements-Business Addin’s-Definitions-Package).
2
2
Steps to Implement a Classic BADI
▪ Go to transaction code - SE19
▪ Choose the radio button classic BADI, pass the name of BADI definition and click on
create.
▪ Provide the BADI implementation name and description.
▪ Click on to interface tab, the name of implementing class automatically appears.
▪ Double click on the class and write the logic in the respective method.
▪ Activate the class and the BADI implementation.
2
3
Various Options of Classic BADI
▪ Multiple use - We can create multiple implementations.
▪ SAP internal - Only for SAP use.
2
4
Ways to Find a New(Kernel) BADI
▪ Put the break point on statement - CALL BADI or GET BADI.
▪ Pass the package name of the program in SE18 transaction code.
(Click on F4 help of BADI Name-New Selection-Package).
▪ Pass the package name of the program in SE84 transaction code.
(Enhancements-Business Addin’s-Definitions-Package).
2
5
Steps to Implement a New BADI
▪ Go to transaction code - SE19
▪ Choose the radio button new BADI, pass the name of enhancement spot and click on
create.
▪ Provide the enhancement implementation name and description.
▪ Provide the name of BADI implementation, implementing class and choose the
respective BADI definition.
2
6
Steps to Implement a New BADI(Contd.)
▪ Double click on the class and write the logic in the respective method.
▪ Activate the class and the enhancement implementation.
2
7
Various Options of New BADI
▪ Multiple use - We can create multiple implementations.
▪ Can only be implemented internally at SAP - Only for SAP use.
2
8
Classic BADI and New BADI Comparison
▪ We find classic BADI by using the class CL_EXITHANDLER(method : GET_INSTANCE)
whereas we find the new BADI by using the statements CALL BADI or GET BADI.
▪ In classic BADI, there is no enhancement spot whereas in new BADI, there is an
enhancement spot. Enhancement spot is the container for the new BADI definition.
2
9
Classic BADI and New BADI Comparison(Contd.)
▪ In classic BADI, there is no enhancement implementation whereas in new BADI, there is
an enhancement implementation. Enhancement implementation is the container for
the new BADI implementation.
▪ In classic BADI, the name of the implementing class automatically appears whereas in
new BADI, we need to provide the implementing class name.
3
0
User Exit
▪ User Exit are modifications. We enhance the SAP functionalities in SAP namespace.
▪ They are only available in SAP SD (Sales & distribution) module.
▪ They are available in the form of a subroutines.
▪ The most important user exits related to sales order are available in program
MV45AFZZ.
3
1
Ways to Find a User Exit
▪ Check the documentation of the program.
▪ Search for statement - PERFORM USEREXIT.
▪ Search in package - VMOD.
3
2
BTE(Business Transaction Events)
▪ The full form of BTE is Business Transaction Events.
▪ BTE is an enhancement. We enhance the SAP functionalities in customer namespace.
▪ BTE is a custom function module attach to the standard program to enhance the
functionality.
▪ BTE is applicable to FI module.
▪ The transaction code for BTE is FIBF.
3
3
Types of BTE
▪ According to interface, BTE is of 2 types
1. Publish and Subscribe interface
2. Process interface
3
4
Publish and Subscribe Interface
▪ They are also called as Informing interfaces.
▪ This type of interface do not update any application data.
▪ It is used to add additional steps to the application. Example - E-Mail functionality,
sending data to external system etc.
▪ They do not influence the standard process in any way.
▪ The custom function module which is attached to BTE does not have changing
parameters.
3
5
Process Interface
▪ This type of interface is used to update the application data.
▪ Example - Passing the default value to a field while creating a FI document.
▪ They intervene in the standard process.
▪ The custom function module which is attached to BTE has changing/exporting
parameters.
3
6
Ways to Find Publish and Subscribe Interface
▪ Search for the statement - OPEN_FI_PERFORM in the source code. For Publish and
Subscribe interface the naming convention of the function module will be
OPEN_FI_PERFORM_<BTE NUMBER>_E.
▪ Set the breakpoint in the function module : BF_FUNCTIONS_FIND
▪ Go to transaction code FIBF.
Path : Environment - Info System( P/S)
3
7
Ways to Find Process Interface
▪ Search for the statement - OPEN_FI_PERFORM in the source code. For process interface
the naming convention of the function module will be OPEN_FI_PERFORM_<BTE
NUMBER>_P.
▪ Set the breakpoint in the function module : PC_FUNCTION_FIND
▪ Go to transaction code FIBF.
Path : Environment - Infosystem(Processes)
3
8
Steps to Implement a BTE
▪ Identify the BTE.
▪ Copy the sample interface function module into a Z or Y function module.
▪ Write the code in the Z or Y function module.
▪ Save and activate the function module.
▪ Create a product and activate the product.
▪ Link the function module and the event using the product.
3
9
Tables for BTE
▪ TBE24 - Table to store the customer products
▪ TBE34 - Publish & Subscribe BTE : customer enhancement
▪ TPS34 - Process BTE : customer enhancement
4
0
Difference Between BTE and BADI
▪ BTE is applicable to SAP finance module only whereas BADI is generalized to all modules
of SAP.
▪ BTE uses function modules to enhance the functionality whereas BADI uses
OOPS(classes, interfaces, objects) concepts to enhance the functionality.
▪ BTE is only used for program enhancements, we can not enhance the user interface
elements whereas BADI is used for program enhancements as well as for enhancing the
user interface elements.
4
1
Thank You
4
2