<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-2">
 
 
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D950321307-02072001>Sue,</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D950321307-02072001>You=20
should add the parameter ('DocumentType) to your object event (during =
runtime=20
it&nbsp;means&nbsp;you have additional EVENT container element) and =
fill EVENT=20
container uppon document creation (program it in your user exit). Refer =
to=20
following code (you should put something like that into your user=20
exit).</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D950321307-02072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D950321307-02072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3D"Courier New" size=3D2><SPAN=20
class=3D950321307-02072001>*&nbsp;&nbsp; INCLUDE =
ZX...</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3D"Courier New" size=3D2><SPAN=20
class=3D950321307-02072001>...</SPAN></FONT></DIV>
<DIV><FONT size=3D2><FONT color=3D#0000ff face=3D"Courier New"><SPAN=20
class=3D950321307-02072001>swc_container=20
event_container.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>...</SPAN></FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT color=3D#0000ff face=3D"Courier New"><SPAN=20
class=3D950321307-02072001>swc_create_container event_container.=20
<BR>...</SPAN></FONT></FONT></DIV>
<DIV><SPAN class=3D950321307-02072001><FONT color=3D#0000ff =
face=3D"Courier New"=20
size=3D2>swc_set_element event_container=20
'DocumentType'&nbsp;uexit_variable-doctype.&nbsp;&nb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bsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event_container&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
=3D event_container&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;=20
EXCEPTIONS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
OTHERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
=3D=20
1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D950321307-02072001><FONT color=3D#0000ff =
face=3D"Courier New"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D950321307-02072001><FONT color=3D#0000ff =
size=3D2><FONT=20
face=3DArial>Cheers,</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=3D950321307-02072001><FONT color=3D#0000ff =
size=3D2><FONT=20
face=3DArial>Michal</FONT></DIV></FONT></SPAN>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Susan R. Keohan=20
  [mailto:skeohan@MIT.EDU]<BR><B>Sent:</B> 29 czerwca 2001 =
17:08<BR><B>To:</B>=20
  SAP-WUG@MITVMA.MIT.EDU<BR><B>Subject:</B> Re: FIPP Events - Check =
FMs, and=20
  more<BR><BR></DIV></FONT>Thanks Michael.&nbsp; I have no problem =
adding the=20
  container element DocumentType to the workflow, but haven't yet been =
able to=20
  fill the container element before triggering the event.&nbsp; That =
part seems=20
  to be a little sticky.&nbsp; The event is raised by PP_WF_EVENT, =
which is=20
  called after our user exit (EXIT_SAPLF051_002).<BR><BR>At any rate, =
my imports=20
  from memory do work, and quite reliably, so I am still curious if any =
of our=20
  gurus out there want to weigh in on the merits (or lack of) of =
relying on this=20
  method (exporting and importing from memory) to obtain the document=20
  information .vs. event/workitem container reads...=20
  <BR><BR>Regards,<BR>Sue<BR><BR>At 06:29 PM 6/28/01 +0200, you wrote: =
<BR><FONT=20
  color=3D#0000ff face=3Darial size=3D2>
  <BLOCKQUOTE cite type=3D"cite">What element do you want to read from =
a=20
    container?</FONT><BR><FONT color=3D#0000ff size=3D2>In case of=20
    ME_REL_CHECK_EVENT_PARAM special element _EVT_RECEIVER_ID is read.=20
    </FONT><BR><FONT color=3D#0000ff size=3D2>A receiver in that case =
is a workitem=20
    so a receiver ID is a workitem ID. That is why system =
</FONT><BR><FONT=20
    color=3D#0000ff size=3D2>can read from workitem =
container.</FONT><BR><FONT=20
    color=3D#000000 size=3D3><BR></FONT><FONT color=3D#0000ff =
face=3Darial size=3D2>If you=20
    want to pass the data using container (e.g. to pass a document =
type) you=20
    should </FONT><BR><FONT color=3D#0000ff size=3D2>create a new =
container element=20
    for an event and fill that container element </FONT><BR><FONT =
color=3D#0000ff=20
    size=3D2>before you trigger your event. Then you can read the =
