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

Becker Stephan (extern) Stephan.Becker.ext at mchw.siemens.de
Wed Jan 23 03:52:36 EST 2002


Brian,
 
using SWWL will delete single workitems and destroy the integrity of
workflow instances that are still running, as well as killing your audit
trail. You might end up with a whole bunch of workflows in error status. SAP
is recommending not to use it under normal circumstances in production
systems.
 
Completed workitems are never displayed in users' inboxes. Either the
workflow you are running does not properly set items to completed status, or
the user has not completed the items. Make sure you understand which is the
case before deciding what to do.
 
You can force completion of a workITEM by setting it complete manually. You
could write a program doing this en masse by emulating the functionality in
workitem change. Remember that the workFLOW instance for that workitem will
continue after the forced completion of the item, and depending of what the
rest of the workflow does, it may miss the data from the step that you
forced to complete, but that probably wasn't properly executed.
To force completion of the workflow instance, complete the FLOWitem (type
F), which is the "header" of a workflow instance, so to say. Completion of
the flowitem will complete all steps of the workflow instance.
 
Greetings,
Stephan
 
 
-----Original Message-----
From: Mei, Brian C SITI-ITDSAS [mailto:bmei at Shell.Com]
Sent: Dienstag, 22. Januar 2002 23:15
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Inquiry: method to clear completed workitems from inbox besides
a rchival?
 
 
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