How to delete a work item by ABAP ?

Dart, Jocelyn jocelyn.dart at sap.com
Thu Feb 2 17:27:59 EST 2006


Hi Glauco, 
 
SERIOUSLY this is the ***WRONG**** approach to your scenario. 
 
If you need the work item to be cancelled when something happens outside of workflow you should use a terminating
event - not just delete the work item or workflow. 
 
You can set the terminating event on the work item itself, in a parallel fork in the workflow or in the 
basic data (i.e. header) of the workflow itself depending on how much you need to bypass. 
 
BUT!!!!!! the point is if you use a terminating event, the workflow log automatically records *how* the workflow was closed, *who* closed it, 
and the workflow itself can still take subsequent actions if you need to such as sending notifications out regardless of whether the task was 
completed via the work item or externally. 
 
As an added bonus, once you have set up the event you can then use terminate/start other workflows should your business process change in the future. 
 
When you just delete the work item you just lose everything!  Not generally something auditors are happy about either....
 
Strongly suggest you rethink your design. 
 

Regards, 
Jocelyn Dart 
Senior Consultant 
SAP Australia Pty Ltd. 
Level 1/168 Walker St. 
North Sydney 
NSW, 2060 
Australia 
T   +61 412 390 267 
M   + 61 412 390 267 
E   jocelyn.dart at sap.com 
http://www.sap.com <http://www.sap.com/>  

The information contained in or attached to this electronic transmission is confidential and may be legally privileged. It is intended only for the person or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any distribution, copying, review, retransmission, dissemination or other use of this electronic transmission or the information contained in it is strictly prohibited. If you have received this electronic transmission in error, please immediately contact the sender to arrange for the return of the original documents. 

Electronic transmission cannot be guaranteed to be secure and accordingly, the sender does not accept liability for any such data corruption, interception, unauthorized amendment, viruses, delays or the consequences thereof.

Any views expressed in this electronic transmission are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of SAP AG or any of its subsidiaries. SAP AG, its subsidiaries, and their directors, officers and employees make no representation nor accept any liability for the accuracy or completeness of the views or information contained herein. Please be aware that the furnishing of any pricing information/ business proposal herein is indicative only, is subject to change and shall not be construed as an offer or as constituting a binding agreement on the part of SAP AG or any of its subsidiaries to enter into any relationship, unless otherwise expressly stated. 

 

________________________________

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Glauco Kubrusly
Sent: Friday, 03 February 2006 6:49 AM
To: SAP Workflow Users' Group
Subject: Re: How to delete a work item by ABAP ?


Thanks Jeffrey, 
 
I've tested and the function SWP_WORKFLOW_INSTANCE_DELETE worked right but it eliminate all the wf instance.
 
I saw in another forum and a friend said me to use the SWWL  transaction and I think it worked properly. I've created a SWWL's SHDB to do that and I think it solves my problem.
 
tanks a lot!
Glauco


Jeffrey Rappaport <Jeff at business-workflow.com> escreveu:

	Glauco,
	 
	   Depending on what you mean by 'Delete' & what version you're on, try:
	 
	SAP_WAPI_WORKITEM_DELETE, 
	SAP_WAPI_ADM_WORKFLOW_CANCEL, 
	SWP_WORKFLOW_INSTANCE_DELETE, 
	SWP_WORKFLOW_INSTANCE_CANCEL,
	SWP_WORKFLOW_ITEM_CANCEL.

	Jeffrey A. Rappaport
	Business Workflow, LLC
	Voice: (732) 355-0123
	Fax:    (509) 757-4144
	Email: Jeff at Business-Workflow.com
	Web:  www.Business-Workflow.com <http://www.business-workflow.com/> 

		----- Original Message ----- 
		From: Glauco Kubrusly <mailto:glaucokubrusly at yahoo.com.br>  
		To: Process Control Step <mailto:sap-wug at mit.edu>  
		Sent: Thursday, February 02, 2006 11:16 AM
		Subj! ect: How to delete a work item by ABAP ?

		Hi Friends,
		
		I want to delete a work item by abap program, because the user can execute some actions by calling the transaction without execute its work item.
		
		I think it can be possible by exit.
		
		Is it really possible ?
		
		Glauco
		MSN: glaucokubrusly at hotmail.com
________________________________

		Yahoo! doce lar. Faça do Yahoo! sua homepage. <http://us.rd.yahoo.com/mail/br/tagline/homepage_set/*http://br.yahoo.com/homepageset.html>  
________________________________

		_______________________________________________
		SAP-WUG mailing list
		SAP-WUG at mit.edu
		http://mailman.mit.edu/mailman/listinfo/sap-wug
		

	_______________________________________________
	SAP-WUG mailing list
	SAP-WUG at mit.edu
	http://mailman.mit.edu/mailman/listinfo/sap-wug
	


________________________________

Yahoo! doce lar. Faça do Yahoo! sua homepage. <http://us.rd.yahoo.com/mail/br/tagline/homepage_set/*http://br.yahoo.com/homepageset.html> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20060203/770989e2/attachment.htm


More information about the SAP-WUG mailing list