‎2007 Aug 21 9:18 AM
‎2007 Aug 21 9:21 AM
HI Pavan,
You can create events from application or system programs by calling one of the relevant function modules SWE_EVENT_CREATE or SAP_WAPI_CREATE_EVENT .
For the following special cases, there are other function modules, which actually use the functionality of the above function module internally:
SWE_EVENT_CREATE_IN_UPD_TASK
This function module makes it possible to create events in an update task. In contrast to the function module SWE_EVENT_CREATE , it can be called with the addition of IN UPDATE TASK .
SWE_EVENT_CREATE_FOR_UPD_TASK
The event is created in the update task. (The function module is not called with the addition of IN UPDATE TASK .)
One of the remaining FM has no code in it and the other is not used anywhere even by SAP.
If you are trying to create events, use the SAP_WAPI_CREATE_EVENT function if it is available in your SAP release.
‎2007 Aug 21 9:23 AM
Hi Pavan,
Check out the function module documentation from se37
Functionality
This function module triggers an event for a business object. The event must defined in the corresponding object type.
Notes
The triggering of an event documents a change to the status of an object. The change to the status should be executed on the database before the corresponding event is triggered.
If an event is triggered before the database change, then the event receivers that are registered there are also started. However, if an event receiver uses start conditions (for example, in the form of a check function module) that access the object attributes, then this can lead to incorrect results since outdated or obsolete values need to be accessed.
<b>as mentioned in documentation it changes the status for a given object by trigrring an event.</b>
hope this helps.
regards,
vikas
<b>Always reward points to helpful answers.</b>