Simultaneous change documents only triggering one event
Chatterjee, Partha (US - San Ramon)
pchatterjee at deloitte.com
Tue Oct 5 16:38:25 EDT 2004
Hi Ramki,
1) When I say different object keys--yes, I still do mean the same
object.
2) I assume that you mean user exits in the underlying t-code? No I have
not checked any since change document events seem to fit the requirement
pretty well other than this outstanding issue with respect multiple
items under the same CDHDR record in CDPOS.
Raising the event from inside Event FM leads to ABAP errors so far. It
has been suggested that I could put event triggers inside the Check
Function module area under the type linkages area. I am trying this
next. I have a colleague who has done something similar at a prior
client but cannot remember the exact methodology implemented for
multiple events with different object keys from a single CDHDR record.
Thanks again for all your help,
Partha
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Workflow99 at aol.com
Sent: Tuesday, October 05, 2004 4:07 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Simultaneous change documents only triggering one event
Hi Partha,
I think your original idea of triggering the event from a workflow is a
better option compared to raising events for other object keys from the
EVENT FM.
When you say different object keys, are you still referring to the same
object type? Have you checked the availability of a user exit/BADI?
Regards,
Ramki Maley
Workflow Developer, USCBP.
248-613-1287 (C)
In a message dated 10/4/2004 8:05:04 PM Eastern Standard Time,
pchatterjee at deloitte.com writes:
Hi Ramki,
Related to point 3 below:
"3) One change document is associated with one object key. The CDHDR
and
CDPOS records for that key are available to you in the FM as well as
the
event
that triggered the execution of the FM. You can examine the changes and
decide
to either raise or not raise the event. If you delete the event from
the
int.
table no event is triggered. On the other hand you can populate the
events
int. table with any other events you want to trigger for the same
object key."
I need to raise multiple events with different object keys from the
same
change document number. SWE_CD_TEMPLATE_EVENT_FB obviously allows only
the addition of more events but no different object keys. Is there way
of doing this also? I have raised multiple events from the same change
documents based on your suggestion but still have the need to change
the
associated object key for each separate event raised.
Thanks again for the guidance,
Partha
>Partha Chatterjee
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Workflow99 at aol.com
Sent: Friday, October 01, 2004 9:47 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Simultaneous change documents only triggering one event
Hi Partha,
1) Yes. You would actually enter the FM name in SWEC for the event that
is
getting triggered.
2) Try the template SWE_CD_TEMPLATE_EVENT_FB.
3) One change document is associated with one object key. The CDHDR and
CDPOS records for that key are available to you in the FM as well as
the
event
that triggered the execution of the FM. You can examine the changes and
decide
to either raise or not raise the event. If you delete the event from
the
int.
table no event is triggered. On the other hand you can populate the
events
int. table with any other events you want to trigger for the same
object key.
4) I am not sure if it is a good idea to explicitly raise events from
within
this FM. If you have to do it, make sure you use the update task
version of
SWE_EVENT_CREATE. All the parameters for SWE_CD_TEMPLATE_EVENT_FB or
optional
and are populated by SAP. Your code can examine the changes, make DB
reads
and decide what events to raise.
Regards,
Ramki Maley
Workflow Developer, USCBP.
248-613-1287 (C)
In a message dated 9/30/2004 5:32:40 PM Eastern Standard Time,
pchatterjee at deloitte.com writes:
Hi Ramki,
A few follow-up questions:
1) I assume I am to enter a z-version of SWE_CD_TEMPLATE_EVENT_FB_2
under t-code SWED to enable this functionality?
2) When I enter a z-version of this, SAP insists on OBJECTKEY being
part
of its interface even though this is not part of the interface being
delivered in the template FM. SWED will not save unless I put this in
so I am a little in the dark as to what the 'Structure' field in SWED
is
being used for.
3) If I use a z-version of this in SWED, and I pass out multiple
OBJECTKEY/EVENT will multiple events be raised from SAP?
4) Is the idea in using a z-version of SWE_CD_TEMPLATE_EVENT_FB_2 to
pass out multiple EVENTS/CHANGEDOCUMENT_POSITION values that then gets
interpreted by SAP to raise events? And if so, then why is SAP asking
for OBJECTKEY as part of the interface in SWED? Or am I supposed to
use
this function module to call events using SWE_EVENT_CREATE?
If there is additional documentation you can point me to as how these
function modules are interpreted by SAP I would appreciate it.
With regards,
Partha Chatterjee
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf
Of
Workflow99 at aol.com
Sent: Thursday, September 30, 2004 3:27 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Simultaneous change documents only triggering one event
Hi Partha,
I do trigger multiple events for the same change document number. In
my
case
the object is ANLA and change could be in any of the tables associated
with
it (ANLA, ANLB, ANLC, ANLU, ANLZ etc).You can still use the event FM
to
get
the the results you need (see FM SWE_CD_TEMPLATE_EVENT_FB_2).
Regards,
Ramki Maley
Workflow Developer, USCBP.
248-613-1287 (C)
In a message dated 9/29/2004 8:03:20 PM Eastern Standard Time,
pchatterjee at deloitte.com writes:
Hi Ramki,
The problem is not multiple events on a single change document
object--I
already have that and that functions correctly.
The problem is I need multiple events triggered simultaneously from
the
same change document number. In my case, I have multiple entries for
the same change document number (different table keys for each
entry)
in
CDHDR table. SAP is kicking off an event for the first record in a
single change document but ignoring the others since the other
entries
do not have their own change document number but rather just their
own
unique tabkey entry under the same change document number.
I suspect this functionality is as intended by SAP but I need some
way
of working around it if there is not configuration to change the
functionality.
With regards,
Partha Chatterjee
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf
Of
Workflow99 at aol.com
Sent: Wednesday, September 29, 2004 12:13 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Simultaneous change documents only triggering one event
Hi Partha,
I have multiple events defined on a single change document object
and
all my
events trigger correctly (R/3 6.20). One option is to write an event
function
module for the triggered event and control the triggering of the
second
event from there.
Regards,
Ramki Maley
Workflow Developer, USCBP.
248-613-1287 (C)
In a message dated 9/29/2004 2:58:23 PM Eastern Standard Time,
pchatterjee at deloitte.com writes:
Hi All,
I have change documents to trigger workflows in the EHS area.
They
work
fine, however, when I save 2 records at the same time and they
create
2
simultaneous change documents (same change document number but
different
table keys) they only trigger one of the 2 necessary events.
I would expect to see 2 events raised but I only see one. I have
turned
on the Event Queue and it only sees one event as well.
I can think of a workaround where I can use the event that does
trigger
to start the workflow and then have a background step that checks
if
a
second (third, fourth etc.)workflow should be started but I would
prefer
to change the problem at the source.
Any ideas?
Thanks,
Partha Chatterjee
This message (including any attachments) contains confidential =
information intended for a specific individual and purpose, and is =
protected by law. If you are not the intended recipient, you should =
delete this message. Any disclosure, copying, or distribution of this =
message, or the taking of any action based on it, is strictly =
prohibited.
More information about the SAP-WUG
mailing list