Menu

SAP: Difference Between Customer Exit and User Exit

2016-10-30       

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.

Recommended Now

Fire TV Stick Lite Essentials Bundle

This bundle contains Amazon Fire TV Stick Lite and Mission USB Power Cable. The USB power cable eliminates the need to find an AC outlet near your TV by powering Amazon Fire TV directly from your TV's USB port. Includes special power management circuitry that enhances the peak power capability of the USB port by storing excess energy and then releasing it as needed.

Check it out on amazon.com →

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.

  1. Open transaction SE80 in SAP ERP.
  2. 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.

  1. 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 …”.
  2. Screen Exits – can be used to include additional fields on a screen
  3. Menu Exits – use those to add your own menu items in SAP standard programs or transactions
  4. 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:

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 ;)

Further Reading

Here’s some more information on the topic: