{"audience":"Controllers, month-end close teams and cost accountants who collect cost center corrections.","authorization_objects":[{"note":"Actual posting authorization in cost center accounting","object":"K_CCA"},{"note":"Posting authorization for internal orders","object":"K_ORDER"}],"components":[],"countries":[],"effort_days_max":5,"effort_days_min":3,"effort_size":"M","faq":[{"a":"No. The reposting happens only in CO; the FI document, tax and subledgers are not affected. If profit center or functional area changes, the new general ledger or, on S/4HANA, the real-time integration carries it to the FI side as well.","q":"Does the program change the FI document?"},{"a":"No. The CO period lock (OKP1) and the FI period opening settings apply. The program shows rows in a locked period as errors in test mode.","q":"Can I repost into a closed period?"},{"a":"Yes. An original FI document number column can be added to the template; the program then reads the original line, checks amount and cost element, and reposts per line much like KB61.","q":"Can the original document be referenced?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"error_file","label":"Download failed lines as a separate file","note":"Failed rows can be corrected and uploaded again with the same template."},{"code":"excel","label":"Export to Excel","note":"An empty upload template can be downloaded as Excel."}],"functions":[{"name":"BAPI_ACC_PRIMARY_COSTS_POST","role":"Reposts primary costs in CO from sender to receiver"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful documents permanently"}],"gap":"KB11N enters one reposting document on a screen; it reads no file and gives no per-row check list. The dozens of corrections that come from cost center owners at month-end are therefore keyed in by hand. Reversing and re-posting in FI is usually unwanted because it affects tax and subledgers.","id":"co-primary-cost-reposting-upload","industries":[],"input_columns":[{"derived":true,"label":"Document key","required":true,"rule":"Rows with the same key are posted in one CO document","target_field":null,"target_table":null},{"derived":false,"label":"Posting date","required":true,"rule":"","target_field":"BUDAT","target_table":"COBK"},{"derived":false,"label":"Sending cost center","required":false,"rule":"","target_field":"KOSTL","target_table":"CSKS"},{"derived":false,"label":"Sending order","required":false,"rule":"","target_field":"AUFNR","target_table":"AUFK"},{"derived":false,"label":"Receiving cost center","required":false,"rule":"","target_field":"KOSTL","target_table":"CSKS"},{"derived":false,"label":"Receiving order","required":false,"rule":"","target_field":"AUFNR","target_table":"AUFK"},{"derived":false,"label":"Cost element","required":true,"rule":"","target_field":"KSTAR","target_table":"CSKB"},{"derived":false,"label":"Amount","required":true,"rule":"","target_field":"WTGBTR","target_table":"COEP"},{"derived":false,"label":"Currency","required":true,"rule":"","target_field":"TWAER","target_table":"COEP"},{"derived":false,"label":"Item text","required":false,"rule":"","target_field":"SGTXT","target_table":"COEP"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read; rows with the same document key are collected into one CO document.\n2. Every row is checked for the existence and postability of sender and receiver: the cost center must be valid in CSKS on the posting date and not locked for actual primary costs, and the internal order must exist in AUFK with a status that allows posting.\n3. The cost element is confirmed as primary through CSKB-KATYP; if selected, the sender is checked for enough balance on that period and cost element to move.\n4. Rows are mapped to the BAPI_ACC_PRIMARY_COSTS_POST structures: document header (controlling area, posting date, text) and sender/receiver lines. In test mode the BAPI is called as a test.\n5. In a real run BAPI_TRANSACTION_COMMIT is called; the resulting CO document (COBK/COEP) and messages are listed per row.","module":"CO","object_type":"upload","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":true,"formula":"Document key from the file","label":"Document key","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"CO document","source_field":"BELNR","source_table":"COBK"},{"calculated":true,"formula":"Posted, test passed or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"C:\\temp\\maliyet_duzeltme.xlsx","kind":"parameter","label":"Upload file (XLSX or CSV)","name":"P_FILE","ref_field":"","required":true},{"example":"1000","kind":"parameter","label":"Controlling area","name":"P_KOKRS","ref_field":"COBK-KOKRS","required":true},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Check the sender balance","name":"P_BALCHK","ref_field":"","required":false}],"part_of":["co-cost-center-reorganization-pack"],"performance":"Each document key is one BAPI call; files with a few hundred rows run in seconds in the foreground. The balance check reads COSP by object and period key.","process":"R2R","quote_url":"https://nekuhub.com/en/request-a-quote/?report=co-primary-cost-reposting-upload","related":["co-activity-allocation-upload","co-cost-center-line-items-vendor-po"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Enters one reposting document on screen; no bulk posting from a file.","tcode":"KB11N"}],"summary":"A custom program that moves primary costs posted to the wrong cost center or internal order to the right object in bulk from Excel rows. It reposts in CO without touching the FI document, checks everything in test mode first and lists the CO document number of every row.","tables":[{"access":"write","join_on":"","role":"Header of the resulting CO reposting document","table":"COBK","variant":"both"},{"access":"write","join_on":"","role":"Sender and receiver object line items","table":"COEP","variant":"both"},{"access":"read","join_on":"","role":"Check that the cost center is valid and open for posting","table":"CSKS","variant":"both"},{"access":"read","join_on":"","role":"Existence and object number of the internal order","table":"AUFK","variant":"both"},{"access":"read","join_on":"CSKB-KOKRS = CSKS-KOKRS AND CSKB-KSTAR = COEP-KSTAR","role":"Check that the cost element is primary","table":"CSKB","variant":"both"},{"access":"read","join_on":"","role":"Period balance of the sending object (optional check)","table":"COSP","variant":"both"}],"title":"Mass Primary Cost Reposting Upload from Excel","url":"https://nekuhub.com/en/programs/mass-primary-cost-reposting-upload-from-excel/","vendor_id":"nekudos"}