A question that is asked very often by beginners in the SAP ERP world, the SAP difference between customer exit and user exit is not immediately clear, especially since the terms are very often being used interchangeably. This article shines some light on the difference between the two.
Customer Exit and User Exit are two very closely related concepts in SAP ERP. Both are planned extension points in SAP ERP and can be used to inject custom logic into standard programs without modifications.
What is a SAP User Exit?
SAP User Exits are the older concept of the two. They were the first try of SAP to provide some sort of planned extension points in the system, without customers having to modify the core routines. Originally, they were developed for the SD module of SAP R/3 and were implemented as FORM routines, which is why they are sometimes called Form Exits as well.
Here is what user exits looked like in their original form. All form routines started with the string „USEREXIT_“.
FORM USEREXIT_SOMEEXIT INCLUDE ZZUSEREXITSOMEEXIT. ENDFORM.
As a customer, you would then be able to implement your own code in the include ZZUSEREXITSOMEEXIT without having to modify the original SAP program.
How To Find SAP User Exits
Since „real“ user exits only exist in the SD module, they can be easily found with the following steps.
- Open transaction SE80 in SAP ERP.
- Select „Package“ and enter „VMOD“.
This will yield you all user exits for the SD module, including user exits for billing, pricing, sales orders and delivery. SAP has kindly included the documentation for these exits right there in the programs, so you can start coding by selecting the user exit you need and implementing it. Here’s an example:
In the User Exit MV45AFZZ (Sales Order Exit), you’ll find the form routines USEREXIT_PRICING_PREPARE_TKOMK and USEREXIT_PRICING_PREPARE_TKOMP. These can be utilized to create additional fields in the communication table used during the pricing process. TKOMK contains the header fields, while TKOMG contains the items.
What is a SAP Customer Exit?
Customer Exits in SAP ERP are quite similar to user exits. They have been developed from the original concept in the SD module and are based on Function Modules. From this original concept, several different kinds of customer exits have been deduced. Here is a list of the types – I will write a longer blog post with details on each type at a later point in time.
- Function Module Exits – this is what we’re talking about here and what is usually referred to when talking about „customer exits“ and „user exits“. They are executed with „CALL CUSTOMER-FUNCTION …“.
- Screen Exits – can be used to include additional fields on a screen
- Menu Exits – use those to add your own menu items in SAP standard programs or transactions
- Field Exits – attach custom programming logic to any data element in the SAP dictionary. These include the very-common conversion exits, e.g. to execute currently conversions.
IPRM0002 is an example of a function module customer exit. They have components, which make up the parts of the customer exit that can be used to implement your own logic. The following types of components can exist in customer exits:
- Function Modules – used for function module exits
- Function Codes – used for menu exits
- Table Includes – used to add your own fields to default tables
- Screen Areas – used in screen exits
How To Find SAP Customer Exits
Finding customer exits in SAP ERP is very easy. Open transaction SMOD and just execute the program. This will yield all customer exits that exist in your SAP system.
Summary: SAP Difference Between Customer Exit and User Exit
Let’s sum up what we know now about SAP customer exits and user exits. User Exits are the older concept, they only exist in the SD module in package VMOD. They are based on FORM routines.
On the other hand, customer exits exist all over the system – there are more than 2.000 currently. There are several types of customer exits, and customer exits can have several components to implement a variety of custom functionality in SAP ERP. Hopefully, this explains theSAP difference between customer exit and user exit and you can now brag with very detailed knowledge in front of your colleagues ;)
Here’s some more information on the topic: