Documente Academic
Documente Profesional
Documente Cultură
Even though SAP Standards are widely followed all over Customer requirements makes it imperative to
make changes in the SAP Objects to suit the customer needs.SAP allows the user to change the system
accordingly to implement user specific functionality.
Methods by which these changes can be brought about can be broadly classified into three.
1. Enhancements
2. Modifications
3. Customer Development
Before the enhancement concept existed, customers who wanted to add their own specific functions to
SAP software had to modify the standard SAP programs. Such modifications are implemented using
USER-EXITS. These are implemented in the form of subroutines and hence are also known as FORM
EXITs. The user exits are generally collected in includes and attached to the standard program by the
SAP. All Userexits start with the word USEREXIT_...
FORM USEREXIT_
z..
ENDFORM.
The problem lies in finding the correct userexit and how to find it if one exists for the purpose. Once the
correct userexit is found the necessary customer code is inserted in the customer include starting with the
‘z’ in the form routine. Modifying SAP's software holds at least two dangers:
The enhancement concept offers a better alternative to the problem-ridden modification approach.
Enhancements represent user requirements that have not been developed in the standard software.
Instead SAP provides options with which changes can be made in the repository to implement the user
specific in the standard without affecting the existing functionality. Such changes are upward compatible
as the standard software and the calling methods are predefined and won’t change in future versions
.Enhancements can be implemented using BADI’s ,Customer Exits etcetera.
Customer Exits
To extend the existing functionality of the current system one has to take advantage of the exits
available within the standard application. They do not affect the standard code. The codes and screen
generated are encapsulated as separate objects. They are upward compatible. Here the biggest challenge
for the user is identifying the enhancement which would serve his purpose.
[EXPORTING <parameters>]
[IMPORTING <parameters>]
[CHANGING <parameters>]
[TABLES <parameters>]
[EXCEPTIONS <exceptions>].
Which calls function module EXIT_<program name>_<3 digit suffix> (where <program name> is the
program which calls the customer function).
Notes:
Sometimes, SAP uses directly CALL FUNCTION statement because the exit needs to be called
from 2 different programs.
Screen exits refer to areas of a main screen reserved by SAP developers for customers to design their
own screens as customer exits. In these areas you can display enter your own data. SAP creates screen
exits by placing special sub screen areas within a standard R/3 screen and calling a customer SAP creates
screen exits by placing special sub screen areas within a standard R/3 screen and calling a customer sub
screen from within the standard dynpro's flow logic. The sub screen screen is called in the processing
logic of the main screen with the instruction ‘Call CUSTOMERSUBSCREEN’.This call is inactive and
will be skipped when the screen is processed until the customer has activated the relative enhancement
screen.
As seen in the above diagram screen exits enable the user to add features like extra fields to the
standard SAP screens.
Defining screen exits.
From the above figure its clear how data is transferred between the main screen and customer specific
sub-screen and processed.
2. Menu Exits
Menu enhancements allow customers to link their own processes to menu options. For this purpose,
SAP has reserved certain menu options so that customers can define their own text and react to user
selections in function exits. When the enhancement is included in a project and activated by the customer,
menu enhancements are visible in the transaction. If the user chooses this menu option, either the function
provided by the applications developer is executed, or the system branches to a function exit and the
For SE38 transaction in the initial screen we have in the UTILITIES menu ‘+CUS’ which is under
the enhancement SEU00002 for which a menu-exit can be created by including it in a project.
Screenshot before enhancement.
Double click on the function module name and follow it with double clicking on the include.
Write the new code inside that include. After that activate and go back to the components screen.
Double click on the function code for the menu exit enhancement. Type in the text to be displayed in
the menu.
Go to the main screen and activate the project.
Field exits are branches from a screen field with a data element reference into a function module.
Field exits can be selected globally or selectively. Field exits allow you to create your own programming
logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or
business-related processing for any screen field. They are of 2 types
Global Field Exits are not limited to one screen. If you use the data element on multiple screens, you will
branch to a function module from all these screens once the exit is activated.
Local field exits are valid for one screen only. If you assign the screen of a specific program to the data
element, then you will branch to a function module only from this screen after activation.
From 4.6c onwards, Field exits were no longer supported by SAP. They removed the function of field
exit but they had given lot of flexibility through user exit.
Function exits allow the customer to implement additional logic in a transaction. The SAP application
developer determines the points in a transaction at which function exits are called, and which data is to be
transferred. He creates the appropriate function modules with short text, interface and documentation.
Function module exits play a role in both menu and screen exits. When you add a new menu item to a
standard pull down menu, for example, you can use a function module exits to define the actions that
should take place once your menu is activated. Function module exits also control the data flow between
standard programs and the fields created within dynpro exits.
SAP application developers create function exits by preparing calls to customer functions within standard
R/3 programs. These calls have the following syntax: CALL CUSTOMER-FUNCTION 'XXX'. Where
‘XXX’ is a 3-digit number.
Go to transaction CMOD
Create a project
Go to the Enhancement screen, and enter the Enhancement code which contains the user exit.
Note that an enhancement can only be used in 1 project.
Go to the Components screen (where the available customer exits are displayed). Double click on
the one you want to implement.
Now the function module is displayed, double click on the include ZX..., SAP displays a warning
that this include will be created
Activate the include program. Go back to CMOD and activate the project.
One has to note that a SAP enhancement can be included only in one project at a times and for the
changes to take effect the Add-On project has to be activated.