Enhancements
Enhancements
Enhancements
s
BY ----Sirish
Overview
Enhancements:
It is a concept by which we add extra code to the standard sap
software without modifying it is called enhancement.
Each enhancement point is called as exit point.
Types of enhancements
User exits
Customer exits
Badi’s
Enhancement spots
User exits
user exits :
These are subroutines where we can write our custom code to
enhance the application.
Technically, these are called as modifications .
We need sap access key for user exits, that is why these are called
as modifications.
These are available only in sd module.
Each user exit will start with userexit_xxxx.
Ex :- perform userexit_xxxx.
Form userexit_xxxx
End form.
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 4
Overview
Customer exit:- These are zinclude programs which are available
inside a fuction module.
Each function module is called as customer exit.
Technically these are called as enhancement, we don’t require any
access key.
Customer exits are available in all modules.
There are four types of customer exits.
Function module exit
Menu exit
Screen exit
Field exit (absolete now).
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 5
Overview
Function module exit:-
This exit is used when we want to write custom coding to enhance
the standard sap application.
Each function module exit will have a predefined signature
i.e importing and exporting parameters.
Based upon the importing and exporting parameters write the
custom code.
Each function module exit will have a zinclude.
Double click and create the zinclude and write your abap code.
Each function module exit will start with Exit_xxxx_001
Menu exit:-
This exit is use to add custom menus to the standard menu bar.
Each menu exit is identified by ‘+’ symbol.
Double click on the ‘+’ symbol and create the custom menu.
Every menu exit should have a function module exit to add the abap
coding for the custom menu options.
A menu exit is use to add custom menu and function module exit is
use to add the abap logic for the corresponding menu exit.
Screen exit:-
This exit is use to add custom sap screen to the standard sap
screen is called screen ecit.
All the screen exits will be of type subscreen.
Each subscreen is identified by screen no
Double click on the screen no and create a screen of type
subscreen.
Each screen exit will have a function module exit to write the abap
code for the custom screen.
Field exit:-
This is exit is use to change the standard field labels of input fields
on sap screen. This are absolete in sap.
Sap does not support this.
Project
Project:-
The project is a group of enhancements.
Each enhancement is group of exits i.e.function module exit,
screen exit, menu exit.
A project must be created so that the enhancements which are
available under a project will move into active state and then our
coding will be executed .
Note:
A project is group of enhancements but each enhancement cannot
be linked to more than one project.
CMOD is the transaction to create a project.
SMOD is the transaction for searching the enhancement exits.
Basically we have three ways to search for a exit.
Using call customer function
Using SMOD tcode.
Using se84 tcode.
Using call customer function
Go to se93.
Give the tcode name
Ex:- xd01.
Click on display
Double click on the program name.
Click on the find button .
A pop up is displayed.
Give the string as call customer.
Select radio button in main program
Press enter.
Double click on main program name and continue until
the call customer functions are displayed.
Ex:- call customer fuction ‘001’.
Exporing
------
Table
-------
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 18
Overview
Double click on 001
Again double click on 001
The function module exit will displayed.
Check the signature.
If it is suitable , write the abap code in the zinclude
program.
Step1:- Frst we have to find out the package name for transaction.
Step2:- Go to smod transaction and find the enhancements using
the package name.
Step3:- some times we can find the enhancements using the
description, application component also in smod transaction.
Step1 in detail :
Go to se93
Give a tcode name
Ex:-xd01.
Click on display.
Note down the package name. Ex:- FBD
Double click on the enhancement name.
The list of the function module exit, menu exits, screen exits will be
displayed.
Go to se84.
Expand enhancement folder.
Expand customer exit folder.
Double click on enhancements.
Give the package name FBD.
Click on execute.
The list of the enhancement will be displayed.
Go to transaction code va03
Click on SYSTEM status.
A pop up is displayed .
Double click on the program name.
Click on the binoculars button..
Give the string as userexit.
Select the redio button in main program and press enter.
Give the main program name and press enter.
Continue the process until you find out the user exits.
Ex:- perform userexit_save_doccument_prepare.
Ex:- perform userexit_save_doccument.
Ex on user exits
Ex on MENU Exit
Ex on SCREEN Exit
Ex on FIELD Exit
BADI’S :
It is another way of implementing enhancements to the
standard programs with out modifying the original code.
Badi’s are implemented using oo programming
technique
Technically a badi is nothing but an interface.
Each badi consists of the method with out
implementation called as badi definition.
We need to create classes to write the abap code by
implementing the methods called as badi
implementation.
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 39
Overview
Se18 is the tcode for badi definition.
Se19 is the tcode for badi implementation.
The interface name for a badi will be as below.
Ex:- IF_EX_<BADI NAME>
The class name for a badi will be as below.
Ex:- ZCL_EX_<IMPLEMENTATION NAME>
Advantages of BADI’S
Types of BADI’S
Types of BADI’S:
Single implementation badi.
Multiple implementation badi.
Filter badi.
Custom badi (Not used/Rarely used)
Properties of BADI’S
Find the package name for a transaction code
Go to se84.
Expand enhancement folder.
Expand business add ins folder.
Double click on the definition.
Give the package name.
Click on execute.
Ex:- give the package name as VA.
Click on execute.
The list of badi’s are displayed.
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 53
Ex1 on BADI :
Filter BADI