ABSENCE.DELETED - Two new event parameters needed

Raskin, Alon (Soliance) ARaskin at cps-satx.com
Wed Nov 7 11:02:15 EST 2001


Hi Alan,
 
Well this functionality is definitely very sexy. I just tried it and it
worked beautifully. The only thing I noticed that the attribute must exist
on the super-type for it to be filled into the event container. This is a
shame as it does not allow me to extend an object with an attribute and have
the old and new values show up in the container. The way I got around it was
to use the 'Z' version (subtype) of the object in the SWEC. However, this is
against the SAP recommended approach. I debugged the FM
SWE_EVENT_CREATE_CHANGEDOCUMENT and it seems that the problem occurs in line
236 (we are on 4.6c). It only queries the attributes of the parent object
and does not check the sub-type (despite delegation being set up).
 
Anyway, just thought you would want to know.
 
Regards,
 
Alon Raskin
Workflow Advisor - Soliance
(xtn. 3183)
 
 -----Original Message-----
From:   Rickayzen, Alan [mailto:alan.rickayzen at sap.com]
Sent:   November 06 2001 12:17
To:     SAP-WUG at MITVMA.MIT.EDU
Subject:        Re: ABSENCE.DELETED - Two new event parameters needed
 
Michel,
You have to somehow fill the event parameters when you trigger the event. If
you're triggering the event by calling a function module from your own
program then you can fill the event container using macros before the event
is triggered.
 
>From what you write you imply that you're using change documents to trigger
the event.
This does indeed automatically fill event parameters with the old and new
values - providing the attributes are defined for the event and providing
the fields are set up as change-fields in the field condition for triggering
the event (I'm relying on my rusty memory here). If for example you trigger
the event when BEGUZ changes (restriction value "*"), then you should find
that the parameters filled by the change-document management. Note 110635
describes this in more detail. One word of warning, before you add both
fields to the change-document trigger - this mechanism was never intended to
be used with document deletion so I'm not sure if it will work in your case.
 
 
But if you are using change documents to trigger your events it would be
worth a try,
 
Alan Rickayzen
 
 
-----Original Message-----
From: Michel Laviolette [mailto:michel_laviolette at hotmail.com]
Sent: 05 November 2001 22:02
To: SAP-WUG at MITVMA.MIT.EDU
Subject: ABSENCE.DELETED - Two new event parameters needed
 
 
Wfers,
I can t seam to figure out the intricacies behind setting up additional
event container parameters. Here s the scenario:
 
Goal:
I m trying to capture the BEGUZ and ENDUZ values on the ABSENCE.DELETED
event. The container element  _EVT_OBJECT is blank as the record is nuked by
the time the event is published. I was able to parse out the _EVT_OBJKEY
values... all but BEGUZ and ENDUZ are there.
 
Agonizing route I've taken:
The ABSENCE object is delegated to my customer object ZABSENCE. I redefined
the DELETED event and added two parameters (StartTime   multiline datatype
reference for field PA2001-beguz, EndTime   multiline datatype reference for
field PA2001-enduz). I also created two matching database field attributes
(StartTime & EndTime). I created an event linkage entry for ABSENCE.DELETED
which emails me the content of the event container.
 
Test script:
Generate the object. Delete an absence record. The event is successfully
created and the email is sent. I can see all but the two new parameters
described above
 
Questions:
Am I on the right track? Do I need to write some code behind the two new
parameters? My interpretation of the documentation on the subject is that
the multiline parameters should hold both the old and the new values (index
0001 & 0002)? Is this also applicable on record deletions?
 
Please let me know if you require further details to analyse this problem.
 
Any help would be much appreciated.
 
Michel Laviolette
Workflow Developer
Hull, Quebec Canada
 
 
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 


More information about the SAP-WUG mailing list