How To Delete Old Production Orders

How to delete old production orders ( CO78 )?

Note that CO78 is the start of the Archive process.  We are not using Archiving yet but the initial process fits the bill for what we need to do as mentioned in the original note.

Decide the range of orders you want to delete.  This range will be used in the program variant. Note that we will be running CO78 many times because of the number of orders involved. 

Running CO78 calls program PPARCHP1 and this involves the use of a Variant where the parameters for selection etc. are set. 

First of all, create the variant via SE38 for PPARCHP1. 

Enter details for number range, order type, plant and set deletion flag. Flag Detailed log and set this to go to Spool when running. Save the variant. You can also force the job to run in background at this point (which I would recommend) via menu line Variant --> Attributes.  Also here you can flag order number, order type and plant to be required fields. 

For e.g.
Archiving of Old Production Order

Run CO78
Press the first button - deletion flag/deletion indicator.

Choose the variant you have just created.  Press "Maintain" to update the selection range on subsequent runs. Save changes and return to initial screen.

Press Start date to set date and time for job to run as per any background job. Icon will turn Green.

Press Spool Params to set save output in Spool Q rather than print immediately. Icon will also turn Green.

Press Execute and job can be tracked via SM37.

Details of deleted orders and errors will appear in the Spool.

Rerun as many times as you need with relevant order ranges till all required orders are deleted.

Tips by Jim

Get help for your SAP PP Problems
Do you have a SAP PP Question? 

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

SAP PP Tips
SAP PP Tips and Production Planning/Control Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.