How to delete cost elements in SAP

Scenario: The user had created the cost elements by mistake. And they have done some postings in that cost elements.  Later they realize that it
should not have been a cost element at first place.  The system will not allow you to use the transaction KA04.

Solution:  You need to delete the transaction data ie. CO documents for that cost element. Run program RKACOR20. If you are happy with the list, proceed with deleting the CO documents.  And then you delete the cost element using transaction KA04.

See SAP note 37093 that advises you delete the cost element for the validity date in the future ie. next year.