Professional Documents
Culture Documents
Symptom
You can delete any CO documents from actual postings in cost accounting with the
program ZKACOR21.
The program is an enhancement for the report RKACOR20 (see SAP Note 45122), with
which only CO documents that have been generated from external accounting
documents can be deleted.
If you must also use the deleted data for the delta extraction in BW, you should
use the report ZKACOR21R described below because it generates an inverse
posting.
Important:
If you use the SAP Simple Finance add-on for SAP Business Suite powered by SAP HANA, sFIN 1503,
and the following, subsequent posting of CO documents from external accounting is no longer
possible. In this case, contact SAP before you delete documents and try to post them subsequently.
Other Terms
Defective CO line items that have been generated from CO-internal postings or
allocations (also confirmations). The documents cannot be corrected or reversed
in a different manner.
Solution
In the attachment to this SAP Note, you can find the source code of the program
ZKACOR21, which you can implement in your system, if required.
The program deletes CO line items from CO-internal actual postings and corrects
the corresponding totals records.
If you activate the switch P_RWIN ("Call AC Interface"), documents are passed on
(prior to deletion) as inverse postings to possible receiver applications
(reconciliation ledgers, special ledgers, profit centers), which then carry out
adjustment postings. For this, however, the system must read the master data of
the objects concerned. Errors may occur if the master data is inconsistent or
does not exist. In this case, deactivate the switch P_RWIN. You then have to
clean up the data in the receiver applications using special correction programs
or by deleting and posting subsequently.
Note that in the case of incorrect usage of the program ZKACOR21, data is lost irrevocably.
However, executing the program RKACOR20 is not critical because it has been
ensured that documents deleted from financial accounting documents, material
documents, or SD documents can be posted subsequently.
You can copy the source code for the programs from this SAP Note into the ABAP
Editor using the clipboard or upload it to the ABAP Editor using the upload
function.
Important:
Deleting and subsequently posting CO documents may be problematic if one of the
following actions already exists for the document:
The last two items can be checked using the option "CO follow-on documents" in
transaction RKABSHOW. If a reversal document is concerned that was posted from
external accounting to CO, the fields COBK-STOKZ and COBK-STFLG in the document
header show whether the document was reversed or is a reversal document. In such
cases, you must reverse the transaction before deleting and subsequently posting
a CO document (for example, reverse line item settlement or transfer posting)
and repeat it after the document is repaired. If you do not do this, there is a
risk that document references are no longer correct, and documents may be
settled twice (individually), may be transfer posted, and so on. Normal
settlements cause no problems because possible differences are taken into
account in the next settlement run.
Due to an incorrect document number assignment for down payment documents, the
specified correction reports were changed on February 09, 2004. You should
therefore make sure that the current version is implemented. You can recognize
it in the source code of the subroutine POST_INVERTED_DOCUMENT.
Selection texts:
P_KOKRS: "Controlling area" (from Dictionary)
S_BELNR: "Doc. number" (from Dictionary)
P_BUDAT: "Posting date" (from Dictionary)
P_PERIO: "Period" (from Dictionary)
P_PROT: "Detail lists"
P_TEST: "Test run"
Note that no follow-up documents are generated in other components (EC-PCA, FI-
SL, CO-PA, and so on) for this reversal document. The original posting and the
inverse posting refer to each other in the document text.
Software Components
Correction Instructions
Other Components
Component Description
CO-OM-ACT-E Postings
636923
1351783