How to do an SAP profit center upload from Excel
PostNow.ai does an SAP profit center upload by calling BAPI_PROFITCENTER_CREATE once per profit center from an Excel sheet, under your own SAP login. Each row carries the controlling area, the profit center key, the validity dates, the name, the person responsible, the standard hierarchy node and the segment; the company codes go into the BAPI's COMPANYCODES table. Validate checks the file, Simulate lets SAP check every profit center and rolls back, and Run commits each one that SAP accepts and writes SAP's message to its row. Load in this order: segments and the standard hierarchy first, then profit centers, then cost centers.
This page covers one object: profit center master data (KE51 on ECC, KE51 or the Manage Profit Centers app on S/4HANA), created in bulk from Excel. The cost centers that reference these profit centers are covered in mass cost center creation with KS01. For choosing an upload method across all SAP objects, see SAP mass upload from Excel.
How PostNow.ai creates profit centers from Excel
PostNow.ai treats a profit center upload as a BAPI template: a designer builds it once against your SAP system, publishes it, and controllers run their own files through it under their own SAP login. BAPI mode needs no PostNow.ai objects in SAP, only RFC access and the normal profit center authorisations.
1. Pick BAPI_PROFITCENTER_CREATE from your own system
Search for PROFITCENTER in the BAPI Explorer and choose BAPI_PROFITCENTER_CREATE. PostNow.ai reads its interface from your system, so the mapper shows the parameters your release has: PROFITCENTERID, VALIDFROM, VALIDTO, BASICDATA, ADDRESS, COMMUNICATION, INDICATORS, LANGUAGE and the COMPANYCODES table.

2. Map the columns, and decide one row or several per profit center
Map the key, dates and basic data to their columns by drag and drop, with Auto Map, or with Mapping AI (which sees your headers or a screenshot, never the cell values). If each profit center goes to one company code, keep it flat: one row, one company code column. If it goes to several, use an H/D marker: the H row holds the profit center, each D row under it adds one line to COMPANYCODES. Flat rows with a split column on the profit center key do the same without a marker column.

