Starting workflow from a program

Alon Raskin araskin at 3i-consulting.com
Wed Oct 9 06:57:14 EDT 2002


First of all I wouldnt rely on sy-subrc from the FM SWE_EVENT_CREATE. It never
seems to report correctly. I would check the exporting parameter EVENT_ID. If
it is blank then no event was raised. I am sure that you will find that your
event_id is blank.
 
I would try 2 things. Check the inbox of the Workflow Administrator. SAP
Workflow will generate an email to the Admin if a problem occurred.
 
The other thing i would try is to call "swc_container_to_persistent my_cont"
before raising the event. You will probably find that this will fix your
problem.
 
Let us know how it goes.
 
Regards,
 
Alon Raskin
3i Consulting Group
http://www.3i-consulting.com
 
 
Quoting "Jose Burgman [AST]" <jose.burgman at ast.co.za>:
 
> 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"
>
 


More information about the SAP-WUG mailing list