Application Development 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: 

Usage of FM SWE_EVENT_CREATE and relevant exits/BADI

Former Member
0 Kudos
426

Hi all,

Can anyone tell me the usage of FM SWE_EVENT_CREATE. Especially what is the use of the importing parameter 'EVENT'.

If I am right, this FM raises the event (as in EVENT paramter),of the object in OBJTYPE parameter. Also, let me know whether any user exit can be called from within this function module.

I need to populate some dates (by aclling a Z-function module)depending on whether or not the event is raised by this fn module 'SWE_EVENT_CREATE'.

Thanks in Advance

Aadarsh

1 ACCEPTED SOLUTION

swatantra_vijay3
Participant
0 Kudos
184

Hi Adarsh

Basically this FM generates the event and in the event parameter u pass the event of the object

This is a standard FM , u can not do anything inside

See if you are calling this FM from a user exit then u can check ..............

4 REPLIES 4

swatantra_vijay3
Participant
0 Kudos
185

Hi Adarsh

Basically this FM generates the event and in the event parameter u pass the event of the object

This is a standard FM , u can not do anything inside

See if you are calling this FM from a user exit then u can check ..............

Vinod_Chandran
Active Contributor
0 Kudos
184

Hi Aadarsh,

If you want to populate the dates, that you can do before calling this function module because the dates must be populated irrespective of whether the event raised or not. Hope you are calling this from a user exit.

Thanks

Vinod

Former Member
0 Kudos
184

You can create events from application or system programs by calling the relevant function module SWE_EVENT_CREATE .

When the function module SWE_EVENT_CREATE is called, the following operations are performed synchronously at first:

Find requester

If an event is created by an application that is executed as an asynchronous object method within a workflow, the work item that called this method can be established via internal queries.

Determine all supertypes of the triggering object type

The type linkage is not only taken into account for the triggering object type itself, but also for all supertypes of this object type.

The ID of the event, the ID of the triggering object type and the object type-specific key are passed to this function module as import parameters, and the event container as a table parameter.

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 .)

If a task in which an object is created is to use the creation of this event as a terminating event, the workflow system uses the workflow requester. This means that the event Object created can be used as a terminating event, although the object does not yet exist when the task is started. To enable the workflow system to use the workflow requester without errors, the function module should be called as the last function module before COMMIT WORK .

I think there is no User Exit for this..

Please put points if it helped u.

Regards

Afsal

Former Member
0 Kudos
184

Hi,

You Can check whether event is raised or not from SWUE transaction, this can used to debug the receiver function module.

Thanks

Ramesh