Hi Dipak,
Yes, it should be based on your preprocessing function and where you called and assigned like on creating event handlers or on saving event message etc.
Take a dummy data and check in these FM /SAPTRX/BAPI_EH_POST and /SAPTRX/BAPI_EH_ADDEVENTMSG_02 what you want to achieve it along with ABAPer.
Regards
GGOPII