<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>Hi
Karen, </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>The
BAPI BAPI_USER_GET_DETAIL will return the email address (tables parameter
ADDSMTP) of a user if the email address has</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>been
maintained in their user master details. You can </FONT></SPAN><SPAN
class=784185521-10032002><FONT face=Arial color=#0000ff size=2>call this BAPI
from within a method or attribute. </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>I
agree with Mark that it sounds like you might be approaching this from the wrong
angle. </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>If you
can code the attribute directly against an object rather than passing around
data it's better </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2>performance-wise (less overhead).</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002></SPAN> </DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>If
you really need to pass a parameter, then you can't pass
it directly to an attribute, you need to </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>pass a
parameter to a method which then sets up the attribute (this complies with
standard OO rules). </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002></SPAN> </DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>If you
are passing userid, then make sure you aren't just passing the event creator
(i.e. the person</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2>running the transaction when the event is created) as this is
automatically passed in standard event</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2>parameter _EVT_CREATOR, which you can bind to your own
container element or to a standard </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>one,
e.g. the workflow initiator, in the event-to-workflow binding. You
could then pass it on to your</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2>task/method. </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>If you
really need to pass in the userid yourself - and PLEASE!!! check the other
options first because</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>they
are better for overall system performance and make better OO sense - you may
need to use</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>the
macro swc_container_to_persistent before your call to SWE_EVENT_CREATE to ensure
the </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff size=2>userid
is passed. </FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=784185521-10032002><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=784185521-10032002>
<DIV style="WIDTH: 374px; HEIGHT: 90px"><FONT size=2>
<TABLE>
<TBODY>
<TR>
<TD></TD></FONT>
<TD>
<DIV><FONT size=2><FONT color=#0000ff>Jocelyn Dart</FONT> <BR><FONT
color=#0000ff>Consultant (EBP, BBP, Ecommerce, Internet Transaction
Server, Workflow)</FONT> <BR><FONT color=#0000ff>SAP
Australia</FONT></FONT></DIV>
<DIV><FONT color=#0000ff><FONT size=2>Email </FONT><A
href="mailto:jocelyn.dart@sap.com"><FONT
size=2>jocelyn.dart@sap.com</FONT></A><BR><FONT size=2>Tel: +61<SPAN
class=153385400-09052000> 412 390 267</SPAN><BR>Fax: +61 2 9935
4880</FONT></FONT></DIV></TD></TR></TBODY></TABLE></DIV></SPAN><SPAN
class=784185521-10032002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mark Pyc
[mailto:Mark.Pyc@diagonal-consulting.com]<BR><B>Sent:</B> Sunday, 10 March
2002 1:35 AM<BR><B>To:</B> SAP-WUG@MITVMA.MIT.EDU<BR><B>Subject:</B> Re:
Problem understanding event parameters<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=960113214-09032002>G'day Karen,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=960113214-09032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=960113214-09032002>The
event parameters allow you to pass additional information that cannot be
determined within the object attributes. If it were possible to access it
within the object there would be no need to specifically pass it with the
event. Workflow does not use genuine OO and all attributes must be able to be
resolved at runtime based only on the key to the object.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=960113214-09032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=960113214-09032002>Once
you've bound your data and hold it within your workflow container however, you
can pass it to the object via a call to a method. Alternatively since
you're coding the raise of the event and passing the parameter, potentially
you could pass the email address directly.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=960113214-09032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=960113214-09032002>Hope
this helps,<BR>Mark </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=960113214-09032002></SPAN></FONT> </DIV>
<DIV class=OutlookMessageHeader><FONT face="Times New Roman"
size=2>-----Original Message-----<BR><B>From:</B> Karen Bender
[mailto:karen_bender@rac.ray.com]<BR><B>Sent:</B> 08 March 2002
21:15<BR><B>To:</B> SAP-WUG@MITVMA.MIT.EDU<BR><B>Subject:</B> Problem
understanding event parameters<BR><BR></FONT></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>Dear
workflowers:</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>Here's what I'm
trying to do, but it's not working.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>From a program I
put an element in a container, then create an event.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>
code:</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>
swc_set_element <event container> 'USERID'
var_userid.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>
call function 'SWE_EVENT_CREATE'</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2>
.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2>
.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2>
.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>The event being
created has the parameter USERID.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>I also put USERID
in the workflow container and put it in the binding between the event and the
workflow, therefore I know a value is in the parameter.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>My problem
is:</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>I want to use the
USERID parameter to create an attribute in the object. This object
contains the event that is triggering the workflow.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>In the coding for
the attribute, the first thing I do is:</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>
swc_get_element container 'USERID' usrid.</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>I get nothing in
the variable usrid. Do I have access to the event parameters at the time
the object is being created? If so, how can I access it?
</FONT></SPAN></DIV>
<DIV><SPAN class=350542020-08032002><FONT face=Arial size=2>If not, can
somebody tell me where to put the code that converts the userid to an email
address that is needed in a task within the workflow?</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=350542020-08032002>Thanks for
any help you can give.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=350542020-08032002></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=350542020-08032002>Karen
Bender</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=350542020-08032002>Raytheon
Aircraft Company</SPAN></FONT></FONT></DIV><BR><BR>
<P align=center><FONT face=Arial
size=2>*********************************************************</FONT>
</P><BR>
<P align=center><FONT size=1>This e-mail may contain confidential and/or
privileged information. It is for the exclusive use of the intended
recipient(s). If you are not the intended recipient(s), you must not use,
distribute, copy or take any action in reliance on it, since to do so is
strictly prohibited and may be unlawful. If you have received this e-mail in
error, please return it to the sender immediately and delete it from your
system.</FONT></P><BR>
<P align=center><FONT size=1>E-mail messages are not secure and attachments
may contain software viruses which may damage your system. Whilst we have
taken every reasonable precaution to minimise this risk, we cannot accept any
liability for any damage which you sustain as a result of these factors. You
are advised to carry out your own virus checks before opening any
attachment.</FONT></P><BR>
<P align=center><FONT size=1>Any views or opinions expressed in this e-mail
are solely those of the author and do not represent those of the Diagonal
Group unless otherwise stated. </FONT></P><BR>
<P align=center><B><FONT
size=2>www.diagonal.co.uk</FONT></B></P></BLOCKQUOTE></BODY></HTML>