To streamline processes, ensure data integrity, and minimize errors in mySAP CRM, many companies incorporate business rules into business transaction processing. While SAP offers various ways to implement these business rules, such as Business Add-Ins, they may not meet all of your requirements. In these cases perhaps the event handler can do the trick.
The event handler is a table-driven framework incorporated into mySAP CRM to control business transaction processing. It registers function modules that the system executes at certain points in standard mySAP CRM code processing. You can execute these function modules repeatedly, so they are referred to as callback functions.
Object function entries represent an additional customizing step to assign a function module to an object. Such entries serve as additional filtering on which function modules should execute for which objects.
Imagine that during a mySAP CRM implementation, you are asked to configure the system to prevent it from saving a sales order for a blocked sold-to party or from creating orders for expired or cancelled contracts. After some investigation through the IMG, you determine that no configuration exists to meet these requirements, so you think about adding custom development.
Business Add-Ins (BAdIs) can handle some requirements, but what can you do in situations when they cannot? Fortunately one tool at your disposal is the event handler. With the event handler, you set the system to execute function modules at specified points during business transaction processing for objects such as the header, items, partners, and dates. Before I go into some practical examples of when to use the event handler, let me briefly introduce you to it.