Code Enhancement is implemented at specific points in the code of an SAP transaction. By making use of user exits, you can insert event detection code at the most logical point in a transaction. The event detection code allows for evaluation of criteria to determine whether an event is generated.
The general strategy of this mechanism is to insert your event detection code when the data for a transaction is about to be committed to the database.