Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 
This process describes the mass upload of CO reposting using transaction “KB11N”. I checked for any process guide type of a document for this functionality. Although there are some existing documents that gives a lot of tips for this functionality, I could not find a detailed process document and hence thought of contributing one in this area. Although I am in SAP practice for a long time, this is my first blog post.

I shall first narrate the upload process steps and in the later section explain the BADI and BAPI objects associated with this. Using different upload formats, we can also post documents automatically into other related transactions like ‘KB41N’, ‘KB21N’, “KB31” etc.

Standard Transaction to Upload data for CO Reposting: BATCHMAN

As we could see in the below screen, we can perform different functions using all the 4 options.

Screen Print 1:


Data Upload format for KB11N:

The format for upload is as follows. We can add more fields if required that are available in Structures “BAPIRCHDR” for header data and “BAPIRCITM” for item level data.

In the above example, the layout is such that there will be a “Sender Cost Center” and “Receiver Cost Center / Receiver Order”. As we know only one Receiver can be defined per line. Other fields include “Cost Element”, “Quantity”, “Unit of Measure”, “Line Item Text” at the item level. At the header level, we have ‘Document and Posting date’, ‘Currency’, ‘User name’ and “Document Header Text”. Controlling area field is available in both header and Line item.

The Document Number field (DOC_NO) which is available in both header and line item, is the one that connects the header and line item data. This number which appears only once in the header, can repeat multiple times in the line item section. Till the Document Number changes in the line item section, all the items will be grouped into single document for posting purposes. The number used in our example “00001” and “00002” would be replaced with the real internal document number if we are to use internal document numbering. Else the number that is defined here in the case of ‘External Document’ would be assigned as it is. Hence it is important to assign the correct external number ranges in that case.

Once the file is ready for upload, the screen can be updated with all details and can be executed. Let us run in ‘Test mode’.

Screen Print 2:

Upon execution, we see the log as in the below screen; assuming all data is in order.

Screen Print 3:

We can either ‘Post’ from this screen using the ‘Post’ option and go back to the earlier screen and choose ‘post’ option from there. Once posting is completed the following screen with posted document details appears.

Screen Print 4:


On the other hand, if there are any errors in the data (file) , the following message could be seen. In such a case the data needs to be corrected and re uploaded.

Screen Print  5:

Some reasons for incorrect data could be missing User name as this is a mandatory field. Likewise, the Cost element should have 10 characters padded with Zero. The header records and line items records should be aligned properly through the Doc_No field. For example, if there is a line item only in header with a specific Doc_No and not in line item or vice-versa, the file could be rejected. So, one needs to scan the file carefully, if errors are encountered.

Now to post different transactions like KB21N, KB41 etc., the structure used in the text file should be different. The below table might be helpful.

Header BAPI Item BAPI Description
BAPIAAHDR BAPIAAITM Document header: post act. alloc. - BAPI's actual postings
BAPIRCHDR BAPIRCITM Document Header: Post Costs - Actual BAPI Posting
BAPIRRHDR BAPIRRITM Document Header: Post Revenues - Actual BAPI Postings
BAPIMAHDR BAPIMAITM Document Header: Post Man. Alloc. - Actual BAPI Postings
BAPIIAHDR BAPIIAITM Document Header: Post Sender Act. - Actual BAPI Postings
BAPISKFHDR BAPISKFITM Document Header: Post Stat. Key. Fig. - Actual BAPI Postings

Refer to this link for help documents:   CO Repost SAP Help Portal

Prerequisites to be validated prior to executing BATCHMAN:

Before executing this transacti on one may look to check if the specified BADI is active.

SAP IMG Menu Path:

Controlling -> Cost Center Accounting -> Actual Postings -> Data Transfer from External Systems >

BAdI: Implement Transfer of External CO Actual Data

Screen Print  6:


If we click the ‘Definition Documenta’ button in the BADI Screen, a very detailed documentation is available.

Now about the other options available in transaction “BATCHMAN”.

  1. Reversal – This helps to reverse a full set of loaded documents. This works fine.

  2. Post Process – Looks like post process in EBS.

  3. Display Log – The log is pretty good and can be retrieved for all past uploads.

Hope this process is useful for mass upload of data. Your feedback would certainly help  improve the quality of this document further.

J. Swaminathan
Labels in this area