How to make Excel uploads to SAP repeatable
Excel to SAP automation means an upload stops depending on the person who built it. In PostNow.ai a designer builds the template (BAPI or recording, column mapping, field rules) and publishes it run-only to the template library. Operators Validate, Simulate and post under their own SAP login, with the document number beside each row and every posting in a central audit.
This page is about the tenth run of an upload, not the first. For a first load, start with how to upload data into SAP from Excel; to choose a method for one object, see SAP mass upload from Excel; for where Excel uploads sit among other SAP automation, see SAP process automation.
When should a one-off Excel upload become a template?
PostNow.ai makes the call cheap, because a saved template is the same mapping you already built for the first run. Our rule of thumb: promote the upload to a published template as soon as any of these is true.
- The file comes back. Month-end accruals, quarterly price changes and new-hire cost centre moves all start as "just this once."
- Someone other than the author will post it. The author knows that column D must be text so leading zeros survive. The next person does not.
- Last time you fixed values by hand. Padding vendor numbers, retyping dates, correcting "EURO" to
EUR. Those fixes belong in the template's field rules, not in someone's memory. - A controller wants to see it before it posts. That needs an approval step tied to the data, not an email with an attachment.
- Audit will ask who posted what. A shared spreadsheet macro has no answer. A template run under named SAP users, with a central log, does.
If none of these apply, keep it as a one-off and do not spend an afternoon on governance for a file you will never see again.
How PostNow.ai makes an Excel to SAP upload repeatable
PostNow.ai splits the work into build, publish and run, and different people with different rights do each stage. This is the sequence we use for every recurring upload.
Build against the live system
The designer picks the BAPI by name in the connected SAP system, or records the transaction once through SHDB, and maps the columns. Building against the live system matters for a team template: field lengths, check tables and required fields come from the system the operators will post to, not from a spreadsheet someone typed. The first build is walked through in how to upload data into SAP from Excel.
Write the rules into the template
Every fix someone used to make by hand becomes a field rule: leading zeros to a target length, a date format per column, an allow-list with Restrict on (only document type
SA, only company code1010), "* " on required headers. For a BAPI template, a regex rule (digits, alphanumeric, 3-letter currency, YYYYMMDD, amount) is enforced before Run. The operator no longer has to know that column D must be text.Fix how the template runs
Template Settings hold the Simulate OK-code for recorded transactions and can hide Debug or Validate from operators. Result columns are mapped here too:
$DOC_NOand$V1to$V4for a BAPI,MSG_V1toMSG_V4for a recording, so the document number has a home before anyone runs the file.Publish and put it in the library
Publish produces a self-contained workbook that is run-only for everyone, designers included: no mapping pane, no authoring buttons. Publish to Library stores it in the portal's central template library. Publishing again under the same name adds a new version, operators always open the latest, and archiving a template hides it from operators without losing its history. To change a published template, the designer edits the saved source file and publishes again.

Operators run it
An operator uses Open from Library, pastes or types the month's data, then runs Validate, Simulate and Run. Posting uses the operator's own SAP user and password, so SAP's authorisations are theirs, not the designer's. The sheet is protected while a run is in progress: scrolling works, typing does not.
Wrap it in controls
The admin portal switches Reports, Posting, Mass Change, Debug, Schedule and Simulate per user; approvals and audit are covered below.
Designer vs operator: who builds and who runs SAP uploads
PostNow.ai enforces the split in the add-in and in the portal: operators get a run-only ribbon, and authoring requests from an operator are refused by the portal. This is the split we would set up on day one.
| Task | Designer | Operator |
|---|---|---|
| Record a transaction, map fields, build loops and conditions | Yes | No (buttons and panes hidden) |
| Save the template, Publish, Publish to Library, archive | Yes | No |
| Open from Library | Opens the published workbook run-only, like everyone else | Opens run-only |
| Validate | Yes | Yes, unless the designer hid it |
| Simulate | Yes, with the Simulate switch on | Yes, with the Simulate switch on |
| Run and Retry Failed | Yes, with the Posting switch on | Yes, with the Posting switch on |
| Debug (recorded transactions only) | Yes | Follows the designer's setting |
| Create approval policies | Yes (designers and admins) | No |
| Approve a run | Only users named on the policy, and never the person who submitted it | |
| Mass Change | Builds the query binding | Changes the selection values only |
Two habits make this work. Keep designers few, two per process area, and ideally not the people who usually post. And never "quickly fix" a published file at month end: it is run-only, so the fix goes into the source template and a new version, which every operator gets on their next Open from Library.
How to validate Excel data before it posts to SAP
PostNow.ai checks a file in layers, and each layer catches what the one before cannot. Operators should know which layer catches which error, because that is how far a green result can be trusted.
| Layer | What it checks | Left to the next layer |
|---|---|---|
| Validate (file check, no SAP call) | Required fields, type and number, length, invalid characters, date format, decimal places, allowed values. Failing cells turn coral, the Run Log says why, and errors export to CSV. | Whether a code exists in SAP, or whether SAP will accept the document |
| Pre-Validation (opt-in) | That referenced master data exists, through a check-table lookup in SAP: does this cost centre, vendor or plant exist? | Whether the combination posts, for example a closed period or a blocked account |
| Simulate, BAPI template | The BAPI is called with the real data and then BAPI_TRANSACTION_ROLLBACK instead of a commit, so SAP runs its own checks and returns its messages per row. A BAPI that commits inside SAP, such as the billing BAPI, is tested with its own test flag on a quality client | No commit, so no document number |
| Simulate, recorded transaction | Three verdicts: would post, review (warnings), would not post. With a simulate OK-code (built in as =BS for FB50 and other FI posting transactions, or set per template) SAP runs its full document check, including balance. | Without a simulate OK-code the save is stripped and only screens are checked; the result says duplicate and balance checks run only on a real Run |
| Run | Everything SAP checks on a real posting. Each BAPI call is committed only when SAP returns no E or A message; otherwise it is rolled back. | n/a |
Debit equals credit is left to SAP on purpose. A journal that does not balance passes Validate and is caught by Simulate or by Run, so SAP's own balance rule decides rather than a second copy of it in Excel that drifts from your configuration. For any financial template, make Simulate compulsory.

