Triggering custom events from receiver function module

Mike Pokraka wug at workflowconnections.com
Mon Oct 5 11:35:21 EDT 2009


Hi Brenda,

I've done this a few times quite successfully. First off, I find that a
class that implements BI_EVENT_HANDLER_STATIC easier to work with than a
FM, but that's a personal preference -  I don't think there is a technical
difference in the way they are called.
Secondly, I raise the event using SAP_WAPI_EVENT_CREATE.
Lastly, I don't use COMMITs. I think this must be explicitly specified
with the WAPI. Events are usually raised in the update task so a COMMIT
should not be necessary and/or may even interfere in other cases.

Hope that helps,
Mike


On Mon, October 5, 2009 2:42 pm, Brenda Raubenheimer wrote:
> Hi,
>
>
>
> I am trying to trigger custom events from a receiver function module which
> is called when a change document is written for a change to a service
> entry
> sheet.  The function module currently checks whether a deletion occurred
> (LOEKZ = 'X') as well as when an entry sheet is released (field FRGZU
> VALUE_NEW > VALUE_OLD) or reset (field FRGZU VALUE_OLD > VALUE_NEW).  In
> any
> of these cases, the function module SWE_EVENT_CREATE is called to trigger
> a
> custom event on business object BUS2091 (SignificantlyChanged, Released or
> Reset respectively), and a commit work is then done.  In the case of a
> deletion, the event is triggered correctly.  However, in the case of
> either
> the release or reset, no custom event is being triggered.  When I test the
> function module in debug mode from SE37, the events are triggered
> correctly.
>
>
>
>
> Anyone have any ideas why this might be happening?
>
>
>
> Regards,
>
> Brenda.
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>





More information about the SAP-WUG mailing list