<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.45">
<TITLE>RE: Event trigger in inbound IDoc processing</TITLE>
</HEAD>
<BODY>
 
<P><FONT SIZE=3D2>Hi Raf,</FONT>
</P>
 
<P><FONT SIZE=3D2>We are currently doing something similar to what you =
are trying to do.&nbsp; What I have done is use the event that gets =
raised form the processing of the idoc to trigger a task for which I =
have created method to do what I need it to do.&nbsp; For example my =
triggering event for the task is IDPKINVOIC.MASSINPUTFINISHED.&nbsp; =
Because I needed to use the document number that was created by the =
idoc I had to put my code outside of the FM that processes the idoc so =
that the tables would already be updated.&nbsp; I hope this helps even =
a little.</FONT></P>
 
<P><FONT SIZE=3D2>Darlene</FONT>
</P>
 
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Bormans, Raf [<A =
HREF=3D"mailto:Raf.Bormans@thevisionweb.be">mailto:Raf.Bormans@thevision=
web.be</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, August 22, 2001 8:57 AM</FONT>
<BR><FONT SIZE=3D2>To: SAP-WUG@MITVMA.MIT.EDU</FONT>
<BR><FONT SIZE=3D2>Subject: Event trigger in inbound IDoc =
processing</FONT>
</P>
<BR>
 
<P><FONT SIZE=3D2>Hi,</FONT>
</P>
 
<P><FONT SIZE=3D2>We have an inbound IDoc processed by a function =
module. In this processing,</FONT>
<BR><FONT SIZE=3D2>an object is created (entry written on a table). On =
this object, I want to</FONT>
<BR><FONT SIZE=3D2>trigger an event to start a workflow (after the =
update).</FONT>
</P>
 
<P><FONT SIZE=3D2>Because the object does not exist before the end of =
the IDoc processing</FONT>
<BR><FONT SIZE=3D2>(after the commit performed by the ALE layer), I see =
two possibilities:</FONT>
</P>
 
<P><FONT SIZE=3D2>[1] trigger the event using the function module =
SWE_EVENT_CREATE in a form,</FONT>
<BR><FONT SIZE=3D2>called as PERFORM ... ON COMMIT</FONT>
</P>
 
<P><FONT SIZE=3D2>[2] trigger the event using the function =
module</FONT>
<BR><FONT SIZE=3D2>SWE_EVENT_CREATE_FOR_UPD_TASK</FONT>
</P>
 
<P><FONT SIZE=3D2>I am not sure that using solution [1], the object is =
already created at the</FONT>
<BR><FONT SIZE=3D2>time the event is raised. Concerning solution [2], =
the update of the object</FONT>
<BR><FONT SIZE=3D2>is not done in update task (because of IDoc inbound =
processing), so I am not</FONT>
<BR><FONT SIZE=3D2>sure I can use this function module.</FONT>
</P>
 
<P><FONT SIZE=3D2>Anybody can help me out?</FONT>
</P>
 
<P><FONT SIZE=3D2>Thanks, Raf</FONT>
</P>
 
</BODY>
</HTML>