Starting workflow from a program

Dart, Jocelyn jocelyn.dart at sap.com
Thu Oct 10 22:25:56 EDT 2002


Hi Jose,
Yes, that's one of the reasons why we wrote the book - we get rusty ourselves occasionally -
so there's plenty written with the rusty workflower in mind.
 
On page 370 of the book in the section "Raising Events by Calling a Function Module"
there is a big thick caution note about not forgetting "Commit Work"! as I've done it
myself more times than I can count and am usually black and blue from kicking myself afterwards.
 
By the way, Susan Keohan set up this forum and she deserves a virtual round of applause
(and physical gifts by post if possible) ;-)
 
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
 
-----Original Message-----
From: Jose Burgman [AST] [mailto:jose.burgman at ast.co.za]
Sent: Thursday, 10 October 2002 3:53 PM
To: SAP-WUG at mitvma.mit.edu
Subject: Re: Starting workflow from a program
 
 
Hi Jocelyn
 
I've done the academy for 4.6B more than 14 months ago... This is the first time I've worked with SWE_EVENT_CREATE so I'm more than rusty. I used ZKNA1 while i was trying to figure out why my event was not starting - didn't make sense to do so, but I was trying to cover the bases .....
 
I'm in the process of getting The Book :). The one place where I learn the most is in this forum - I don't know about the rest of you, but I find all posts are very informative - I read them even if they are not applicable to me. Whomever had the idea of starting this needs to be congratulated.
 
With regards to my definitions, I had defined the itab as individual fields. By using include structure the problem was resolved. Thanks for the help.
 
Regards
 
Jose
 
-----Original Message-----
From: Dart, Jocelyn [mailto:jocelyn.dart at sap.com]
Sent: Thursday, October 10, 2002 1:23 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Starting workflow from a program
 
 
Hi Jose,
Yes you need to commit work after a call to SWE_EVENT_CREATE. This is very
basic stuff as far as workflow progamming techniques.
 
This is explained in the SAP Library help, in the BC610 Workflow Programming
course and in the Practical Workflow for SAP book.  The same sources go
into a fair bit of detail about handling multiline elements in containers
as well.
 
Suggest you read up further on workflow programming and get to a course if you can.
You obviously have a fair bit of knowledge already but there is always more to learn.
 
Re your multiline problem - sounds like there is a mismatch of some sort
between your parameter structure and your internal table structure even
though you have tried to make them the same.
Perhaps the definition of one or the other is not set up correctly?
 
Also suggest you read up on business object delegation - you should of course
raise your event based on KNA1 not ZKNA1 if you have KNA1 delegated to ZKNA1.
 
 
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
-----Original Message-----
From: Kevin [mailto:kjw1969 at yahoo.com]
Sent: Thursday, 10 October 2002 12:35 AM
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 tri!
!
!
!
gger.
 
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