Quick answer

How to upload Excel data into SAP

To upload data into SAP from Excel with PostNow.ai, build one template per transaction: pick the BAPI (BAPI_ACC_DOCUMENT_POST for FB50) or record the transaction, and map each column to a field. Validate checks the sheet, Simulate runs SAP's posting checks on every document, and Run posts under your own SAP login and writes the document number beside each row.

What you need
The PostNow.ai Excel add-in, an SAP user that can post the transaction by hand plus RFC access, and a test client for the first run
Worked example
12 month-end journal entries, 30 lines, company code 1010, through BAPI_ACC_DOCUMENT_POST
Where first uploads fail
Leading zeros and dates that Excel rewrites, documents that don't balance, expense lines without a cost centre
Template
Free FB50 template, or any of the 75 free SAP upload templates

This page is the procedure for a first upload: the data is already in a spreadsheet, and it has to reach SAP correctly now and again next month. If you are still choosing a method per object, start with SAP mass upload from Excel; for loads that recur in a live system, see SAP data loads after go-live.

Before your first upload: what you need

PostNow.ai runs inside Excel on your own computer and posts under your own SAP login, so most of the preparation concerns that login and the client you point it at.

  • The add-in and a PostNow.ai account. Install the add-in and sign in to PostNow.ai from the ribbon. Your admin sets in the portal which of posting, Simulate and Debug your account may use.
  • An SAP user that can do the job by hand. If you can't post FB50 to company code 1010 in SAP GUI, the upload can't either. PostNow.ai calls standard BAPIs or CALL TRANSACTION, so SAP's authorisation checks apply to every row. A BAPI call is a remote function call, so your user also needs S_RFC for the function groups involved. SAP Help Ask your basis team before the first run, not during it.
  • A test client. Run the whole file there first. Switching clients is a different choice in SAP Login, not a different template.
  • Codes, not descriptions. SAP wants SA, not "General journal", and 1010, not the company's name. Translate in the sheet before you map.
  • Optional: your own Anthropic API key, if you want Mapping AI to match columns. Without it you map with Auto Map or drag and drop.

How to upload data into SAP from Excel in PostNow.ai: 9 steps

In PostNow.ai the first upload of a file takes nine steps. After that the saved template remembers steps 2 to 5, so next month starts at step 6.

