Skip to Content
Author's profile photo Deepika Chandrasekar

How to create Call Back/ Event Handler Function Modules

Hi All,


This blog is about how to create and register the Event handler Function modules for our own requirements.


How it is used?


This Event Handler FM’s are useful in many scenarios like

1. When we want to update some field values on save of the Transactions ( Here FM will be called after ORDER_SAVE BADI check is successful so you can confirm that transaction will be saved)

2. When partner value is changing on after change you wnat to perform any update in Transaction

3.You can register this FM for any objects ( ORDERADM_H, ORDERADM_I, CUSTOMER_H, CUSTOMER_I, … etc)



How to create the FM


Fm should created with name endes with _EC for ex ZTEST_EVENT_SAVE_EC




Created FM must registered for Specific Objects ( CRM_ORDERADM_H, CRM_ORDERADM_I, ..etc)



Under this register your custom FM for your specific object





After registeration Maintain Event handler for which transaction, object and event in SPRO under CRM->Transaction->Basic Settings->Edit Event Handler Table



After this You can all the registered FM for events



Click on new entries and maintain the event for your custom FM



In the above screenshot FM is registered for Object PARTNER , for Event After Change and execution time is Immediately


This FM will be called immediately after Partner changed for Service Request Transactions


This FM will be called for Header/Item partner changes with importing fields passed are object name, event attributes with old and new values



In the above screenshot FM is registered for Service Request Transaction types, for object ORDERADM_H and for event SAVE and execution time before saving


This FM will be called when Service Request Transaction are saved and before saving the document you want to do any update according to user inputs you can do the code in this custom FM.


This FM will be called only once


Possib;e call Callback are




After these steps are done FM will be called on registered Events.




Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Stephen Johannes
      Stephen Johannes

      Good example, but you didn't explain how to determine what event you want to use or analyzing what events already exist.  There is a lot more options available as I have personally discovered 😉 .  It was also good showing people the registration in the correct place.

      For those interested program CRM_EVENT_TRACE can be used to help find the correct event needed for your logic.

      Take care,


      Author's profile photo Deepika Chandrasekar
      Deepika Chandrasekar
      Blog Post Author

      I will update this document with some more details.

      Thank You Stephen 🙂

      Author's profile photo Former Member
      Former Member

      Thanks for the excellent post.

      Can you please tell us while creating callback FM, do we have to maintain Importing and Exporting parameters ?

      If yes, Please guide us what to maintain ? Any standard structure will be there for Importing and Exporting parameters for Call back FM ?



      Author's profile photo Former Member
      Former Member

      Using following steps I am unable to do it , my FM is not getting trigered ??? .