<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body style="MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
Hi Rob,
<br>Though there might be many ways of deleting the workitem from Inbox,I
have used a
<br>background job to delete the workitems which are say 1 week old.This
background job will run every day and delete all the workitems created
by my workflow only which are 1 week old.I am using a report program which
does the actual job.
<br>The code used is:
<br>REPORT YMIB_DELETE_ORDRSP_MAIL .
<p><A HREF="data:begin">data:begin</A> of i_swwwihead occurs 0,
<br>wi_id like swwwihead-wi_id,
<br>end of i_swwwihead,
<br>l_date like sy-datum.
<br>
<br>
<p>l_date = sy-datum - 1.
<p>select wi_id from swwwihead into table i_swwwihead
<br>where WI_RH_TASK = 'TS00008075'
<br>and wi_cd between l_date and sy-datum.
<br>loop at i_swwwihead.
<p>CALL FUNCTION 'SWW_WI_DELETE'
<br> EXPORTING
<br> WI_ID
= i_swwwihead-wi_id
<br>* DO_COMMIT
= 'X'
<br>* CREATE_EVENT
= ' '
<br>* DELETE_LOG
= ' '
<br> EXCEPTIONS
<br> UPDATE_FAILED = 1
<br> OTHERS
= 2
<br> .
<br>IF SY-SUBRC <> 0.
<br> MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
<br> WITH SY-MSGV1 SY-MSGV2
SY-MSGV3 SY-MSGV4.
<br>ENDIF.
<p>endloop.
<p>ROB CRAWFORD wrote:
<blockquote TYPE=CITE> <font size=-2>I am trying to delete a couple
of work items which are the result of a custom workflow template.
I get the following error if I(the WF-Admin) try to delete the work item
from the action list. "Work item could not be accepted (->function
canceled)" I have also tried to delete the work item using SWWL specifying
the work item and I don't get any results back. The work item still
shows up in the user's inbox and in SWI5(workload analysis). Is there
something special I need to do in the development of the workflow to allow
deletion of a work item? How can I get rid of these work items?</font> <font size=-2>-Rob</font> <font size=-2>Rob
Crawford</font>
<br><font size=-2>Menasha Advantage</font>
<br><font size=-2>1649 Bergstrom Rd.</font>
<br><font size=-2>Neenah, WI 54957</font>
<br><font size=-2>(920)751-2513</font>
<br><font size=-2><a href="mailto:rob.crawford@menasha.com">rob.crawford@menasha.com</a></font></blockquote>
</body>
</html>