Customer exit in the SAP ABAP system is a feature that allows users to add custom functionality to SAP applications. It is a pre-defined point within an SAP program where a customer can add their own code. This code is executed in addition to the standard SAP code, allowing the customer to modify or enhance the standard SAP functionality.
Customer exits are used to modify the functionality of an SAP application without modifying the SAP standard code. This means that any modifications made using customer exits will not be overwritten during system upgrades or patches.
In order to implement a customer exit, the user needs to write the code using a programming language such as SAP ABAP. The code is then attached to the relevant customer exit point in the SAP application.
Types of Customer Exit in SAP
There are 4 different types of customer exits in SAP, including:
- Function exits: This type of customer exit allows customers to add their own functionality to a standard SAP function module.
- Menu exits: This type of customer exit allows customers to add their own menu options to an SAP menu.
- Screen exits: This type of customer exit allows customers to add their own fields to an SAP screen.
- Field exits: This type of customer exit allows customers to add their own validation rules to an SAP field.
Uses of Customer Exit in SAP
Here are a few uses of customer exits in SAP:
1) Customer Exit for Sales Order:
This customer exit allows users to define their own data fields and screens for the sales order entry and display transactions (VA01/VA02/VA03). It is commonly used to add custom fields for sales order headers or item data.
2) Customer Exit for Purchase Order:
This customer exit allows users to add their own logic to the purchase order creation and change transactions (ME21N/ME22N/ME23N). It is commonly used to add custom fields for purchase order headers or item data.
3) Customer Exit for Billing Document:
This customer exit allows users to define their own data fields and screens for the billing document creation and display transactions (VF01/VF02/VF03). It is commonly used to add custom fields for billing document headers or item data.
4) Customer Exit for Material Master:
This customer exit allows users to define their own data fields and screens for the material master maintenance transactions (MM01/MM02/MM03). It is commonly used to add custom fields for material master data.
5) Customer Exit for Vendor Master:
This customer exit allows users to define their own data fields and screens for the vendor master maintenance transactions (XK01/XK02/XK03). It is commonly used to add custom fields for vendor master data.
Locating Customer Exits
Please follow the steps below to locate customer exit in SAP
Execute t-code SMOD in the SAP command field
Next enter the enhancement name as shown in the image below
Now select the Component of the radio button and click on Display button
How to Create Customer Exit?
Please follow the steps below to create customer exit:
Execute t-code CMOD in the SAP command field
Next enter a Project name and click on Create button to create a project
Now enter the project description and other details
Click on Save button to save the project.
A message Attribute of STE saved will be displayed on the bottom of your screen.
Now click on the Enhancement assignement button.
Next enter the Enhancement code which contains the customer exit.
Next click on the Save button to save the configurtions
Next click the Component button navigate to Components screen (where the available customer exits are displayed).
Now the function module is displayed, double click on the include ZX..., SAP displays a warning that this include will be created
Insert the ABAP code into the include
Activate the include program.
Now go back to CMOD and activate the project.