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
The following requirements must be met before the deletion flag can be set:
If so, these must be deleted first.
The deletion flag can only be activated if the order has already been settled, or if no actual costs were incurred for the order. This means that the actual costs for the order must be equal to zero.
If so, these must be deleted first.
If so, each lot must have the Completion of all inspections is set and the Usage decision made status.
If so, these must be processed first.
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.