In SD various includes, such as MV45AFZZ are available for customer code. These includes contain empty FORM routines (user exits) where you put your code, thus altering the functionality in that area.
An include with the empty FORM is delivered with a release and subsequent changes to these component structures are no longer allowed by SAP. This ensures that the FORM routine is not overwritten by a subsequent upgrade.
User exits have no defined interface, i.e. Whatever variables are available to you at the time of the FORM call are available to be changed. With this flexibility comes great risk. Knowing the sequence of how things are processed is critical for using the right user exit.
When you use user exits for adjustments you must be very careful. When you use user exits, we highly recommend that the functions you developed yourself should be programmed "switched", so when a problem occurs you can restrict whether it is caused by modifications in the user exit or if the problem is on SAP side.
Changes to user exits in SD are MODIFICATIONS, since the original of an object belongs to SAP (thus when you change a user exit an SSCR registration is also required).
Unlike the user exits described above, customer exits have a defined interface, that is you can only transfer certain fields to the interface and you can also only change certain fields in a customer exit. In addition, customer exits can be activated and deactivated and thus they can be "switched". With the activation of a project an object is created with the original on customer side, thus it is no modification but a customer-specific enhancement. When you use customer exits, you therefore do not need an SSCR registration either. If available you should use customer exits.
You can develop customer-specific routines with Transaction VOFM for application areas like, for example, conditions of pricing, output determination, data transport routines to copy quotations after sales order, sales order after delivery.
These routines are stored in Customizing of every application area (pricing, output determination, and so on), that is enhancements with VOFM can be activated/deactivated. SAP also delivers certain functions by VOFM.
For SAP routines and customer-specific routines, there are separate namespaces (for details see Note 356737). Customer-specific VOFM routines also lie in the SAP namespace and must be assigned to an SAP development class (see Note 326560) that is, for customer-specific VOFM routines also SSCR registration must be carried out. As in SD user exits, in VOFM routines many fields and tables are available, thus the VOFM routines can be used very flexible and also highly critical. For the use of CUSTOMER-SPECIFIC VOFM routines the statements on the responsibility for enhancements by the customer, made for the user exits, apply (for example, maintenance responsibility, problems during upgrade). What you should take into account when you use VOFM routines is for example described in Note 156230.
Note that these routines are not processed in the BAPI_SALESORDER_CREATEFROMDAT2 BAPI.