You are on page 1of 17

Archiving Work Items

Applies to:
Applies to ECC 6.0

Summary
The Worldwide Workflow Survey revealed that many are not archiving work items in workflow. These tables
can build up fast quickly. This paper walks you through the steps to archive work items using SAP standard
utilities.

Author: Tammy Powlas


Company: Fairfax Water
Created on: 16 August 2010

Author Bio
Tammy Powlas works for Fairfax Water, is a SAP Mentor and ASUG volunteer with the BI and
BITI communities. She is SAP-certified in FI, CO, BW, SEM and ASAP.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Archiving Work Items

Table of Contents
Work Item Archiving ............................................................................................................................................ 3
Background: .................................................................................................................................................... 3
Prerequisite ..................................................................................................................................................... 3
Transaction AOBJ ........................................................................................................................................... 4
Transaction SWW_SARA – Write Program .................................................................................................... 7
Transaction SWW_SARA – Delete Program ................................................................................................ 12
Related Content ................................................................................................................................................ 16
Disclaimer and Liability Notice .......................................................................................................................... 17

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Archiving Work Items

Work Item Archiving


The 2010 Workflow Survey showed that only 38% of respondents are archiving. Most performance
problems in Business Workplace are caused by not archiving work items. Archiving work items should be
part of an overall archiving strategy of a company. Only cancelled or closed work items are eligible for
archiving.

Background:
“Archiving helps you control your data growth and system performance”. The overall steps are shown here:

Source: ASUG Data Archiving 101 Presentation – J. Malfetti, R. Jackson

A write program is written to the archive file and then a delete program is run to delete the information from
the online database.

Prerequisite
During an archiving delete run all (activated) archive information structures belonging to an archiving object
are filled automatically. See this note from the SAP Help:
Use transaction SARJ to activate archive info structure SAP_BO_2_WI_001 (Business Object Repository) or
SAP_O_2_WI_001 (Object-Oriented class structures)

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Archiving Work Items

Transaction AOBJ
Use this transaction to set up variants for running the archiving (“write”) program in test mode and production
mode.

Press ENTER to continue.


Select the POSITION button:

Enter WORKITEM

Select Customizing Settings and WORKITEM and double-click Customizing Settings.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Archiving Work Items

At this point you will set up variant names to run archiving program in test mode and production mode.

In this example, we will enter TEST as the variant name and click the Variant button.

Leave it in Test Mode and select SAVE option when exiting screen.

Enter Meaning and click SAVE button. Select BACK button.


To set up production variant, enter PROD as description and click the Variant button:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Archiving Work Items

Select Production Mode radio button and click BACK button.

Select Yes button.

Enter Meaning and click SAVE.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Archiving Work Items

Click SAVE.

Now you are reading to test the archiving workflows write program to the archive file.

Transaction SWW_SARA – Write Program


The archiving program reads work items for archiving and writes them into an archive. The deletion program
deletes the work items from the database. The archiving object is WORKITEM.
Enter transaction SWW_SARA

Click Write

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Archiving Work Items

We will enter the variants created under transaction AOBJ.

Enter TEST and click Maintain

Enter desired parameters and click SAVE

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
Archiving Work Items

Click Start Date

Follow normal background job steps

Next click Spool Params to see if you want to print the log

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Archiving Work Items

Execute

SM37 to check

Here are the work items before archiving:

Test Archiving Result Log:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
Archiving Work Items

Now to archive in production mode, enter your production mode variant and follow the same steps as test:

Execute

SM37 to check
The log looks the same except is shows Production mode:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Archiving Work Items

Transaction SWW_SARA – Delete Program


The deletion program deletes the work items from the database. These steps walk you through the deletion
program.

Click DELETE button.

Select Test Mode

Click Archive Selection.

Select session to delete and press ENTER.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
Archiving Work Items

Click Start Date and run immediate.

Click SPOOL PARAMETERS and select appropriate spool parameters and click EXECUTE.

Message received below is:

Check through normal steps using transaction SM37

Check the test mode output:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 13
Archiving Work Items

Now follow the same steps and click off test mode and Archive Selection button:

Follow the same steps as test mode, and then Execute after all lights are green:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 14
Archiving Work Items

Check the production output log:

Now check to see that the workflows are now gone:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 15
Archiving Work Items

Related Content
Workflow Survey Response to Comments
2010 Workflow Survey Responses
Recent Archiving Blog

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 16
Archiving Work Items

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 17

You might also like