Inquiry: method to clear completed workitems from inbox besides a rchival?

Mei, Brian C SITI-ITDSAS bmei at Shell.Com
Tue Jan 22 17:14:36 EST 2002


Hi,
 
Being fairly new to workflow admin, is there a way to clear completed
workitems from a user's inbox besides archiving?  Or, is that the only way
in a production system?  The problem is a user has around 30,000 of these
items clogging his inbox and wishes to delete them.  (This also increases
the wait time for the user's inbox to appear.)  I tried using RSWWWIDE (txn
SWWL, in 4.6B), but the report doesn't return all of the workitems for
deletion.  Of 30,000, the report returned maybe 100 entries.  I want to do
it for only this user, so I'd input the user's id as the agent, and I've
tried specifying the workitem type 'W' (dialog workitem) and also with the
field blank - with no success.
 
I also came across the following code from another colleague's inquiry, but
it seems to take care of the items based on a specified "task ID"
(WI_RH_TASK).  For my case, would it make sense to perform the select based
on the fields "created by user" (WI_CRUSER) & workitem "type" (WI_TYPE) to
handle this particular situation?
 
Thanks,
Brian C. Mei
SAP Basis Consultant
 
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.
 


More information about the SAP-WUG mailing list