SAP BAPI Tutorial: Excel to SAP FB50 Automation | BAPI_ACC_DOCUMENT_POST
Watch: posting FB50 journal entries from Excel into SAP through BAPI_ACC_DOCUMENT_POST.
  1. Step 1. Connect to SAP with your own login

    Click SAP Login, choose the system and client, and enter your own SAP user and password; "Remember me on this device" is optional. Point it at a test client for the first upload. Everything below works the same in production, and the first mistakes are cheaper in test.

  2. Step 2. Start a template on the transaction's BAPI

    Click New and choose BAPI. PostNow.ai searches the function modules in your live system by name; if your user may not search, it offers a built-in list of common BAPIs. If you know the transaction but not the BAPI, Find with AI takes a plain-English description and ranks suggestions, with a built-in transaction table behind it (MIRO to BAPI_INCOMINGINVOICE_CREATE, BP to BAPI_BUPA_CREATE_FROM_DATA). G/L postings of the FB50 kind go through BAPI_ACC_DOCUMENT_POST.

    Take the BAPI whenever one exists. It doesn't depend on screen layouts, and PostNow.ai commits each document only when SAP's return holds no E or A message; anything else is rolled back. No BAPI for your screens? See the recording route below.

  3. Step 3. Lay out the sheet: a header row, then its lines

    A journal entry is one header and several lines, so the sheet has to say which rows belong together. PostNow.ai reads a marker column: H starts a document, the D rows under it are its lines, and each H block becomes one BAPI call. The free FB50 template is built this way, and its Field Guide sheet names the BAPI field behind every column. Insert an empty first column for the Run Log (column A is the default), where SAP's answer lands.

    If your extract repeats the header on every line instead, use flat rows: every row is a line, and a split column starts a new document by value, on change, on change ignoring blanks, or on a blank. Split on change of the document reference, and sort by it first, or one document breaks into several.

    FB50 journal entry template (H/D layout)sap-fb50-gl-journal-entry.xlsx · 340 KB · free, no signupDownload
  4. Step 4. Map the columns to the BAPI's fields

    Three ways, and you can mix them. Mapping AI takes a sample Excel file or SAP screenshots, matches headers exactly, then by similarity, then with AI, and shows a preview before anything is applied. Only the headers (or images) and the BAPI's field list are sent, never row values, and it uses your own Anthropic API key. AutoMap H/D reads an H/D layout already in the sheet and maps header fields as cell references and line fields as columns. Drag and drop handles whatever is left.

    Then open Logic → Loop: set the marker column with H and D, and let the loop cover ACCOUNTGL and CURRENCYAMOUNT. Three fields need attention on this BAPI:

    • BUS_ACT gets the fixed value RFBU, the business transaction for an FI posting. SAP Community
    • USERNAME gets the dynamic value SAP_USER, so it is always the person running the upload.
    • The line-number column maps to ITEMNO_ACC in both ACCOUNTGL and CURRENCYAMOUNT. It is the only link between a line's account and its amount.
    PostNow.ai mapping designer for BAPI_ACC_DOCUMENT_POST: DOCUMENTHEADER fields with Excel column boxes, and the ACCOUNTGL, CURRENCYAMOUNT and other tables listed on the right

    Screenshot: the mapping designer on BAPI_ACC_DOCUMENT_POST. Each field gets an Excel column, a fixed value or a dynamic value; the tables the loop covers are on the right.

  5. Step 5. Set the field rules that Excel breaks

    Per field, PostNow.ai applies trim, default value, leading zeros and uppercase, in that order, to values read from Excel. Excel strips leading zeros from anything it treats as a number Microsoft, so set Leading zeros with a target length of 10 on the G/L account and cost centre: 610100 then reaches SAP as 0000610100. Padding applies to numeric values only.

    Give each date field its format: YYYYMMDD if the column holds text like 20261031, Excel serial if it holds real Excel dates, DD.MM.YYYY if people type it that way. For coded fields, value help can be an SAP lookup from the field's check table or your own list; switch on Restrict and the list becomes an allow-list, for example document types SA and AB only. Tick Pre-Validation on fields whose values must already exist in SAP: company code, G/L account, cost centre. Required fields get "* " in the Excel header.

  6. Step 6. Validate the sheet

    Validate checks every row for required fields, type, length, special characters, date format, decimal places and allowed values. When the sheet is clean and SAP is connected, it then looks up every Pre-Validation field in its SAP check table and flags values that don't exist. Errors list in a pane beside the sheet, failing cells turn coral, and the list exports to CSV for whoever owns the data.

    Whether the period is open, the document balances and the account needs a cost object are SAP's posting checks, and Simulate runs them next.

    PostNow.ai Validation Results pane showing 0 errors, All rows are good to go, Ready to post, with an Export CSV button

    Screenshot: the Validation Results pane after a clean check.

  7. Step 7. Simulate in SAP

    Simulate calls BAPI_ACC_DOCUMENT_POST for every document and always issues a rollback, so SAP runs its real posting logic and keeps nothing. This is where a closed period, an unbalanced document or a missing cost object shows up, per document, while the fix is still an edit in Excel. The error table lists the usual messages.

  8. Step 8. Run a pilot, then the rest

    Open Run ▾ → Run scope, set Start Row and End Row around the first document only, and click Run. The sheet is locked while the run is in progress. Each document posts under your login, SAP's answer goes into the Run Log on the document's H row, and under Results you can map $DOC_NO to a column so the document number sits next to the data. Click that number and FB03 opens on the document.

    If the pilot looks right, set Start Row to the first row after it, End Row to Auto, and run the rest. If you do start again from row 2, Run lists the rows that already posted and offers Skip posted rows, Post again or Cancel; choose Skip.

  9. Step 9. Fix failures with Retry Failed, then keep the template

    Correct the failing cells and choose Run ▾ → Retry Failed. It re-posts only the documents whose Run Log starts with ERROR, rebuilds each one with all its lines, reads the Run Log column itself (so it still works after Excel was closed), and ignores a second click while a run is busy. It scans from the current Start Row down, so after a pilot, set Start Row back to 2 before you retry.

    Then Save the template. Next month the job is open the data file, Validate, Simulate, Run. When colleagues should run it without being able to change the mapping, Publish makes a run-only workbook; Excel to SAP automation covers that team set-up.

