Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SWE_EVENT_CREATE

Former Member
0 Likes
1,051

WHT IS THE PURPOSE OF THIS FUNCTION MODULE

SWE_EVENT_CREATE?

2 REPLIES 2
Read only

Former Member
0 Likes
758

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.

Read only

Former Member
0 Likes
758

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>