What is SAP COEP?
COEP is the SAP table that stores Controlling line items by period for cost centers, orders and other CO objects.
COEP is the SAP table that stores Controlling line items by period, one row for every cost posted to a cost center, internal order or other CO object. It feeds line item reports such as KSB1 and KOB1, and it is archived with the CO_ITEM archiving object.
How COEP works
Every CO-relevant posting writes a header in COBK and one or more lines in COEP keyed by controlling area (KOKRS), CO document number (BELNR) and line (BUZEI). Each line holds the period, fiscal year, value type (WRTTP), object number (OBJNR), cost element and amounts in controlling area, object and transaction currency.
Totals are kept separately in COSP for primary costs and COSS for secondary costs, so plan versus actual reports often read totals while drill-downs read COEP. Assessments, distributions and settlements create large numbers of lines, which is why COEP grows quickly in allocation-heavy systems.
In S/4HANA, actual CO postings are stored in the universal journal ACDOCA. COEP remains available through compatibility views and still holds some value types, so check your release before planning.
How to analyze and archive COEP with CO_ITEM
- Analyze COEP volume by controlling area, year and value type with SE16N or TAANA.
- Identify object types driving volume, such as cost centers or orders.
- In SARA, enter CO_ITEM and set residence times by object type under Customizing.
- Create a write variant for one object type and a closed period range.
- Run test mode, then production write.
- Run delete and check the log.
- Validate that KSB1 or KOB1 totals for archived periods still reconcile to COSP and COSS.
Run CO_ITEM outside period-end close. Users need S_ARCHIVE for CO_ITEM.
Key parameters
| Parameter or field | What it controls | Recommended setting or note |
|---|---|---|
| KOKRS / BELNR / BUZEI | Line item key | Use with period filters for speed |
| PERIO / GJAHR | Period and year | Archive closed years only |
| WRTTP | Value type, such as actual or plan | Archive actuals and plan in separate runs |
| OBJNR | CO object | Prefix shows object type (for example KS or OR) |
| Residence time (CO_ITEM) | Age before archiving per object type | Keep at least the current and prior year online |
COEP vs related objects
| Object | Purpose | When to use it | Status |
|---|---|---|---|
| COEP | CO line items by period | Drill-down and audit | Current, reduced role in S/4HANA |
| COBK | CO document header | All CO documents | Current |
| COSP / COSS | Totals records | Plan versus actual reporting | Current |
| ACDOCA | Universal journal | S/4HANA actuals | Current |
| GLPCA | Profit center line items | Classic EC-PCA | Replaced by ACDOCA in S/4HANA |
Common issues and troubleshooting
Why is COEP growing so quickly?
Periodic assessments and distributions create many lines per cycle. Review allocation cycles for unnecessary segments and archive closed periods with CO_ITEM.
Why does KSB1 not show archived periods?
KSB1 reads the database by default. Archived line items must be read from the archive, which needs CO_ITEM archive files and an access path configured for the report.
Why do totals not match line items after archiving?
Totals in COSP and COSS are not archived by CO_ITEM. That is expected; reconcile archived lines against totals before deletion and keep the evidence.
COEP in S/4HANA migration and decommissioning
COEP is the detail behind every cost center and order balance. It supports internal audits, transfer pricing files and intercompany recharges, where tax authorities ask how a charge was built, line by line.
During conversion, CO actuals are moved into ACDOCA, so unarchived COEP years add runtime and memory. If those years are left in a retired system, the breakdown behind historical allocations is lost. Archive closed periods before conversion and keep them in an SAP S/4HANA migration archive with their headers.
- Size COEP by year, object type and value type.
- Reconcile line items to totals before archiving.
- Archive COBK and COEP together through CO_ITEM.
- Retain allocation cycle definitions for context.
- Confirm line-level search on archived periods.
Frequently asked questions
What is the SAP COEP table?
The SAP COEP table stores Controlling line items by period. Each row records an amount posted to a CO object, such as a cost center or internal order, with period, value type and cost element. Line item reports like KSB1 read it, and it is archived with CO_ITEM.
Is COEP still used in S/4HANA?
Partly. Actual CO postings in S/4HANA are written to the universal journal ACDOCA, and reports read from there. COEP still exists, is exposed through compatibility views and holds some value types. Check your release before assuming the table is empty.
Which archiving object archives COEP?
COEP is archived with CO_ITEM, which archives CO line items by object type and period. Internal orders and other objects have their own archiving objects, such as CO_ORDER, that archive master data and dependent records once the object is closed.
Should COEP data be kept when retiring an SAP system?
Usually yes. COEP shows how costs were allocated, which supports audits, transfer pricing documentation and intercompany charges. Retain it with CO document headers so reviewers can rebuild a balance after the source system is gone. Keep allocation cycle definitions as well, since they explain how amounts were distributed.
Further reading
See Also
Ready to put this into practice?
See how Archon helps organizations with compliant archiving and legacy decommissioning.