{"audience":"Cost accountants and controllers who allocate the hours of maintenance and service units.","authorization_objects":[{"note":"Authorization to post to sending and receiving cost centers","object":"K_CSKS"},{"note":"Authorization to post to the receiving internal order","object":"K_ORDER"},{"note":"Cost center accounting transaction authorization","object":"K_CCA"}],"components":[],"countries":[],"effort_days_max":5,"effort_days_min":3,"effort_size":"M","faq":[{"a":"The quantity is multiplied by the planned price of the activity type on the sending cost center. Without a plan price the row fails; prices are planned in KP26.","q":"How is the allocated amount calculated?"},{"a":"Yes, the resulting CO document is reversed with KB24N. Because the program lists the document number, the reversal is easy.","q":"Can an incorrect upload be reversed?"},{"a":"Activities usually reach production orders through confirmations. This program covers cost centers and internal orders; other receiver types are assessed as additional scope.","q":"Can activities be allocated to production orders too?"}],"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 are downloaded to a separate file to be fixed and uploaded again."},{"code":"background","label":"Runs as a background job","note":""}],"functions":[{"name":"BAPI_ACC_ACTIVITY_ALLOC_CHECK","role":"Checks the package without posting"},{"name":"BAPI_ACC_ACTIVITY_ALLOC_POST","role":"Posts the direct activity allocation as a CO document"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful packages permanently"}],"gap":"KB21N enters a direct activity allocation on screen as one document; it does not read a file. Hour records are often kept in a tracking tool outside SAP or in Excel, and hundreds of rows are keyed in at month end. An upload with a test mode that separates failed rows and posts the rest is needed.","id":"co-activity-allocation-upload","industries":[],"input_columns":[{"derived":false,"label":"Sending cost center","required":true,"rule":"","target_field":"KOSTL","target_table":"CSKS"},{"derived":false,"label":"Activity type","required":true,"rule":"","target_field":"LSTAR","target_table":"CSLA"},{"derived":false,"label":"Receiving cost center","required":false,"rule":"","target_field":"KOSTL","target_table":"CSKS"},{"derived":false,"label":"Receiving internal order","required":false,"rule":"","target_field":"AUFNR","target_table":"AUFK"},{"derived":false,"label":"Quantity","required":true,"rule":"","target_field":"MBGBTR","target_table":"COEP"},{"derived":false,"label":"Unit","required":false,"rule":"","target_field":"LEINH","target_table":"CSLA"},{"derived":false,"label":"Text","required":false,"rule":"","target_field":"SGTXT","target_table":"COEP"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read; sending cost center, activity type, receiver (cost center or internal order) and quantity are mandatory on every row.\n2. Checks: the sending and receiving cost centers must be valid in CSKS on the posting date, the internal order must exist in AUFK, the activity type must be valid in CSLA and the unit in the file must match CSLA-LEINH.\n3. Rows are split into packages of P_PACK lines and checked with BAPI_ACC_ACTIVITY_ALLOC_CHECK; failed packages are resolved row by row.\n4. In test mode only the check result is shown. In a real run BAPI_ACC_ACTIVITY_ALLOC_POST is called and then saved with BAPI_TRANSACTION_COMMIT.\n5. The posted value is calculated with the planned activity price and written to COEP/COSS; the CO document number, errors and a file of failed rows are listed.","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":"Sending cost center","source_field":"KOSTL","source_table":"CSKS"},{"calculated":false,"formula":"","label":"Activity type","source_field":"LSTAR","source_table":"CSLA"},{"calculated":true,"formula":"Receiving cost center or internal order number","label":"Receiver","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Quantity","source_field":"MBGBTR","source_table":"COEP"},{"calculated":true,"formula":"From the BAPI return messages: posted, test OK or error","label":"Status","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"CO document","source_field":"BELNR","source_table":"COBK"},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"parameter","label":"Controlling area","name":"P_KOKRS","ref_field":"CSLA-KOKRS","required":true},{"example":"C:\\temp\\faaliyet_ekim.xlsx","kind":"parameter","label":"Upload file (XLSX or CSV)","name":"P_FILE","ref_field":"","required":true},{"example":"31.10.2026","kind":"parameter","label":"Posting date","name":"P_BUDAT","ref_field":"COBK-BUDAT","required":true},{"example":"Ekim bakım saatleri","kind":"parameter","label":"Document header text","name":"P_BLTXT","ref_field":"COBK-BLTXT","required":false},{"example":"300","kind":"parameter","label":"Lines per document","name":"P_PACK","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false}],"part_of":[],"performance":"Keeping the package size between 200 and 500 lines keeps the number of documents reasonable and makes reprocessing easy after an error. Master data for the cost center and activity type checks is read once at the start.","process":"R2R","quote_url":"https://nekuhub.com/en/request-a-quote/?report=co-activity-allocation-upload","related":["co-activity-price-absorption","co-statistical-key-figure-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Enters a direct activity allocation on screen; does not read a file.","tcode":"KB21N"},{"note":"Displays posted activity allocations; does not upload.","tcode":"KB23N"}],"summary":"A custom program that reads hours and machine times spent by workshops, maintenance or service units from an Excel file and posts them as direct activity allocations from the sending cost center to a receiving cost center or internal order. It checks first, then lists the CO document number and message per row.","tables":[{"access":"write","join_on":"COEP-KOKRS = P_KOKRS","role":"Activity allocation CO line items (written through the BAPI)","table":"COEP","variant":"both"},{"access":"write","join_on":"COSS-OBJNR = alıcı nesne AND COSS-PAROB = gönderen nesne","role":"Secondary cost and activity quantity totals","table":"COSS","variant":"both"},{"access":"read","join_on":"CSLA-KOKRS = P_KOKRS AND CSLA-LSTAR = dosyadaki faaliyet türü","role":"Activity type validity and unit","table":"CSLA","variant":"both"},{"access":"read","join_on":"CSKS-KOKRS = P_KOKRS AND CSKS-KOSTL = dosyadaki masraf yeri","role":"Validity of sending and receiving cost centers","table":"CSKS","variant":"both"},{"access":"read","join_on":"AUFK-AUFNR = dosyadaki sipariş AND AUFK-KOKRS = P_KOKRS","role":"Existence of the receiving internal order","table":"AUFK","variant":"both"}],"title":"Mass Direct Activity Allocation Upload from Excel","url":"https://nekuhub.com/en/programs/mass-activity-allocation-upload-from-excel/","vendor_id":"nekudos"}