Workflow Triggered by Customer Creation

Felix Hassine Felix.Hassine at us.pm.com
Fri Feb 22 13:18:09 EST 2002


We have just implemented this, here is how we did it.
 
The workflow is started when the IDOC arrives, and the workflow posts the
IDOC. (That IDOC is associated with a profile not used for bulk transfer.)
We have created a method to do this.
 
Then extend the IDOC object with an attribute that would be your KNA1
object. To construct this, drill into the EDIDC table, fetch the customer
number, build the object using swc_create_object.
 
Then...the only thing left is to test at the entrance of the workflow if the
attribute-object exists or not. If it exists, it means we are in an
extension process, if not, the workflow is creating the object.
 
I am exposing you our solution, but I don't know if it fits your process.
Maybe it helps...
Best regards,
 
FH
 
 
-----Original Message-----
From: Adrian Clarke [mailto:Adrian_Clarke at DDSINCORP.com]
Sent: Friday, February 22, 2002 11:14 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Workflow Triggered by Customer Creation
 
 
Hello All,
 
I am currently designing a workflow that I want to be triggered when a
customer master is created (via an inbound IDOC) using an event triggered by
a change document.  This IDOC could either be creating a brand new customer
(i.e. KNA1, KNVV, KNB1 etc...) or could just be extending an existing
customer into a new sales area (i.e. KNVV only).  I would like to have a
different workflow triggered depending on whether it is a new customer or
just an extension.
 
The problem I am having is that there is only one change document object
(DEBI) regardless of whether or not the customer is being created new or
just being extended.  The main table for this change document is always KNA1
and both change documents are type "I" for create.   In addition, when a
customer is created, there is nothing in the "old value" and "new value"
fields that I could use to distinguish between the two types of creation.
 
I don't think it is a good idea to create custom change document objects, so
I am trying to think of a good way to proceed.  Some thoughts I have had
are:
 
1.      Create two events and use a check function to rule one of them out.
 
2.      Don't use change documents and use an event created by the
completion of the IDOC.  Same problem, but I could probably pass something
in the container to distinguish between the two.
 
3.      ?????
 
Any other ideas?  Has anyone built a similar type of workflow?
 
Currently on version 4.0B.
 
Thanks in advance.
Adrian
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20020222/fa218840/attachment.htm


More information about the SAP-WUG mailing list