FW: SO28 - Starting a workflow when external mail is received

Richard Marut rvmarut at earthlink.net
Wed Apr 23 20:46:29 EDT 2003


Lisa,
 
Here are answers to your questions:
 
1. Was that a new method in your new object?
Yes and I named it Receive which allowed it be accessible in SOST.
 
2. To trigger the workflow did you use call function swe_event_create?
Yes and I coded it in the Receive method. The object type was BUS2009,
object key was the purchase requisition number and item and the event
was Release.
 
Normally the user would log into SAP but I did this because users wanted
to release requisitions when they were out of the office and only had
access to e-mail.
 
Take a look at business object WI_MAILREC method Receive. It uses
function modules SWU_HANDLE_INCOMING_MSG_FOR_WF and
SO_DOCUMENT_READ_API1 to get the e-mail. I plan to use this and I want
to attach the e-mail to an Accounts Payable document.
 
Richard...
 
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Lisa Hasenbohler
Sent: Wednesday, April 23, 2003 4:45 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: FW: SO28 - Starting a workflow when external mail is
received
 
Hi Richard,
 
Thank you for the reply.  I was wondering when you added your own code
that triggered a specific workflow;
 
  - Was that a new method in your new object? If it
    was a new method did it have to have a specfic
    name so that SO28 will execute that method?
 
  - To trigger the workflow did you use call function
    swe_event_create? If yes, what object_type,
    object_key & event did you use?  Ultimately I
    want the received e-mail passed to my workflow.
 
Thanks,
Lisa Hasenbohler.
 
>>> rvmarut at earthlink.net 04/22/03 18:47 PM >>>
I'm resending this message because it was returned. My apologies if you
receive it twice.
 
Richard...
 
 
-----Original Message-----
From: Richard Marut [mailto:rvmarut at earthlink.net]
Sent: Tuesday, April 22, 2003 7:21 PM
To: 'SAP Workflow Users' Group'
Subject: RE: SO28 - Starting a workflow when external mail is received
 
Lisa,
 
I created my own business object and used interfaces IFFIND and
IFRECEIVE which created the Receive method as expected. I then added my
own code that triggered a specific Workflow.
 
The system knows which object method to start based on your entry in
SO28. Once you create you new object, it will show up in the new
recipient column as a possible entry once you select SAP object
instance. There was a trick getting it to appear. I believe the object
and method had to be set to released.
 
I'm also working on another one this week that will look at the header
and body of the e-mail to determine what action needs to be taken. I
will have a workflow that will be sitting idle with a Wait for Event
that will get triggered when the e-mail returns back into SAP.
 
Richard...
 
 
-----Original Message-----
From: SAP Workflow [maito:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Lisa Hasenbohler
Sent: Tuesday, April 22, 2003 6:33 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: SO28 - Starting a workflow when external mail is received
 
I am trying to setup a workflow that will start whenever an external
e-mail is received by a specific user and I need a deeper understanding
of transaction SO28.
 
So far I have
    - created a workflow "WS924000015", it currently has no triggering
event, it needs to receive the external e-mail.
    - created a the following entry via tcode SO28.
                 Recipient:  lhasenbo at zzzz.com  (address that the
external e-mail is sent to)
                 AddrType: Internet
                 New recipient: Handler for messages to work items
(WI_MAILREC)
                 AddrType: Business Object
 
What I don't understand, is how the system would know which workflow
should be kicked off as I have not specified that anywhere?
 
I got the idea to use this configuration from Alan Rickayzen's,
tutorial "A Beginner's Guide to Building Workflows with the Workflow
Builder" and from the book Practical Workflow for SAP-Tips & Tricks-pg
464.
 
The tutorial shows the entry that needs to be made via SO28.  Is there
more to it than that?
 
The book suggests to create your own object that contains "IFRECIEVE"
and "IFFIND", and a "RECEIVE" method that would create a terminating
event, however, as soon as you reference "IFRECEIVE" you are given the
"RECEIVE" method.  Should I create a different method than "RECEIVE",
but how does the system know to run that method?
 
I need some help to further understand how this works.
 
Thanks,
Lisa Hasenbohler
4.6C
 


More information about the SAP-WUG mailing list