on ‎2009 Jun 03 7:55 AM
Hi Experts,
What are callback function modules?
Why do we use them and in what scenarios are we required to use them?
What is their purpose and how are they helpful?
Can anybody explain with an example.
Regards,
Sangeeta.
Request clarification before answering.
Hi Sangeeta,
CALLBACK modules basically return the u2018oldu2019 and u2018newu2019 memory of a dataset after an operation and thus give you a snapshot of what data changed in the process. They find use in event triggers, or to define a reaction based on some processing done in the transaction.
E.g : say you want to send an Email to a supervisor everytime a user changes the BP name. The only way you can know if the BP name has changed is by comparing the database for BUT000-NAME_FIRST and BUT000-NAME_LAST between before and after the operation. To do this, you can just call module BUP_MEMORY_BUT000_CALLBACK, or BUPA_GENERAL_CALLBACK. This returns the BUT000 state before and after in 2 tables - ET_BUT000_OLD and ET_BUT000_NEW. So you can easily compare the contents and react accordingly.
The most classic use of Callback modules is in Data Exchange. The callback modules help the application decide what data has changed, and thus, what must be sent over to the other connected systems.
Hope this helps you !
Cheers,
Rishu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sangeeta,
We use callback FMs to perform soem operation after an event occurs in the system.
For e.g. if you want some operation to take place after an Opportunity is created in the system, then you can associate a callback function module to the BUS2000111 event CREATED. You can activate the linkage in SWETYPV t-code and write the logic of the operation to be performed in the FM.
Hope this helps!
Regards,
Saumya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.