Worked example: 12 month-end journal entries into FB50

PostNow.ai posts this batch through BAPI_ACC_DOCUMENT_POST: 12 accrual and reclassification entries for company code 1010, 30 lines in total, posting date 31 October 2026, document type SA, currency EUR. The sheet started as the free FB50 template. Here is the first document as it sits in Excel; the header row also carries company code, both dates, document type, currency and header text.

RowB: Rec typeC: Doc refK: G/L accountL: S/HM: AmountN: Signed amountO: Cost centre
2HJE-10011010 · 20261031 · 20261031 · SA · EUR · "Oct audit fee accrual"
3DJE-1001610100S4200.004200.00101000
4DJE-1001219000H4200.00-4200.00
  1. Turn S/H into a sign. The template keeps amounts positive with an S/H column. BAPI_ACC_DOCUMENT_POST has no use for that column: it works out debit or credit from the sign of the amount. SAP Community PostNow.ai maps the value as it stands in the cell, so column N holds =IF(L3="H",-M3,M3) and AMT_DOCCUR maps to N.
  2. Map it. Mapping AI matches the template's headers; header columns go to DOCUMENTHEADER, line columns to ACCOUNTGL. The loop runs on column B and covers ACCOUNTGL and CURRENCYAMOUNT. BUS_ACT is fixed at RFBU, USERNAME is SAP_USER. G/L account and cost centre get leading zeros to 10, both dates get YYYYMMDD, and company code, G/L account and cost centre get Pre-Validation.
  3. Validate: two errors. Row 17's posting date was typed as 31.10.2026 and fails the date format. Row 26's cost centre 101900 comes back "Not found in SAP master data"; it should have been 109100. The accounts typed without zeros, such as 610100, pass, because they are padded before the lookup.
  4. Simulate: two documents fail. JE-1007 returns F5 702, "Balance in transaction currency": its credit line carried S, so both lines were positive. JE-1010 returns KI 235, "Account 0000640000 requires an assignment to a CO object": the cost centre was blank on an expense line. Both are fixed in Excel, and the second Simulate is clean.
  5. Pilot. Run scope Start Row 2, End Row 4: JE-1001 posts, and its document number lands in the column mapped to $DOC_NO. One click on the number opens FB03, and both lines are there with cost centre 0000101000.
  6. The rest. Start Row 5, End Row Auto: the other 11 documents post, one Run Log entry and one number per H row.
  7. Reconcile. The GL Line Items 360 report in PostNow.ai's Report Library pulls company code 1010's documents for the posting date into Excel, where totals per account are compared with the sheet. The central audit holds each document's transaction, template, SAP system, client, user, result and number.

The same flow posts vendor invoices through FB60's BAPI or materials through BAPI_MATERIAL_SAVEDATA; only the template changes. For FB50 specifically, FB50 mass upload goes deeper on G/L lines, tax and the recording alternative.

If your transaction has no BAPI: upload through a recording

PostNow.ai's second posting mode records the transaction once in SHDB and replays it by CALL TRANSACTION for every row. It is the route for screens no BAPI covers; pricing conditions are the usual case (VK11 upload from Excel). Steps 1, 3 and 5 to 9 stay the same, and step 2 becomes Record: you key one example in SAP GUI, and each recorded field becomes a row you map to a column.

