Starting workflow from a program

Zmudzin,Tomasz,VEVEY,GL-DS/DM Tomasz.Zmudzin at nestle.com
Thu Oct 10 02:39:39 EDT 2002


Absolutely correct.
 
Again the word of caution -- in dialog programming you need to analyze
carefully where & when the COMMIT WORD is called.
 
1. Usually it's called only once at the "Save" in the transaction -- that's
fine, it will also commit your SWE_CREATE_EVENT call
2. Sometimes the piece of code where you might call SWE_EVENT_CREATE is NOT
running in the context of the transaction, or you need to COMMIT when
normally no COMMIT WORK would be called. In this case you have to put it
explicitly after the call.
3. The last one poses a danger that your COMMIT WORK will actually post
other data (that was changed by the transaction and was not supposed to be
commited). So you need to analyze the context very very carefully.
 
Cheers,
Tomasz
 
-----Original Message-----
From: Jose Burgman [AST] [mailto:jose.burgman at ast.co.za]
Sent: Thursday,10. October 2002 07:56
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Starting workflow from a program
 
 
Hi Kevin
 
Apparently after calling the FM, you need to do a commit work. If your
dialogue program does a commit work already, you don't need to put it in
again. In my case I'm not updating other databases so I needed to do a
commit work after calling the FM.
 
Regards
 
Jose
 
-----Original Message-----
From: Kevin [mailto:kjw1969 at yahoo.com]
Sent: Wednesday, October 09, 2002 4:35 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Starting workflow from a program
 
 
Do you need to commit work in your dialog program as this function module
updates the relavant event tables?
 "Jose Burgman [AST]" wrote:Hi every-one
 
I've created a dialogue program in which one of the facilities the user has
is to start a workflow. I've created the subtype ZKNA1 (with status
released) with an event called ZAPPROVE and delegated it system wide to
KNA1. The event has a multiline element. I've created the event container
and initialised it and loaded my internal table into the event container
using the relevant macros. I then call the FM SWE_EVENT_CREATE. The
interface needs the object type (tried KNA1 and then ZKNA1 - used literal),
the object key (customer number - used FM definition) and the event
(ZAPPROVE - used literal) and pass the event container. The workflow is
active and the event linkage is in place (checked using SWETYPV). When I
execute the program nothing happens - no event is triggered in swel. I've
run it in debug mode and everything _SEEMS_ to be OK in the FM - return code
is 0 when it completes - I've also tested it using SE37 and the event
container does get filled - but still no event trigger.
 
So ... any-one have any ideas?
 
Regards
 
Jose
______________________________________________
 
"This information is intended only for the person or entity to which it is
addressed and
may contain private, confidential, proprietary and/or privileged material
and may be subject
to confidentiality agreements.
 
Any review, retransmission, dissemination, or any other use of or taking of
any action in
reliance upon this information, by persons or entities other than the
intended recipient,
is prohibited.
 
If you received this in error, please contact the sender and delete the
material from all
storage media.
 
The company is neither liable for proper, complete transmission of the
information contained
in this communication, any delay in its receipt or that the mail is
virus-free"
 
 
---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
______________________________________________
 
"This information is intended only for the person or entity to which it is
addressed and
may contain private, confidential, proprietary and/or privileged material
and may be subject
to confidentiality agreements.
 
Any review, retransmission, dissemination, or any other use of or taking of
any action in
reliance upon this information, by persons or entities other than the
intended recipient,
is prohibited.
 
If you received this in error, please contact the sender and delete the
material from all
storage media.
 
The company is neither liable for proper, complete transmission of the
information contained
in this communication, any delay in its receipt or that the mail is
virus-free"
 


More information about the SAP-WUG mailing list