Deleting a custom workitem

Deepak Kumar deepak.kmr at wipro.com
Fri Aug 31 00:02:46 EDT 2001


Hi Rob,
Though there might be many ways of deleting the workitem from Inbox,I
have used a
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.
The code used is:
REPORT YMIB_DELETE_ORDRSP_MAIL .
 
data:begin of i_swwwihead occurs 0,
wi_id like swwwihead-wi_id,
end of i_swwwihead,
l_date like sy-datum.
 
 
 
l_date = sy-datum - 1.
 
select  wi_id from swwwihead into table i_swwwihead
where WI_RH_TASK = 'TS00008075'
and wi_cd between l_date and sy-datum.
loop at i_swwwihead.
 
CALL FUNCTION 'SWW_WI_DELETE'
     EXPORTING
          WI_ID         = i_swwwihead-wi_id
*         DO_COMMIT     = 'X'
*         CREATE_EVENT  = ' '
*         DELETE_LOG    = ' '
    EXCEPTIONS
         UPDATE_FAILED = 1
         OTHERS        = 2
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
 
endloop.
 
ROB CRAWFORD wrote:
 
>  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? -Rob Rob Crawford
> Menasha Advantage
> 1649 Bergstrom Rd.
> Neenah, WI 54957
> (920)751-2513
> rob.crawford at menasha.com
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20010831/aa5aff9f/attachment.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Wipro_Disclaimer.txt
Url: http://mailman.mit.edu/pipermail/sap-wug/attachments/20010831/aa5aff9f/attachment.txt


More information about the SAP-WUG mailing list