Archiving Prerequisites (PP-PI) 
A process order must have a deletion flag and a deletion indicator before it can be archived.
After the second residence time has expired, orders are archived and immediately deleted from the database.
Residence Times
Residence times are part of the order type. To set residence times in Customizing for Process Orders, choose Master data
® Order ® Define order types.Residence time 1 is the time between the activation of the deletion flag and the activation of the deletion indicator.
Residence time 2 is the time between the activation of the deletion indicator and the time at which the order can be archived and deleted from the database.

If the duration of residence time 1 equals 0, activating the Deletion flag will automatically activate the Deletion indicator.
Prerequisites for Setting Deletion Flags
Before a deletion flag is set, the following requirements must be met:
The deletion flag can only be activated if the order has already been settled, or if no actual costs were incurred for the order. You must therefore make sure that the balance of the order is zero.
If the order contains inspection lots, the lot must have the Completion of all inspections is set status or the Usage decision made status.
If the status Partially confirmed or Partially delivered is still active in the order, the system issues a warning message.
When the deletion flag is activated, all remaining capacity requirements are deleted. A deletion indicator is also set in any open reservations.

An order that has been flagged for deletion cannot be changed. You can, however, cancel the deletion flag.