Automating a Decision Task

Alon Raskin araskin at eOutlook.com
Wed Sep 22 10:36:13 EDT 2004


Hi Bert,=20
 
That's an excellent suggestion.=20
 
The only problem with this approach is that since this code will be =
executing under the user's User ID (I did not make that clear in my =
previous emails), it would mean that every user has to be set up with WF =
Admin.=20
 
Regardless, an excellent suggestions.=20
 
Thanks,
 
Alon
 
 
________________________________
 
From: SAP Workflow on behalf of Bert Caryn
Sent: Wed 22/09/2004 15:35
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Automating a Decision Task
 
 
 
Alon,
You can use
 
 
CALL FUNCTION 'SWW_WI_ADMIN_COMPLETE'
       EXPORTING
            WI_ID                       =3D WI_ID
            RETURN_CODE                 =3D RETURN_CODE
       EXCEPTIONS
            UPDATE_FAILED               =3D 1
            NO_AUTHORIZATION            =3D 2
            INFEASIBLE_STATE_TRANSITION =3D 3
            OTHERS                      =3D 4.
 
 
Regards,
 
Bert Caryn
www.openhr.com
 
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Alon Raskin
Sent: 22 September 2004 15:04
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Automating a Decision Task
 
Here is what I am trying to do. I am trying to programmatically simulate
a user selecting a particular outcome in a decision task. Its actually
quite simple but the problem is that once I have done that I need the
work item to be removed from the Inbox. Of course the item remains in
READY status as it has not been executed. What I really want to do is
change the status to COMPLETED but I can not do this using the WAPI
because it says it cannot go from status READY to COMPLETED (Fair
enough).
 
 
What I did then is programtically reserve the work item and then chagne
its status to COMMITED using FM SWW_WI_STATUS_CHANGE_NEW. After doing
that the item changed its status to Completed. While this works, I am a
little nervous manually changing the status of a work item. I was just
wondering if anyone knew a better way?
 
Regards,
 
Alon
 
 
 
**** DISCLAIMER ****
"This e-mail and any attachments thereto may contain information
which is confidential and/or protected by intellectual property
rights and are intended for the sole use of the recipient(s)named above.
Any use of the information contained herein (including, but not limited =
to,
total or partial reproduction, communication or distribution in any =
form)
by persons other than the designated recipient(s) is prohibited.
If you have received this e-mail in error, please notify the sender =
either
by telephone or by e-mail and delete the material from any computer.
Thank you for your cooperation."
 


More information about the SAP-WUG mailing list