can any one help me how to create an User Event(T-code sm62) through ABAP code and also please let me know how does USER Event work.
1) SM62->Maintain User Events->Create
2) You can use SM64 to trigger manually the event..
FM 'BP_EVENT_RAISE' is used to trigger Background Event.
Trigger an event in the background processing system. This function module is for use in programs written in ABAP/4. Triggering an event tells the background processing system to start any background jobs that were scheduled to wait for the event.
You can trigger an event with or without an event argument, a string that more precisely identifies an event. Jobs can be scheduled to wait for an event for the combination of event and a particular event argument.
EVENTID is just an identifier to locate the event.
You can find this event in transaction SWEL/SWE2 transactions.