Professional Documents
Culture Documents
20 Enhancements in SAP
20 Enhancements in SAP
20 Enhancements in SAP
SAP is a ERP software in which all standard business applications are delivered, some times
customer may need to add additional functionality to the existing applications based on customer
business requirements.
Enhancements concept
The enhancement is a concept of adding your own functionality to SAP's standard business
applications without having to modify the original applications. To modify the standard SAP
behavior as per customer requirements, we can use enhancement framework.
Initially SAP implemented enhancements in the form of User Exits and these are only available in
SD module, user exits are implemented in the form of subroutines and hence are also called as
FORM EXITS, User exits are empty subroutines that SAP developers have provided for you, you
can add your own source code in the empty subroutines.
Customer Exits
These are one type of enhancements that are available in some specific programs, screens and
menus within standard SAP Applications. These are Function Modules with a custom empty
include program, you can add your own functionality in these include programs.
Customer Exits are available in all SAP modules, where as user exits are only available in SD
module.
All customer exits ( Function Modules) starts with CALL CUSTOMER word.
User Exits in SAP
Enhancing SAP standard applications using user exits
These are implemented in the form of subroutines and hence are also known as FORM EXITs.
The user exits are generally attached to the standard program by the SAP.
User exits are a type of system enhancement that was originally developed for the R/3 SD (Sales
and distribution) module.
User-exits are empty subroutines that SAP Developers have provided for you.
You can fill them with your own source code. Technically this is a modification.
Examples:
- In User exits MV45AFZZ(Sales Order Exit), we have subroutine
USEREXIT_PRICING_PREPARE_TKOMK
USEREXIT_PRICING_PREPARE_TKOMP
This user exit can be used to move additional fields into the communication table which is used
for pricing. TKOMK for header fields and TKOMG for item fields. The fields which are not in either
of the two tables KOMK and KOMP cannot be used in pricing.
SAP creates customer exits for specific programs, screens, and menus within standard
applications. These exits do not contain any functionality. Instead, the customer exits act as
hooks. You can hang your own add-on functionality onto these hooks.
Customer exits are nothing but a include in customer name space will be provided in the function
module which starts with CALL CUSTOMER. You can fill them with your own source code.
Technically this is an enhancement. User exits generally refer to SD module while customer exits
refer to all modules like MM, SD, PP, FICO etc.
- Customer exits are not available for all programs and screens found in the SAP System. You
can only use customer exits if they already exist in the SAP System.
3. Menu exits.
Format: CALL CUSTOMER-FUNCTION '910' The naming standard of function modules for
function module exits is:
Allow customer to add fields to a screen via a sub screen in an SAP program. The sub screen is
called within the standard screen's flow logic. For this we need to implement FM Exits/Menu Exits
to write the logic for Screen Exits . All screen exits will be subscreens.
3. Menu exits:
Menu exits allow you to add your own functionality to menus. Menu exits are implemented by
SAP and are reserved menu entries in the GUI interface. The developer can add his/her own text
and logic for the menu.
Function codes for menu exits all start with "+". Format: +CUS (additional item in GUI status)
Project: It is an SAP Object which contains list of Enhancements. A project must be created for
each enhancement so that the corresponding exits in an enhancement will be in active state.
VA01, is a t-code used for creating sales order, to find customer exit for VA01, go to t-code VA01,
system, status.
A pop up will open, you can find the program name, copy the program name and go to SE38,
display ( simply double click to go to program source ).
A pop up will open, search for the word CALL CUSTOMER in main program.
You will find the list of Function Modules with the word CALL CUSTOMER.
Double click on function module CALL CUSTOMER-FUNCTION '911', you can see a include
'INCLUDE ZXOIKU46', that`s where you can implement your own functionality .
User exit real time business
example SAP
Business Requirement: When ever business user creates a delivery order, the
standard SAP application dose not check for storage location (whether it is space
or not ), if it is space it should raise a error message.
VL01 is the t-code for creating a deliver order, this uses standard SAP program SAPMV50A, the
standard program don`t check for storage location equal to space or not.
As per the requirement we need to find a suitable userexit for this and we need add additional
code to check storage location.
Technical information : Storage location field is LGORT and it is available in LIPS table.
To implement the userexit for this we need to follow the below steps.
You'll have to roughly decide which is the correct userexit routine to used. So, For my
requirement I used the below user exit.
Now go to table LIPS, display, get a deliver no and go to VL02N (T-code for changing deliver
order), provide delivery order no and enter.
Implement userexit
To implement userexit we need access key from SAP, when we get access key from SAP, write
below code inside from.
Technical requirements:
Tcode is : XD01/ XD02/ XD03.
Country Field is : LAND1 .
To implement the Customer exit for this we need to follow the below steps.
Based on requirement, Check Import/Export Parameters for each Function Module And roughly
select some Customer Function Modules .
As per this requirement, we need KNA1 Table details, So we can use the below Customer
Function Module which has an exporting parameter I_KNA1.
Double click on Function module name and put the break point .
Stop the Debugging and now implement the Functional Module Exit. As this exit is triggered, this
is the suitable Functional Module Exit for our requirement.
Create Project in CMOD to implement customer exit.
Go to T-code CMOD (Project Management), provide a project name, create.
To implement we need to provide enhancement name but we don`t have enhancement name, we
just have customer exit name, now we need to find enhancement name.
Follow the below steps to find enhancement for a customer exit.
All the enhancements for customer exits will be stored in MODSAP table, we can get
enhancement name by using our customer exit.
Get Function module name from customer exit, double click on CALL CUSTOMER FUNCTION
'001'.
Not down the Function Module name, go to SE11, provide table name MODSAP, display,
contents and provide enhancement/member as EXIT_SAPMF02D_001, execute.
You will find the enhancement name for the function exit.
Now go to CMOD and to project ZXD01_EX and click on enhancement assignments and add
enhancement as SAPMF02D, enter and click on components.
You will find Function module name, double click on function exit.
You will find a include inside the function module, double click to create and add your own code.
Go to XD02 .
Enter a Customer
User exit is implemented in the form of a A customer exit can be implemented as:
Subroutine i.e. PERFORM xxx.
PERFORM userexit_save_document_prepare. Function exit
Screen Exit
Menu Exit
User Exit Customer Exit
Field Exit
In case of a PERFORM, you have access to You have access only to the importing,
almost all the data. So you have better control, but exporting, changing and tables parameter of
more risk of making the system unstable. the Function Module. So you have limited
access to data.
You need Access Key for User Exit. You do not need access key.
Changes are lost in case of an upgrade. Customer exits came later and they
overcome the shortcomings of User Exit.
User Exit will be activated automatically when ever To activate a function exit, you need to create
you activate the application(program). a project in CMOD and activate the project.