Problem understanding event parameters

Dart, Jocelyn jocelyn.dart at sap.com
Sun Mar 10 17:08:07 EST 2002


Hi Karen,
The BAPI BAPI_USER_GET_DETAIL will return the email address (tables
parameter ADDSMTP) of a user if the email address has
been maintained in their user master details.  You can call this BAPI from
within a method or attribute.
 
I agree with Mark that it sounds like you might be approaching this from the
wrong angle.
If you can code the attribute directly against an object rather than passing
around data it's better
performance-wise (less overhead).
 
If you really need to pass a parameter, then you can't pass it directly to
an attribute, you need to
pass a parameter to a method which then sets up the attribute (this complies
with standard OO rules).
 
If you are passing userid, then make sure you aren't just passing the event
creator (i.e. the person
running the transaction when the event is created) as this is automatically
passed in standard event
parameter _EVT_CREATOR, which you can bind to your own container element or
to a standard
one, e.g. the workflow initiator, in the event-to-workflow binding.  You
could then pass it on to your
task/method.
 
If you really need to pass in the userid yourself - and PLEASE!!! check the
other options first because
they are better for overall system performance and make better OO sense -
you may need to use
the macro swc_container_to_persistent before your call to SWE_EVENT_CREATE
to ensure the
userid is passed.
 
Regards,
 
Jocelyn Dart
Consultant (EBP, BBP, Ecommerce, Internet Transaction Server, Workflow)
SAP Australia
Email  <mailto:jocelyn.dart at sap.com> jocelyn.dart at sap.com
Tel: +61 412 390 267
Fax: +61 2 9935 4880
 
-----Original Message-----
From: Mark Pyc [mailto:Mark.Pyc at diagonal-consulting.com]
Sent: Sunday, 10 March 2002 1:35 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Problem understanding event parameters
 
 
G'day Karen,
 
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.
 
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.
 
Hope this helps,
Mark
 
-----Original Message-----
From: Karen Bender [mailto:karen_bender at rac.ray.com]
Sent: 08 March 2002 21:15
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Problem understanding event parameters
 
 
Dear workflowers:
 
Here's what I'm trying to do, but it's not working.
 
>From a program I put an element in a container, then create an event.
 
    code:
    swc_set_element <event container> 'USERID'  var_userid.
    call function 'SWE_EVENT_CREATE'
          .
          .
          .
 
The event being created has the parameter USERID.
 
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.
 
My problem is:
 
I want to use the USERID parameter to create an attribute in the object.
This object contains the event that is triggering the workflow.
 
In the coding for the attribute, the first thing I do is:
 
    swc_get_element container 'USERID' usrid.
 
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?
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?
 
Thanks for any help you can give.
 
Karen Bender
Raytheon Aircraft Company
 
 
 
*********************************************************
 
 
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.
 
 
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.
 
 
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.
 
 
www.diagonal.co.uk
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20020310/8ca249bc/attachment.htm


More information about the SAP-WUG mailing list