3. Fix what should not vary
Give the controlling area a fixed value (one controlling area per template), and do the same for the company code line's assignment flag ASSIGN_TO_PRCTR (X). Put allow-lists on segment and hierarchy node and switch on Restrict, so Validate refuses a node from another region. Numeric profit center keys get leading zeros automatically, because the SAP field uses the ALPHA conversion: 101100 reaches SAP as 0000101100. Excel date cells are sent as YYYYMMDD; for text dates, set the column's date format.
4. Validate, with SAP look-ups where they help
Validate checks the file offline: required fields, lengths, characters, dates and allowed values. Switch on Pre-Validation per field and give it a check table, and PostNow.ai also asks SAP whether the values exist: segment against FAGL_SEGM, company code against T001, user responsible against USR02. Each look-up checks one field, so a hierarchy node looked up in SETHEADER proves a group of that name exists, not that it sits in this controlling area's standard hierarchy. Simulate checks that.
5. Simulate, then pilot
Simulate calls the BAPI for every profit center and then BAPI_TRANSACTION_ROLLBACK instead of a commit, so SAP's own checks (hierarchy node, company codes, segment, duplicates) come back on each row without creating anything. Do the first Simulate in a quality client. The BAPI also has its own TESTRUN parameter if you want a test run on SAP's side. Then run a few rows with Run Scope and open them in KE53 before you run the rest. If an approval policy covers the template, Run waits until someone other than the submitter approves this exact data.
6. Run, and re-run only what failed
Run calls the BAPI once per profit center. If SAP returns no E or A message, PostNow.ai calls BAPI_TRANSACTION_COMMIT with wait; otherwise it rolls back and the row shows SAP's error. The profit center key comes from your file, so there is no new number to write back: the Run Log carries SAP's answer. Retry Failed re-posts only rows marked ERROR, scanning from the current Start Row down. A normal Run first lists rows that already posted and offers Skip posted rows, Post again or Cancel.
KE51 mass upload: BAPI_PROFITCENTER_CREATE or a recording
PostNow.ai can create profit centers either way, and for a standard load we build on the BAPI. It has no screens, the controlling area is a field instead of a popup, and company codes are a table instead of a scrolling tab.
| Route | How it posts | Use it when | Watch out for |
|---|---|---|---|
| PostNow.ai: BAPI_PROFITCENTER_CREATE | One RFC call per profit center; commit only if SAP returns no error | New profit centers in bulk, repeat loads, run-only templates for controllers | Company codes must be sent explicitly; check the status after the pilot |
| PostNow.ai: KE51 recording | CALL TRANSACTION on an SHDB recording, through the ZPOSTNOW_* objects | Fields only the screen reaches, such as customer fields added to the profit center master | The controlling area popup, and the company code tab |
| SAP S/4HANA Migration Cockpit, profit center object | Migration templates, staged and simulated in the cockpit | The initial S/4HANA load of a whole controlling area, run by the migration team | A project tool, not a day-to-day upload; see SAP Migration Cockpit |
| S/4HANA Fiori: Edit Profit Centers – Collective, Edit Company Code Assignments | Collective processing of existing profit centers | Changing many existing records at once | Changes, not a file-driven create |
Why recordings of KE51 need care. SAP removed the controlling area from the initial screens of CO transactions: it comes from the user parameter CAC or from a "Set Controlling Area" popup. SAP's help says that in batch input the "Set Controlling Area" popup comes before the transaction itself, and that sessions using the controlling area should fill it (transaction OKKS, screen SAPLSPO4 0100, field SVALD-VALUE(1)). So a KE51 recording made by a user with CAC set may not match what a replay sees; prove it with a user who has no CAC. The BAPI has no such dependency. There is also one thing the BAPI cannot do: it has no EXTENSIONIN parameter, so customer fields on the profit center master need the recording. The general trade-off is in BAPI vs BDC in SAP, and how to record so a recording replays is in the BDC recording guide.
BAPI_PROFITCENTER_CREATE fields: what goes where
PostNow.ai shows the BAPI's parameters as SAP defines them. In a standard profit center upload you will use these; lengths are the SAP field lengths.
| Parameter-field | KE51 field | Length | Notes |
|---|---|---|---|
PROFITCENTERID-CO_AREA | Controlling area | 4 | Fixed value per template, for example A000 |
PROFITCENTERID-PROFIT_CTR | Profit center | 10 | You choose the key; numeric keys are zero-padded (ALPHA) |
VALIDFROM-DATE / VALIDTO-DATE | Analysis period | 8 | The whole validity period; split into analysis periods later in a change |
BASICDATA-PRCTR_NAME / LONG_TEXT | Name / Long text | 20 / 40 | Saved in the language of the LANGUAGE parameter |
BASICDATA-IN_CHARGE / IN_CHARGE_USER | Person responsible / User responsible | 20 / 12 | The first is free text; the second must be an SAP user |
BASICDATA-PRCTR_HIER_GRP | Profit center group (hierarchy area) | 12 | An end node of the standard hierarchy; stored in CEPC-KHINR |
BASICDATA-SEGMENT | Segment | 10 | Checked against FAGL_SEGM |
BASICDATA-DEPARTMENT | Department | 12 | Free text |
INDICATORS-LOCK_IND | Lock indicator | 1 | Blocks postings for the validity period; leave blank on a normal create |
COMPANYCODES (table) | Company Codes tab | – | One line per company code: COMP_CODE and the one-character assignment flag ASSIGN_TO_PRCTR. SAP documents it only as a flag; X is the value used in practice, so confirm on the pilot that KE53 shows the assignment |
RETURN (export) | – | – | A single BAPIRET2 structure, not a table: one message comes back per call |
Two details trip people up. RETURN is one structure: a profit center with three problems shows one at a time. And the create BAPI has no BASICDATAX: every field you send is written. The X-structures belong to BAPI_PROFITCENTER_CHANGE, where PostNow.ai fills them from the fields you map.
Load order: segments, hierarchy, profit centers, then cost centers
PostNow.ai posts each object in the order you run its templates, and SAP checks every reference at save, so the order of the loads is part of the design. The standard hierarchy name has to be assigned to the controlling area before the first profit center can be created.
- Controlling area settings and segments (Customizing). The standard hierarchy name is set for the controlling area in Customizing; without it, SAP answers
KM 024"Standard hierarchy has not been defined in controlling area". Segments are Customizing too, and must exist inFAGL_SEGMbefore a profit center can name them. In classic Profit Center Accounting, the dummy profit center is also created in Customizing, not in your file. - The standard hierarchy nodes. Every profit center is assigned to an end node of the standard hierarchy, so the nodes come first (transaction KCH5N, EC-PCA: Change Standard Hierarchy). SAP's help adds the reverse rule: once a node holds profit centers, you can no longer hang another node under it, so design the levels before the load. A new region usually adds a handful of nodes; build them by hand. For many nodes, SAP ships
BAPI_PROFITCENTERGRP_CREATE, which PostNow.ai's BAPI search finds; its nested node table is worth a test on one group before you rely on it. - Profit centers, with their company codes, then a status check in KE53.
- Cost centers, each pointing at a profit center (
PROFIT_CTRinBAPI_COSTCENTER_CREATEMULTIPLE). This is where date gaps surface:KM 700"Profit center … does not exist for …" means the cost center's validity starts before the profit center's. See KS01 mass cost center creation. - Everything that derives a profit center (material plant data, orders, assets) comes after, and posts to the profit center only once it is active.
Validity dates, analysis periods and the standard hierarchy node
PostNow.ai sends one validity period per profit center, which is how SAP wants a new profit center created: SAP's help says to enter the entire validity period as the analysis period and split it into analysis periods later, through a change.
- The node is not time-dependent. SAP's help states that the hierarchy area is always valid for the entire period of validity, so it cannot tell analysis periods apart. If a profit center moves to another node, every period moves with it; plan reorganisations around that.
- Enterprise organisation overrides. Where the enterprise organisation is active in the controlling area, the hierarchy area you send is overwritten as soon as the profit center is assigned to another node there.
- Changing dates later. SAP checks the new validity against the old in the change:
KM 742"The new period of validity must overlap with the old one",KM 746"There are gaps in the profit center's period of validity" andKM 754"There is an overlap between validity periods in the profit center". Treat a date change as its own template onBAPI_PROFITCENTER_CHANGE, proved on one profit center. - Lock indicator. With
LOCK_INDset, postings for the interval stop withKM 136"Profit center … is locked for the date …". Leave it out of a create template unless the business really wants locked profit centers.
Company code assignment, segment and document splitting
PostNow.ai sends the company codes you map, one COMPANYCODES line per company code. That matters, because the dialog does more for you: in KE51 the system assigns the new profit center to all company codes in the controlling area by default, and you exclude the ones you don't want.
- Send the company codes explicitly, and check the Company Codes tab of the pilot profit centers in KE53 (table
CEPC_BUKRS). A posting to a profit center that is not assigned to the company code is rejected, which SAP's help states for the dialog andKM 183"No postings can be made to profit center … in company code …" says at posting time. - The company code must belong to the controlling area. A company code from another controlling area cannot be assigned;
KM 074"Company code … belongs to controlling area …" is SAP telling you so. - The segment rides on the profit center. When you post to a profit center, the segment is posted too, and SAP's training material notes that segments can only be derived automatically through profit centers. A wrong segment therefore lands on every posting.
- Get the segment right first time. On ECC, SAP KBA 2205584 documents that the segment cannot be changed in KE52 once transaction data are posted, even with the changeability switch of Note 940721 set. On S/4HANA, moving postings to another profit center or segment is a reorganisation project, not a master data edit.
- Document splitting. Where profit center or segment is a splitting characteristic marked mandatory, SAP rejects postings that cannot be assigned one; with zero balancing, SAP adds clearing lines so each profit center balances per document. Profit centers that exist but are inactive, unassigned to the company code, or not yet valid on the posting date produce the same kind of rejection, often on the first day after go-live.
Worked example: 18 profit centers for a new business unit
PostNow.ai handles this with one published BAPI template. Finance sets up a new business unit, Industrial Services, in controlling area A000: 18 profit centers, 101100 to 101270, each assigned to company codes 1010 and 1020, segment SEG_IS, under the new node PC_IS_EMEA.
- Settle the dates first. The cost center file starts on 01.12.2025, because December accruals already belong to the new unit. The profit centers are therefore valid from 01.12.2025 to 31.12.9999, not from 1 January as first planned.
- Prepare SAP. FI has created segment
SEG_ISin Customizing. The controller addsPC_IS_EMEAunder the region node in KCH5N by hand: one node is quicker than a template. - Lay out the sheet. 18 H rows (key, dates, name, person responsible, node, segment) and 36 D rows (
1010and1020under each). Controlling area, valid-to andASSIGN_TO_PRCTRare fixed values. - Validate. Pre-Validation on segment against
FAGL_SEGMflags three rows typedSEG-ISwith a hyphen. Fixed in the sheet. - Simulate. Seventeen profit centers come back clean.
101180comes back with SAP's message that it already exists in controlling areaA000: someone created it in KE51 last week. That row is removed; the existing record is corrected in KE52. - Pilot. Run Scope rows 2 to 10, the first three profit centers with their company code rows. In KE53 all three show the node, segment and both company codes, and their status is checked on the Basic data tab before going on.
- Run the rest. Start Row back to 2, Run, and the guard offers to skip the three profit centers already posted. Fourteen more post. The Run Log shows SAP's message on each H row.
- Hand over. Profit Center Master 360 shows 17 profit centers in
SEG_IS, valid from 01.12.2025. The cost center load can start.
Checklist before a profit center upload
PostNow.ai enforces formats, fixed values and allow-lists in the template; this list covers what it cannot decide for you.
- The standard hierarchy is defined for the controlling area, and every node in the file exists as an end node in it.
- Every segment exists in
FAGL_SEGM, and the business has signed off segment per profit center. - Valid-from covers the earliest cost center, order or posting that will use each profit center.
- Keys follow the controlling area's naming convention and none already exist (run Profit Center Master 360 for the range first).
- Every profit center has its company codes in the file, and each company code belongs to the controlling area.
- The first Simulate and the pilot run in a quality client.
- After the pilot, KE53 shows the expected status; inactive profit centers are activated (Customizing: Master Data > Profit Center > Activate Inactive Profit Centers) before cost centers are loaded.
- Someone owns the follow-on loads: cost centers, then material and order assignments.
Profit center upload errors and what they mean
PostNow.ai writes SAP's message into the Run Log of the profit center's row. These are the messages of class KM you are most likely to meet. The texts are SAP's short texts; the meanings are the usual causes, so read the full message on the row.
| Message | What it usually means | Fix |
|---|---|---|
KM 733 Profit center … already exists in controlling area … (SAP has close variants, KM 180 and KM 003 “already exists from … to …”, so the number you see may differ) | The key is taken: an earlier run, a manual KE51, or a key typed twice in the file | Remove the row; change the existing record with a change template or KE52 |
KM 019 Profit center group … cannot be used here | SAP will not take the group as this profit center's node. Check first that it is an end node of this controlling area's standard hierarchy (KBA 2900540 reports the same message in a profit center migration) | Fix the node in the file, or move the group into the standard hierarchy |
KM 023 Specify a hierarchy area | PRCTR_HIER_GRP is empty | Map the node column, or give it a fixed value |
KM 024 Standard hierarchy has not been defined in controlling area … | Customizing for the controlling area is not finished | Set the standard hierarchy name for the controlling area first |
KM 392 At least one company code must be assigned to each profit center | The call left the profit center with no company code | Send at least one COMPANYCODES line with the ASSIGN_TO_PRCTR flag set |
KM 738 Profit center … saved in inactive status | The profit center exists but takes no postings yet | Activate it before cost centers or postings refer to it |
KM 700 Profit center … does not exist for … (on the cost center load) | The profit center does not exist for the cost center's dates: usually the cost center's validity starts before the profit center's | Extend the profit center's validity or fix the cost center date |
| PostNow.ai: "No rows in the Run Log column (A) are marked ERROR" | Retry Failed found nothing to re-post from the current Start Row down | Set Start Row back to 2 after a pilot |
For a failed row, AI Review in the run diagnostics explains SAP's message in plain language. By default it receives the message, the BAPI name and the field structure, never the cell values.
How to check profit centers after a mass upload
PostNow.ai gives you the first check per row: the Run Log, plus the central audit, which records each run's template, SAP system, client, user and result. The rest comes from SAP.
- KE53 for a sample: status and analysis period on the Basic data tab, hierarchy area, segment, and the Company Codes tab.
- Tables:
CEPC(one row per profit center and validity interval, withKHINR,SEGMENT,LOCK_IND),CEPCTfor texts,CEPC_BUKRSfor company code assignments. - Report Library in PostNow.ai: Profit Center Master 360 (FICO-03) puts every profit center with its validity, segment, hierarchy area, person responsible and lock indicator into Excel; Cost Center Master 360 (FICO-02) shows which profit center each cost center points at, once those are loaded. Operators can run both under their own SAP authorisations. See the Report Library.
Reconcile three numbers per load: profit centers against CEPC, company code lines against CEPC_BUKRS, and profit centers per segment against the sign-off.
Where profit center uploads get hard: limits to plan around
PostNow.ai posts through the BAPI or the screen, so SAP's profit center rules apply and PostNow.ai adds none of its own.
- No undo. Stop cancels the profit centers not yet sent; created ones stay in SAP.
- Activation is SAP's step. PostNow.ai does not activate inactive profit centers; check the status in KE53 and activate in SAP.
- Hierarchy building is a separate job, done before the profit center load.
- The re-run check reads this sheet's Run Log. A new file with the same profit centers is not caught by PostNow.ai, but SAP rejects existing keys with
KM 733. A row marked UNKNOWN (SAP's answer lost after sending) needs a look in KE53 before it is posted again.
Making a template like this repeatable for a team (designers who build, operators who only run, a published template in the central library, approvals tied to the data) is covered in Excel to SAP automation.
SAP profit center upload on S/4HANA: what changes
PostNow.ai uses the same BAPI on ECC and S/4HANA, because BAPI_PROFITCENTER_CREATE and KE51 are still there; what changes is around them.
- Profit center postings live in the universal journal. On S/4HANA, profit center accounting runs in
ACDOCAinstead of the classic EC-PCA ledger8A. The master data load itself is the same. - Fiori apps sit next to KE51. Manage Profit Centers creates and maintains single records; Edit Profit Centers – Collective and Edit Company Code Assignments change many at once. None of them reads your Excel file.
- The standard hierarchy node is a required field in Manage Profit Centers, and a newly created profit center group has to be linked into the standard hierarchy before you can pick it there (SAP KBA 3059554 describes the case).
- The first load of a new implementation usually goes through the Migration Cockpit; PostNow.ai fits the loads after go-live: new units, carve-outs, restructures.
The cost centers for these profit centers are in KS01 mass cost center creation, and G/L accounts in FS00 mass G/L account creation.
BAPI_PROFITCENTER_CREATE as above. For the load that follows, the free KS01 cost center template (mapped to BAPI_COSTCENTER_CREATEMULTIPLE, with a Profit Center column) is listed with the other controlling templates on the finance and controlling templates page.
