<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>What
element do you want to read from a container?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>In
case of ME_REL_CHECK_EVENT_PARAM special element _EVT_RECEIVER_ID is read.
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>A
receiver in that </SPAN></FONT><FONT color=#0000ff face=Arial size=2><SPAN
class=030021816-28062001>case is a workitem so a receiver ID is a workitem ID.
That is why system </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>can
read from workitem container.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=030021816-28062001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>If you
want to pass the data using container (e.g. to pass a document type) you should
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>create
a new container element for an event and fill that container element
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=030021816-28062001>before
you trigger your event. Then you can read the container element in your check
FM.</SPAN></FONT></DIV>
<BLOCKQUOTE>
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Susan R. Keohan
[mailto:skeohan@MIT.EDU]<BR><B>Sent:</B> 28 czerwca 2001 17:16<BR><B>To:</B>
SAP-WUG@MITVMA.MIT.EDU<BR><B>Subject:</B> FIPP Events - Check FMs, and
more<BR><BR></DIV></FONT>Hello Workflow-ers,<BR><BR>We are running on
4.6c. We have three workflows which should get kicked off when an FI
parked document (Object FIPP, event CREATED) is created. Currently, we
use check function modules to allow the correct workflow to start based on
document type. However, based on recent mail to this list on this topic,
I have decided to implement a Receiver Type FM - essentially the same code,
but packaged into one receiver FM.<BR><BR>My question is this... I use
an import from memory to get the document (the export to memory is done in a
user-exit) , then, if that fails, I try to read the container, and if
that fails, I try to read the database using the event object. When
testing, I can make the container read and the database read methods
work. However, in real life, only the import from memory succeeds.
So, why do the container read and the database read fail ? What are the
implications if I rely strictly on the import from memory to retrieve the
document number ? <BR><BR>Many of the other SAP-delivered Check FMs and
Receiver Type FMs get the data necessary by reading the event container, then
calling SWW_WI_CONTAINER_READ (an example of ME_REL_CHECK_EVENT_PARAM
follows, and I do know that this FM is not related to FIPP).<BR><BR><FONT
face="Arial Monospaced for SAP, Helvetica" size=3> swc_get_element
event_container evt_receiver_id wi_id.<BR> if sy-subrc ne
0.<BR> raise container_error.<BR>
endif.<BR><BR></FONT><FONT color=#0000ff size=3>** Get the workitem
container<BR></FONT><FONT color=#000000 size=3>call function
'SWW_WI_CONTAINER_READ'<BR>
exporting<BR>
wi_id
= wi_id<BR>
tables<BR>
wi_container
= wi_container<BR>
exceptions<BR>
container_does_not_exist = 01.<BR><BR> if sy-subrc ne
0.<BR> raise container_error.<BR>
endif.<BR><BR></FONT><FONT color=#0000ff size=3>** Get the release code from
the workitem container.<BR></FONT><FONT color=#000000 size=3>swc_get_element
wi_container 'RELEASECODE' wi_release_code.<BR><BR>Any insight into this
phenomenom will be appreciated. Of course, I want to build the most robust
receiver type FM possible. That's why I have used the three methods described
above, but if two of them always fail, I may as well not implement
them.<BR><BR>Cheers,<BR>Sue<BR></BLOCKQUOTE></FONT></BODY></HTML>