Two things change in practice. Recording mode runs through PostNow.ai's ZPOSTNOW_* objects, which your Basis team installs in SAP once. And Simulate checks the whole document only when the template has a Simulate OK-code, such as =BS on FB50; otherwise it checks the screens and says so. MIRO cannot be recorded at all (SAP Note 381593 SAP Community), so invoices go through BAPI_INCOMINGINVOICE_CREATE, and purchase orders belong on BAPI_PO_CREATE1. How to record so the replay holds is in the BDC recording guide.

Checklist before your first SAP upload from Excel

PostNow.ai checks the data. This list covers the run settings you confirm yourself, and it is worth two minutes before every first run of a template.

  • Connected to the intended client: test for the first run, production only after the test run is clean.
  • The posting period for your posting date is open in FI and, where relevant, CO. A closed period fails every document with F5 201.
  • Credits are negative in the column mapped to AMT_DOCCUR, and each document nets to zero.
  • Every expense line that needs a cost object has one.
  • Leading zeros and target lengths are set on account, cost centre, vendor and material fields.
  • Each date field's format matches what is really in the column. Check a cell, not the header.
  • The Run Log column is empty, or holds only the previous run's results for rows you won't run again.
  • Run scope starts on the first row you mean to post, and nothing above it will be re-posted.
  • Validate is clean and Simulate shows no failed documents.
  • If an approval policy covers the template, the approval is in: someone other than you has approved this data, and you have not edited it since, because an edit after approval invalidates it.

SAP error messages on a first upload, and the fix

PostNow.ai shows SAP's own message in the Run Log and in Simulate, unchanged, so these are the texts you will search for. AI Review can explain a failed row from SAP's messages and the field structure; by default it does not see your cell values.

MessageWhat it meansFix in the sheet or template
"Not found in SAP master data (table)"PostNow.ai's Validate: the value isn't in the field's SAP check tableCorrect the value; if it should exist, check leading zeros and the target length
F5 201: Posting period ... is not open F5 201The period derived from the posting date is closedCheck the posting date column and its date format; otherwise finance opens the period (OB52)
F5 702: Balance in transaction currency F5 702The document's lines don't net to zeroA credit entered as positive, a missing line, or a line whose amount didn't map; check the signed-amount column
KI 235: Account ... requires an assignment to a CO object KI 235The G/L account is a cost element, so the line needs a cost centre, order or WBS elementFill the cost object, or map the column if it isn't mapped
KI 222: Cost center ... does not exist on ... SAP KBAThe cost centre isn't valid on the posting date, or exists in another controlling areaCheck the cost centre's validity dates; a missing leading zero gives the same symptom
RW 602: Required field ... was not transferred in parameter ... SAP CommunityThe BAPI received an empty required field, for example GL_ACCOUNT in ACCOUNTGLMap the column, or check that the loop covers that table

What to plan for before you post

Plan for these six points on a first upload. Restarting after a failure is covered in more depth in SAP mass upload: re-running without posting twice.

  1. Re-run from the same sheet. Run reads the sheet's Run Log and offers to skip rows that already posted, so keep every re-run in the workbook that holds the Run Log.
  2. Stop keeps what is already posted. Documents already posted stay in SAP; reverse a wrong one with FB08.
  3. Check SAP after a broken connection. If the network or Excel drops mid-run, a document can post without its number reaching the sheet. Check the last references in FB03 before Retry Failed.
  4. Let Simulate prove the posting rules. Validate checks the file; open periods, balance and cost-object rules come from Simulate or Run.
  5. Compute values in Excel. PostNow.ai field rules are trim, default, leading zeros and uppercase. Build signs, lookups and concatenations as Excel formulas in the sheet.
  6. Map texts through the BAPI. A BAPI's own text fields map like any other field; add separate SAP long texts and attachments in SAP itself.

Frequently asked questions

How do I upload data from Excel to SAP with PostNow.ai?

