{"audience":"Controllers, master data teams and CO consultants handling reorganizations, new companies or new plants.","authorization_objects":[{"note":"Cost center master maintenance authorization by controlling area","object":"K_CSKS"},{"note":"Cost center accounting authorization","object":"K_CCA"}],"components":[],"countries":[],"effort_days_max":5,"effort_days_min":3,"effort_size":"M","faq":[{"a":"The hierarchy node in the file must exist in the standard hierarchy. If new nodes should be created from the file as well, a group creation step can be added to the program; this extra scope increases the effort range.","q":"Can cost center groups be created too?"},{"a":"If the valid-from date is given with a new date, a new time slice of the cost center is created from that date; a profit center change from the new year is loaded this way, for example.","q":"How are time-dependent changes made?"},{"a":"Yes. The cost center BAPIs are supported on S/4HANA as well. With a clean core approach the same flow can be built on the released cost center APIs.","q":"Can it be used on S/4HANA?"}],"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":"The corrected file can be uploaded again with the same template."},{"code":"excel","label":"Export to Excel","note":"An empty upload template can be downloaded as Excel."},{"code":"background","label":"Runs as a background job","note":""}],"functions":[{"name":"BAPI_COSTCENTER_CREATEMULTIPLE","role":"Creates new cost centers"},{"name":"BAPI_COSTCENTER_CHANGEMULTIPLE","role":"Updates existing cost centers"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful rows permanently"},{"name":"BAPI_TRANSACTION_ROLLBACK","role":"Rolls back changes in test mode and for a failed package"}],"gap":"KS01 creates one cost center; KS12 changes several cost centers on screen but neither reads a file nor creates new ones. In a reorganization, hundreds of cost centers must be created on the same day with the right profit center and hierarchy; doing this by hand takes days and is error-prone.","id":"co-cost-center-mass-create-upload","industries":[],"input_columns":[{"derived":false,"label":"Cost center","required":true,"rule":"","target_field":"KOSTL","target_table":"CSKS"},{"derived":false,"label":"Valid from","required":true,"rule":"","target_field":"DATAB","target_table":"CSKS"},{"derived":false,"label":"Valid to","required":false,"rule":"","target_field":"DATBI","target_table":"CSKS"},{"derived":false,"label":"Name","required":true,"rule":"","target_field":"KTEXT","target_table":"CSKT"},{"derived":false,"label":"Description","required":false,"rule":"","target_field":"LTEXT","target_table":"CSKT"},{"derived":false,"label":"Person responsible","required":true,"rule":"","target_field":"VERAK","target_table":"CSKS"},{"derived":false,"label":"Cost center category","required":true,"rule":"","target_field":"KOSAR","target_table":"CSKS"},{"derived":false,"label":"Hierarchy node","required":true,"rule":"","target_field":"KHINR","target_table":"CSKS"},{"derived":false,"label":"Company code","required":true,"rule":"","target_field":"BUKRS","target_table":"CSKS"},{"derived":false,"label":"Profit center","required":true,"rule":"","target_field":"PRCTR","target_table":"CSKS"},{"derived":false,"label":"Functional area","required":false,"rule":"","target_field":"FUNC_AREA","target_table":"CSKS"},{"derived":false,"label":"Currency","required":false,"rule":"","target_field":"WAERS","target_table":"CSKS"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read; the first row is skipped as the header.\n2. Every row is checked for mandatory fields and values: the company code must be assigned to the controlling area, the profit center must be valid and unlocked in CEPC, and the cost center category and currency must exist.\n3. If the cost center and valid-from date already exist in CSKS, the row is processed as a change (when P_CHANGE is set), otherwise as a new record.\n4. Rows are mapped to the BAPI_COSTCENTER_CREATEMULTIPLE or BAPI_COSTCENTER_CHANGEMULTIPLE structures; in test mode the BAPI is called with its test flag and rolled back with BAPI_TRANSACTION_ROLLBACK.\n5. In a real run, successful rows are saved with BAPI_TRANSACTION_COMMIT; results and messages are listed per row, and failed rows can be downloaded as a separate file.","module":"CO","object_type":"upload","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Cost center","source_field":"KOSTL","source_table":"CSKS"},{"calculated":true,"formula":"From the BAPI return messages: created, updated 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\\masraf_yerleri.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":"CSKS-KOKRS","required":true},{"example":"X","kind":"checkbox","label":"Test mode (check without saving)","name":"P_TEST","ref_field":"","required":false},{"example":"","kind":"checkbox","label":"Update existing cost centers","name":"P_CHANGE","ref_field":"","required":false}],"part_of":["co-cost-center-reorganization-pack"],"performance":"The BAPI can take several cost centers in one call; sending rows in packages of 100 balances speed and error isolation well. Files with thousands of rows can run in the background.","process":"R2R","quote_url":"https://nekuhub.com/en/request-a-quote/?report=co-cost-center-mass-create-upload","related":["co-cost-center-plan-upload","co-cost-center-profit-center-assignment-check"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Creates one cost center; no bulk creation from a file.","tcode":"KS01"},{"note":"Changes several cost centers on screen; does not create cost centers or read a file.","tcode":"KS12"}],"summary":"A custom program that creates or updates cost centers in bulk from Excel or CSV rows, with description, person responsible, company code, profit center and standard hierarchy node. It checks everything in test mode first, then lists the result of every row.","tables":[{"access":"write","join_on":"","role":"Cost center master: validity, category, person responsible, company code, profit center, hierarchy node","table":"CSKS","variant":"both"},{"access":"write","join_on":"","role":"Cost center short and long description (per language)","table":"CSKT","variant":"both"},{"access":"read","join_on":"CEPC-KOKRS = CSKS-KOKRS AND CEPC-PRCTR = CSKS-PRCTR","role":"Check that the profit center is valid and unlocked","table":"CEPC","variant":"both"},{"access":"read","join_on":"TKA02-BUKRS = CSKS-BUKRS AND TKA02-KOKRS = CSKS-KOKRS","role":"Check that the company code is assigned to the controlling area","table":"TKA02","variant":"both"}],"title":"Mass Cost Center Creation and Change Upload from Excel","url":"https://nekuhub.com/en/programs/mass-cost-center-creation-upload-from-excel/","vendor_id":"nekudos"}