Question:
Hello,
Anyone knowledgable, please answer my following questions:
a) When using SWE_EVENT_CREATE, is a COMMIT_WORK required after this function module? If yes, why?
b) What are differences between SWE_EVENT_CREATE, SWE_EVENT_CREATE_FOR_UPD_TASK, and WE_EVENT_CREATE_IN_UPD_TASK - When to use one versus another?
Thanks!!
Zack
Answer:
a) depends when you use the fu.mo. Normally in user-exits the transaction takes cares of the commit work and you do not have to program the commit work but in reports you have to.
Answer:
I think if we use function module SWE_EVENT_CREATE_FOR_UPD_TASK there is no need for commit work statement, but for SWE_EVENT_CREATE it is required. Though I am not exactly when to use which function module.
Thanks.
Vijay.
Answer:
If you use the SWE_EVENT_CREATE function module to create a event, explicit commit is required in calling program otherwise event will not be fired.
Madhu
Answer:
Hi Vijay,
Generally for raising events, you would use 'SWE_EVENT_CREATE'. The only time I've ever found a need to use 'SWE_EVENT_CREATE_FOR_UPD_TASK' in update task is when raising an event in a user exit, where the event object key is for an object that is to be created in the same logical unit of work as the event.
Regards,
Tim