What is SAP CO_ORDER?
CO_ORDER is the SAP archiving object for internal orders, covering AUFK and related controlling data.
CO_ORDER is the SAP archiving object that archives internal orders, covering the AUFK master record and related controlling data such as totals and status history. An order can be archived only after it is settled, closed and past the residence times set for its order type.
How CO_ORDER works
Internal orders collect costs for projects, events or overhead. Their master data sits in AUFK, status in JEST and JCDS, and costs in totals and line item tables. CO_ORDER works in phases that follow the order’s status.
First a deletion flag is set. After residence time 1, a deletion indicator can be set. After residence time 2, the order can be archived. Residence times are maintained per order type. CO line items in COEP can also be archived separately with CO_ITEM, which is often done first to reduce volume.
How to archive internal orders with CO_ORDER
- Settle the orders (for example KO88 for individual or KO8G for collective settlement) so the balance is zero.
- Set status to Closed (CLSD) once no further postings are expected.
- Check residence times 1 and 2 for the order type in KOT2_OPA.
- In SARA, enter CO_ORDER and run preprocessing to set deletion flags and indicators.
- Create a write variant, run test mode, then production write.
- Run the delete program and review the log for skipped orders.
- Keep archive files in a linked content repository and confirm read access.
Use S_ARCHIVE for CO_ORDER and avoid running during period-end settlement.
Key parameters
| Parameter or field | What it controls | Recommended setting or note |
|---|---|---|
| Order type | Which orders are selected | Archive one order type at a time |
| Residence time 1 | Months from deletion flag to deletion indicator | Long enough to undo mistakes |
| Residence time 2 | Months from deletion indicator to archiving | Align with audit cycle |
| System status | TECO, CLSD, DLFL, DLT | Only closed orders progress |
| Test mode | Simulation | Run before every production write |
CO_ORDER vs related objects
| Object | Purpose | When to use it | Status |
|---|---|---|---|
| CO_ORDER | Internal order archiving | Closed internal orders | Current |
| CO_ITEM | CO line item archiving | Reduce COEP volume early | Current |
| PM_ORDER | Maintenance order archiving | Plant maintenance and service orders | Current |
| PP_ORDER | Production order archiving | Manufacturing orders | Current |
| JEST / JCDS | Status and status history | All orders | Current |
Common issues and troubleshooting
Why does CO_ORDER skip my internal orders?
The order is not closed, has a remaining balance, carries open commitments or has not met residence times. The write log lists the reason per order.
Why can I not set the deletion flag on an internal order?
Usually the order still has a balance or open purchase commitments. Settle and clear commitments first.
Why are COEP rows still present after CO_ORDER?
Line items are often archived separately with CO_ITEM. Check whether CO_ITEM ran for the same objects and periods.
CO_ORDER in S/4HANA migration and decommissioning
Internal orders hold the cost history of capital projects, marketing programs and R&D work. That history supports capitalization decisions, grant claims and transfer pricing, so it often needs retention well after the order closes.
The risk is archiving the order but losing its settlement link, or leaving closed orders in a retired system with no access. Asset values capitalized from an order can then no longer be traced to source costs. Archive closed orders before conversion and keep them with settlement documents in an SAP archiving platform.
- List closed internal orders by type and year.
- Settle and close remaining orders before the final run.
- Archive CO_ITEM and CO_ORDER for the same scope.
- Keep settlement documents with the archived orders.
- Confirm order status history is retained.
Frequently asked questions
What is CO_ORDER in SAP?
CO_ORDER is the archiving object for internal orders in SAP Controlling. It archives the order master record in AUFK together with status history and related controlling data once the order is settled, closed and past its residence times. It runs through SARA like other archiving objects.
What are residence time 1 and residence time 2 for internal orders?
Residence time 1 is the minimum time between setting the deletion flag and the deletion indicator. Residence time 2 is the minimum time between the deletion indicator and archiving. Both are set per order type and protect against archiving orders too soon.
What is the difference between CO_ORDER and CO_ITEM?
CO_ORDER archives the internal order itself with its dependent data. CO_ITEM archives CO line items, such as COEP rows, for any controlling object by period. Many teams run CO_ITEM first to reduce volume, then CO_ORDER once orders are closed. Both run through SARA.
Do internal orders need to be retained after decommissioning?
Often yes. Internal orders document capital project costs, grants and transfer pricing, which auditors and tax authorities can review years later. Retain archived orders with settlement documents so capitalized values can be traced back to the original costs. Keep status history as well.
Further reading
See Also
Ready to put this into practice?
See how Archon helps organizations with compliant archiving and legacy decommissioning.