container=20
    element in your check FM.</FONT>
    <BLOCKQUOTE><FONT face=3Dtahoma size=3D2>
      <DL>
        <DD>-----Original Message-----<FONT size=3D2>=20
        <DD>From:</B><FONT size=3D2> Susan R. Keohan [<A=20
        href=3D"mailto:skeohan@MIT.EDU" eudora=3D"autourl"><FONT=20
        size=3D2>mailto:skeohan@MIT.EDU</A><FONT size=3D2>]<FONT =
size=3D2>=20
        <DD>Sent:</B><FONT size=3D2> 28 czerwca 2001 17:16<FONT =
size=3D2>=20
        <DD>To:</B><FONT size=3D2> SAP-WUG@MITVMA.MIT.EDU<FONT =
size=3D2>=20
        <DD>Subject:</B><FONT size=3D2> FIPP Events - Check FMs, and=20
        more<BR><BR></FONT><FONT size=3D3>
        <DD>Hello Workflow-ers,<BR><BR>
        <DD>We are running on 4.6c.&nbsp; We have three workflows which =
should=20
        get kicked off when an FI parked document (Object FIPP, event =
CREATED)=20
        is created.&nbsp; Currently, we use check function modules to =
allow the=20
        correct workflow to start based on document type.&nbsp; =
However, based=20
        on recent mail to this list on this topic, I have decided to =
implement a=20
        Receiver Type FM - essentially the same code, but packaged into =
one=20
        receiver FM.<BR><BR>
        <DD>My question is this...&nbsp; I use an import from memory to =
get the=20
        document (the export to memory is done in a user-exit) , then, =
if that=20
        fails, I try to read the&nbsp; container, and if that fails, I =
try to=20
        read the database using the event object.&nbsp; When testing, I =
can make=20
        the container read and the database read methods work.&nbsp; =
However, in=20
        real life, only the import from memory succeeds.&nbsp; So, why =
do the=20
        container read and the database read fail ?&nbsp; What are the=20
        implications if I rely strictly on the import from memory to =
retrieve=20
        the document number ?&nbsp; <BR><BR>
        <DD>Many of the other SAP-delivered Check FMs and Receiver Type =
FMs get=20
        the data necessary by reading the event container, then calling =
 
        SWW_WI_CONTAINER_READ (an example of&nbsp; =
ME_REL_CHECK_EVENT_PARAM=20
        follows, and I do know that this FM is not related to=20
        FIPP).<BR><BR></FONT><FONT face=3D"Arial Monospaced for SAP, =
Helvetica">
        <DD>&nbsp; swc_get_element event_container evt_receiver_id =
wi_id.=20
        <DD>&nbsp; if sy-subrc ne 0.=20
        <DD>&nbsp;&nbsp;&nbsp; raise container_error.=20
        <DD>&nbsp; endif.<BR><BR></FONT><FONT color=3D#0000ff>
        <DD>** Get the workitem container</FONT>=20
        <DD>call function 'SWW_WI_CONTAINER_READ'=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp; exporting=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        =
wi_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        =3D wi_id=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp; tables=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        =
wi_container&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
        =3D wi_container=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp; exceptions=20
        <DD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        container_does_not_exist =3D 01.<BR><BR>
        <DD>&nbsp; if sy-subrc ne 0.=20
        <DD>&nbsp;&nbsp;&nbsp; raise container_error.=20
        <DD>&nbsp; endif.<BR><BR><FONT color=3D#0000ff>
        <DD>** Get the release code from the workitem container.</FONT> =
 
        <DD>swc_get_element wi_container 'RELEASECODE' =
wi_release_code.<BR><BR>
        <DD>Any insight into this phenomenom will be appreciated. Of =
course, I=20
        want to build the most robust receiver type FM possible. That's =
why I=20
        have used the three methods described above, but if two of them =
always=20
        fail, I may as well not implement them.<BR><BR>
        <DD>Cheers,=20
        <DD>Sue</DD></DL></BLOCKQUOTE><BR><BR>
    =
<DL></DL></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT>=
</FONT></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>