Writing SAP results back into Excel, row by row
PostNow.ai writes the outcome of every row into the same sheet the operator posted from, so nobody reconciles a log file against a spreadsheet afterwards.
- Run Log column. Each row gets a success message or a message starting with
ERROR, with SAP's own text. - Document number columns. The result tokens mapped in the template write the number, and up to four message variables, into columns you choose.
- Custom message. A designer can build the Run Log text from SAP's message variables, for example "Posted 100000123 in 1010", and save values to columns at the same time.
- Retry Failed. After fixing the cells, Retry Failed re-posts only the rows whose Run Log starts with
ERROR. A re-entry lock stops a double click from starting two runs. - Open the document. Clicking a document number opens the display transaction, prefilled for
FB03,ME23N,VA03,MM03,XK03andXD03. It is display only. - AI Review of a failed row. It explains the failure from SAP's messages, the BAPI or transaction name and the field structure. Cell values are not sent by default.

Approval workflow for SAP uploads from Excel
PostNow.ai approvals are tied to the data, not to the file name or an email thread. A designer or admin creates a policy in the portal with a name, an optional template name and transaction code to match, an optional department, and between one and twenty approvers from your organisation.
- When an operator clicks Run on a template the policy covers, the add-in offers to submit it. It builds a review grid from the mapped columns and row range, plus a SHA-256 fingerprint of the data, and blocks the run.
- An approver opens the request in the portal's web grid, with no Excel needed, and approves, rejects or requests changes with a comment. The first decision counts. The server refuses a decision by the submitter, admins included.
- The run proceeds only when the request is approved and the data still matches the fingerprint. Change one cell after approval and the run is blocked again; a rejection or change request shows the reviewer's comment and offers a resubmission.
- After the run, the outcome is reported back and the request is marked posted or post failed. Every state change is stored as an append-only event.
Two behaviours to plan around. A new policy can take up to five minutes, or the next template load, to start gating a template someone already has open, because the add-in caches the policy answer so Run does not wait on the network. And the policy check runs against the PostNow.ai portal: if the portal cannot be reached, the check lets the run through. Keep the portal reachable from the PCs that run approved templates, and keep SAP authorisations as the hard stop.
Audit trail and SAP authorisations for Excel postings
PostNow.ai records each posted document centrally and leaves SAP's own records untouched, so you end up with two independent trails.
- PostNow.ai Posting Audit (portal). One record per document: transaction code, template, SAP system ID, client, SAP user, success or message, and document number. Records are append-only, with no edit or delete. Admins see everyone's runs, other users see their own, filtered by date, transaction code and success or failure. A local
bdc_audit.csvis kept on the PC as well. - SAP's own records. Postings go through standard BAPIs or CALL TRANSACTION, never direct table writes, so SAP records them as postings by the operator's SAP user, and objects with change documents get them in
CDHDRandCDPOSas they would for a manual entry. - Approval history. Who submitted, who decided, the comment and the outcome, per request.
On authorisations, be precise with your auditors. A BAPI runs SAP's authorisation checks under the operator's user. Recorded transactions are posted by CALL TRANSACTION from a program, and for that kind of call SAP checks the transaction-code authorisation (S_TCODE) only when transaction SE97 or the profile parameter auth/check/calltransaction says so. The checks the transaction itself makes, on company code or document type for example, still run. So do not rely on S_TCODE alone to keep someone away from a recorded upload; use PostNow.ai's Posting switch and template access, and your organisational authorisations in SAP.
Worked example: monthly accruals posted by three plant accountants
PostNow.ai carries this process from the central finance team's template to three plant accountants' monthly runs. Company code 1010 books month-end accruals for plants 1010, 1020 and 1030. Each plant accountant posts their own file of 20 to 40 lines; the group controller wants to approve each file before it posts.
Build (central finance designer, once)
- Template. BAPI mode on
BAPI_ACC_DOCUMENT_POST. A marker column turns oneHrow (company code, document typeSA, dates, referenceACCR-1010-10, header text) plus itsDrows into one document. The BAPI fields themselves are mapped as in the FB50 first-upload example. - Rules. G/L account and cost centre get leading zeros to 10 characters. Cost centre uses SAP lookup with Pre-Validation, so a mistyped cost centre fails before anything is posted. Currency has the 3-letter currency regex. Posting date is
DD.MM.YYYY, because that is how the plants type it. Document type defaults toSAand is restricted toSA. - Results.
$DOC_NOgoes to a Doc No column. - Publish. Saved as
accruals_1010.pnb, published, and sent to the library. The admin turns Posting and Simulate on for the three accountants. The controller is named approver on a policy scoped to the template.
Run (plant accountant, every month)
- Open and fill. Open from Library, paste 32 lines for plant 1020.
- Validate. Two coral cells: one cost centre not found in SAP, and a currency typed as
EURO. Both are fixed in the sheet. - Simulate. One document comes back with SAP's balance error, because a credit line was typed as a positive amount. The sign is corrected and Simulate is clean.
- Submit. Run is blocked by the policy; the accountant submits with a note ("October accruals, plant 1020"). The controller reviews the grid in the portal and approves.
- Run. The document numbers land in the Doc No column. Had the accountant changed a value after approval, the fingerprint would no longer match and Run would have stayed blocked until a new approval.
- Check. At quarter end, the controller filters the Posting Audit by date and failed postings and sees every plant's runs in one place.
The controller never opens an Excel attachment, and no plant accountant can change the mapping, the rules or the approver.
BAPI or recording for a repeatable template
PostNow.ai supports both, and for a template a team will run for years the tie-breaker is upgrades. A BAPI template has no screens to break, so prefer it wherever a BAPI covers the fields. A recording replays the exact screens, including your field defaults, and is the route where no BAPI fits, but plan a Debug run after every support pack. Two shapes go elsewhere: changes to existing records go through Mass Change, which posts only the rows you edited, and several BAPIs per row in sequence go through a chain (BAPI-only). The per-object choice, including MIRO and ME21N, is in SAP mass upload from Excel; recordings that hold up are covered in the BDC recording guide, and pricing in VK11 upload from Excel.
Pre-run checklist for a team template
PostNow.ai enforces most of these in the template, but the list is what we walk through before the first live run of any new team template.
- Connected to the right system. Check which SAP system the ribbon shows you are logged in to before Run, especially if you also have a test system.
- Latest version. Opened from the library today, not from a copy saved to the desktop last quarter.
- Long identifiers are text. Excel keeps 15 significant digits in a number column, so a 16-digit reference pasted into one is changed before the template sees it. Format those columns as text; the template pads leading zeros itself.
- Run scope. Start row and end row match the data; no stray totals row at the bottom.
- Validate clean, then Simulate clean. For financial documents, Simulate is the only check before Run that tests balance.
- Approval in place. If a policy should cover this template, confirm a test submission is actually blocked before relying on it.
- Not already posted. Before a real Run, PostNow.ai reads the Run Log of the rows in scope and offers Skip posted rows, Post again or Cancel. If the Run Log was cleared or the file is a copy, check the Posting Audit for this file first.
- Debug once after a support pack. For a recorded template, a Debug run with errors only on one row after a support pack or customizing change shows a moved screen before operators meet it.
What to plan for in Excel to SAP automation
PostNow.ai shares the controls with SAP and with your process. Design around these before the first month-end, together with the two approval behaviours in the approvals section.
Posted documents are reversed in SAP
Stop cancels the remaining rows. Documents already posted stay in SAP and are reversed there the usual way, for example with FB08 for a journal. Undo in PostNow.ai covers the designer's template configuration.
Re-runs after an interrupted run
Retry Failed re-posts only rows marked ERROR, and before a fresh Run PostNow.ai offers to skip rows whose Run Log shows them posted. If Excel or the network drops mid-run, rows that reached SAP may have no Run Log entry. Check the Posting Audit or SAP itself before running those rows again.
Pick the mode that fits the logic
Conditional blocks belong to recorded transactions; the BAPI Logic tab handles loops, and chains of several BAPIs per row run in BAPI mode. Mass Change works on flat templates, pulls 100 rows by default and asks for confirmation above 500.
Simulate follows the simulate code
For recorded transactions without a simulate OK-code, Simulate checks screens only. For FI transactions other than FB50, compare one Simulate verdict with a manual test posting in your system before the team relies on it.
Long texts go through the BAPI
When a long text has to reach SAP with the document, map the BAPI's own text table like any other field.
Messages a team template produces, and the fix
PostNow.ai adds a few messages of its own around SAP's. These are the ones operators ask about; SAP's posting messages are covered in first-upload errors and the recording ones in BDC error messages.
| Message | What it means | Fix |
|---|---|---|
| Run blocked: approval needed, awaiting review, or data changed since approval | An approval policy covers the template, and either no request exists, it is pending, or the data no longer matches the approved fingerprint | Submit, wait for the decision, or resubmit after your edit |
| Not found in SAP master data (Pre-Validation) | The check-table lookup did not find the value: a typo, missing leading zeros, or a record not yet created | Correct the cell, or create the record first |
| No failed rows: "No rows in the Run Log column (A) are marked ERROR" (Retry Failed) | Retry Failed found nothing to re-post from the current Start Row down | If failures sit above the Start Row, set it back to the first data row and retry |
Frequently asked questions
How does PostNow.ai automate Excel uploads to SAP?
A designer maps an Excel template to an SAP BAPI or a transaction recorded through SHDB and writes the field rules into it: leading zeros, date formats, allow-lists, required fields. The template is published as a run-only workbook to the central library. Operators open it, Validate, Simulate and post under their own SAP login, with the document number or SAP message written beside each row, inside approval policies and a central posting audit.
What is the difference between a designer and an operator in PostNow.ai?
Designers build templates: they record transactions, map fields, set rules, publish to the library and create approval policies. Operators get a run-only ribbon: they open published templates, validate, simulate, run and retry failed rows. Published workbooks are run-only for designers too, so changes go through the source template and a new version.
How do I validate Excel data before posting to SAP?
In PostNow.ai, Validate checks types, lengths, formats and allowed values without calling SAP, and optional Pre-Validation confirms referenced master data exists. Simulate then tests against SAP: a BAPI is called and rolled back, and a recorded FI transaction can run SAP's full document check with a simulate OK-code. Debit-equals-credit is checked only by Simulate or Run.
Can SAP document numbers be written back to Excel automatically?
Yes. In PostNow.ai every row gets a Run Log entry with SAP's success or error message, and the template writes the document number and up to four message variables into columns. Clicking a document number opens the display transaction, such as FB03.
How do approvals work for SAP uploads from Excel?
A designer or admin creates a policy in the PostNow.ai portal that names the template or transaction code and up to twenty approvers. Run is blocked until an approver other than the submitter approves the request in the portal, and the approval is tied to a SHA-256 fingerprint of the data, so editing a cell afterwards blocks the run again. The check runs against the portal, so keep it reachable from the PCs that run approved templates and keep SAP authorisations as the hard stop.
Is there an audit trail for SAP postings made from Excel?
Yes. PostNow.ai sends one append-only record per posted document to the portal's Posting Audit: transaction code, template, SAP system, client, SAP user, result and document number. Because postings go through standard BAPIs or CALL TRANSACTION under the user's own login, SAP's own document and change records are written as for a manual entry.
When should a one-off Excel upload become a reusable template?
When the file comes back each period, when someone other than its author will post it, when values had to be fixed by hand last time, or when someone has to approve it or audit will ask who posted it. If none of those apply, a one-off upload is fine.
Do Excel uploads to SAP respect SAP authorisations?
Postings from PostNow.ai run under the operator's own SAP user, so the authorisation checks in the BAPI or transaction apply to that user. For recorded transactions posted by CALL TRANSACTION, SAP checks the transaction-code authorisation S_TCODE only if SE97 or the profile parameter auth/check/calltransaction requires it. Control access with organisational authorisations and PostNow.ai's per-user Posting switch.
Turn your next recurring upload into a template
Build it once, publish it to the library, and let your team validate, simulate and post with the SAP result beside each row.

