Deletion of primary cost element to which transaction data is posted
This document explains the process of deleting a primary cost element to which transaction data is posted. In case transaction data is not posted to a cost element we can delete the same by restricting its validity by using the transaction code ka04. However once transaction data is posted to we cannot make use of the t-code ka04 directly.
When transaction data is posted to a cost element, and we try to delete the same we get an error message that dependent records exist in cost element relevant tables as shown below:
To ensure that we are able to delete the cost element, we need to ensure that the data flowing to CO posted to that cost element is deleted.
Deletion of cost element transaction data flowing to CO has to be done following the steps/instructions of SAP note 45122. This requires use of program RKACOR20. This program deletes CO documents according to FI documents.
Using se38 path to access the program RKACOR20:
We need to input the company code, fiscal year and relevant document number of the relevant FI document as indicated below:
Running the same in test run gives the list of CO documents that would be deleted:
We subsequently run the same in real run:
Thereafter we delete the cost element using t-code ka04
i) Test Run:
ii) Real Run
Once deleted we see the same does not exist:
It is essential that the precautionay steps in SAP notes 45122 and 356608 are referered before proceeding with the above deletion.