Build one template per transaction in the PostNow.ai Excel add-in. Choose the SAP BAPI (BAPI_ACC_DOCUMENT_POST for FB50 journal entries) or record the transaction, map each Excel column to a field, and set rules such as leading zeros and date formats. Validate checks the sheet and whether marked values exist in SAP, Simulate lets SAP check every document and rolls it back, and Run posts under your own SAP login, committing each document only when SAP returns no error. SAP's message and the document number are written beside each row, and Retry Failed re-posts only the rows marked ERROR.

Can you upload an Excel file directly into SAP?

Not as a file. SAP creates each business object through its own interface, a BAPI, a transaction or a migration object, so something has to turn rows into those calls. SAP's own options cover particular objects, such as the Upload General Journal Entries app in S/4HANA, which takes SAP's downloadable template. PostNow.ai does it inside Excel for any object with a BAPI or a recordable transaction, from your own sheet layout.

Can I upload Excel data to SAP without ABAP or LSMW?

Yes. In PostNow.ai's BAPI mode you map the sheet to a standard SAP BAPI and post, with no LSMW project and no upload program of your own. Your SAP user needs the authorisations for the transaction plus RFC access. The recording mode runs through PostNow.ai's own ABAP objects, which are installed in SAP once before the first recording. For BAPI, recording and LSMW side by side, see SAP data upload methods compared.

How do I keep leading zeros when uploading to SAP from Excel?

Excel strips leading zeros from numbers, so 0000610100 becomes 610100 unless the column was formatted as Text before the values went in. In PostNow.ai you don't depend on that: set Leading zeros on the field with a target length, such as 10 for a G/L account, and numeric values are padded before they reach SAP. The same padding is used when Validate looks the value up in SAP.

How do I test an Excel upload before posting to SAP?

Use two layers. PostNow.ai's Validate checks the sheet and looks up marked values in their SAP check tables. Simulate then calls the BAPI for every document and then BAPI_TRANSACTION_ROLLBACK instead of a commit, so open period, balance and cost-object rules are checked without saving anything. Do both in a test client, then post a one-document pilot in production.

What happens if some rows fail during an SAP upload?

PostNow.ai commits each document only when SAP returns no error, so a failed document is not posted and its Run Log cell starts with ERROR and SAP's message. Fix the cells and use Retry Failed, which re-posts only those documents with all their lines. If you click Run again over the same rows, PostNow.ai first offers to skip the documents that already posted; choose Skip posted rows, because Post again posts them a second time.

How do I upload journal entries with several lines from Excel?

Mark each document's header row H and its line rows D, then set a loop in PostNow.ai on that marker column covering ACCOUNTGL and CURRENCYAMOUNT. Each H block becomes one BAPI_ACC_DOCUMENT_POST call, credits go in as negative amounts, and ITEMNO_ACC links each line's account to its amount. A sheet without markers works too: flat rows with a split column start a new document when the document reference changes.

Does Excel to SAP upload work on S/4HANA and ECC?

Yes. PostNow.ai posts through BAPIs or recorded transactions on both, under your own SAP login. BAPI templates are the safer choice across the two, because a recording replays screens and some screens changed: on S/4HANA, vendor and customer transactions such as XK01 and XD01 hand over to transaction BP, so an ECC recording of them does not carry over.

Run your first upload in a test client

Start from the free FB50 template, validate and simulate every document, and post under your own SAP login.

A professional working in PostNow.ai on a laptop

Book a demo

Uploading Excel data into SAP?

See PostNow.ai post a real file into SAP, row by row, with the result written back.

Request a demo
Book a demo

Bring one SAP process. We show it end to end.

Tell us where to reach you and which process matters. The PostNow.ai team replies by email to arrange the demo.

  1. 01You send the formIt goes straight to the PostNow.ai team.
  2. 02We agree a timeWe reply to your work email to set up the call.
  3. 03You see your own processA process from your own SAP work, shown from start to finish.

Request your demo

Name, work email and company are needed.

Please use your company email address.
What would you like to see?

We use your details only to arrange the demo. See our privacy policy.