Triggering custom events from receiver function module

Brenda Raubenheimer braubenheimer at telkomsa.net
Wed Oct 7 05:43:15 EDT 2009


Thanks to you all for your ideas and suggestions.  Experienced as I am, I
made the fundamental error of not including cd_objectclas, cd_objectid and
cd_changenr as parameters on my event!  Of course, in debug mode I was
filling these in, so it always worked.  Just goes to show, you're never too
old or experienced to make stupid mistakes (and then broadcast them to the
WUG!). :)

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Rick Bakker
Sent: 07 October 2009 04:31 AM
To: SAP Workflow Users' Group
Subject: Re: Triggering custom events from receiver function module

Hello,

When it doesn't work, what user is doing the executing? In debug mode
I assume it's your user. Maybe there's an authorization problem, check
SU53.

regards
Rick Bakker
Hanabi Technology

On Mon, Oct 5, 2009 at 5:35 AM, Mike Pokraka
<wug at workflowconnections.com> wrote:
> 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
>>
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>

_______________________________________________
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