What's a user exit in SAP?

The SAP user exit defined and discussed.

Could you please explain what a user exit is and why it is implemented in SAP?

Userexits are places in the SAP standard code that are designed to insert code by the customer. It happens often that some values are set by default by SAP but are not appropriate for the business. In a user exit (or enhancement) you can correct this.

Let's say you are in a sales order and have dimension specified. Before saving, you need to determine the weight according to an own algorithm. Or you have your own credit check rules, so before saving you block the order when needed. This code could be found in a user-exit.

There are now four generations of userexits.

  1. generation: these are FORM routines within the code, usually named "userexit…. " that can be filled with own code.
  2. generation: these are special function calls that are invoked with "CALL CUSTOMER_FUNCTION"; they are defined with transaction SMOD and activated with CMOD.
  3. generation: they are called BAdI -- Business Add-in -- and use ABAP dynamic classes instead function calls. They are handled via SE18/SE19 and normally placed in the code via a static method call to class CL_EXIT_HANDLER.
  4. generation: there is a new concept announced for the NetWeaver 2004s that consolidates all userexits in a common framework.

Dig Deeper on SAP integration