Quick summary
To upload data into SAP from Excel, map the sheet once to a BAPI or a recorded transaction, clean the values Excel likes to break, and check every row before it posts. PostNow.ai does all of this inside Excel: Validate checks the file, Simulate lets SAP check BAPI documents and rolls them back, and Run posts under your own SAP login.
- SAP never takes the file itself, only BAPI calls, transactions or migration objects.
- Most failed first uploads are Excel’s fault: lost leading zeros, rewritten dates, credits typed as positive.
- Check twice: the file first, then SAP’s own posting rules.
- Post one document as a pilot, then the rest, and keep the log.
Can you upload an Excel file straight into SAP?
Not as a file. SAP builds every business object through one of its own interfaces: a BAPI, a dialog transaction or a migration object. Something has to turn each row, or group of rows, into one of those calls, and that choice shapes the sheet layout, so make it first.
What follows is the method I use. If you want a product walkthrough with a worked batch of FB50 journals, there is a separate guide on how to upload data into SAP from Excel click by click. My examples use PostNow.ai, because it is the tool I work on, but the steps hold whatever you run.
| Route | Fits when | Who runs it |
| PostNow.ai (Excel add-in) | Any object with a BAPI or a recordable transaction, loaded repeatedly from your own sheet layout | Business users, from a template a designer built once |
| SAP’s own upload apps | The specific objects SAP ships one for, such as Upload General Journal Entries in S/4HANA, with SAP’s template | Business users |
| S/4HANA Migration Cockpit | The initial load into a new S/4HANA system | Migration team |
| LSMW | An ECC load that already works; SAP Note 2287723 calls it not recommended for S/4HANA | Functional consultants |
| Custom ABAP program | Heavy transformation logic that IT owns | IT, with a transport for every change |
The 8 steps to upload data into SAP from Excel
1.Pick the SAP interface for the object
Use a standard BAPI wherever one covers your fields: BAPI_ACC_DOCUMENT_POST for FB50-style G/L postings, BAPI_MATERIAL_SAVEDATA for materials. A BAPI does not care how the screens look. Where no BAPI fits, and pricing conditions in VK11 are the usual example, record the transaction in SHDB and replay it per row.
PostNow.ai searches the BAPIs in your own system by name, or Find with AI suggests one from a plain description of the job.
2.Sort out access and a test client
An upload can do nothing your SAP user cannot do by hand, because every row passes SAP’s normal authorisation checks. A BAPI call is also a remote function call, so your user needs RFC access for the function groups involved. Raise that with Basis a week early, not on the morning of the load. And run the first file in a test client.
3.Decide what one row means
People skip this step, and it decides whether 600 rows become 600 documents or 40. A journal entry is one header and several lines. You can mark each row H (header) or D (line), so every H block becomes one document. Or keep flat rows and start a new document whenever a reference column changes, in which case sort by that reference first. An unsorted file splits one journal into three, and all three fail on balance.
Leave an empty column for SAP’s answer on each row.
4.Prepare the file: fix what Excel breaks
When a first attempt to upload data into SAP from Excel fails, the cause is nearly always here, not in SAP.
- Codes, not descriptions. SAP expects document type SA rather than “General journal”, and company code 1010 rather than a company name. Translate in the sheet.
- Leading zeros. Excel drops them from anything it reads as a number, so G/L account 0000610100 turns into 610100. In PostNow.ai a Leading zeros rule with a target length of 10 pads them back.
- Dates. Decide per column whether it holds real Excel dates, text such as YYYYMMDD, or DD.MM.YYYY typed by people, and set the format to match. Look at an actual cell, not the header.
- Signs. BAPI_ACC_DOCUMENT_POST takes debit or credit from the sign of the amount. If your sheet keeps amounts positive next to an S/H column, add a signed column such as =IF(L3=”H”,-M3,M3).
- Paste debris. Trailing spaces, non-breaking spaces copied from email, numbers stored as text.
5.Map the columns once and save the template
Tie each column to a field, and give the remaining fields a fixed value or a system value, such as the SAP user name of whoever runs the upload. The mapping is the part you never want to build twice, so save it as a template. Next month you start at step 6.
6.Validate the file
Check every row offline first: required fields, type, length, special characters, date format, decimals and allowed values. Then confirm that codes like company code, G/L account and cost centre actually exist in SAP. PostNow.ai’s Validate covers both and marks the failing cells in the sheet; the existence check (Pre-Validation) is switched on field by field.
7.Simulate in SAP
No offline check knows whether the period is open or the document balances; only SAP does. A BAPI can be called and then rolled back with BAPI_TRANSACTION_ROLLBACK, so SAP runs its real posting logic and saves nothing. That is how PostNow.ai’s Simulate works for BAPI templates, and it is where you meet the classic messages while the fix is still a cell edit:
| Message | What it means | Fix in the sheet |
| F5 201 Posting period not open | The posting date falls in a closed period | Check the date column and its format; otherwise finance opens the period in OB52 |
| F5 702 Balance in transaction currency | The lines do not net to zero | A credit typed as positive, or a line whose amount did not map |
| KI 235 Account requires an assignment to a CO object | An expense line has no cost centre or order | Fill the cost object, or map the column |
8.Pilot, run, retry, reconcile
Post a single document in production first and open it in the display transaction (FB03 for a journal). If it looks right, run the rest from the next row. PostNow.ai commits each document only when SAP returns no error, so one bad row never takes good ones with it, and SAP’s message and document number land beside each row. Fix the failures and use Retry Failed, which re-posts only the rows marked ERROR.
Then reconcile totals per account against the sheet. You are done when the numbers match, not when the log turns green.
What should you check before the first run?
Before you upload data into SAP from Excel with a new template, spend two minutes on this list:
- Logged on to the intended client and company code.
- Posting period open in FI and, where it applies, CO.
- Credits negative, and every document nets to zero.
- Leading zeros set on account, cost centre, vendor and material fields.
- Result column empty, or holding only rows you will not run again.
- Validate clean, and Simulate showing no failed documents.
The habit that saves the most grief is boring: keep every re-run in the same workbook. Post a second time from a fresh copy of the file and nothing tells you which rows already went in, apart from SAP’s own duplicate checks. PostNow.ai reads the result column before a run and offers to skip rows that already posted.
Frequently asked questions
How do I upload data into SAP from Excel?
PostNow.ai does it inside Excel. Each transaction gets one template: pick a BAPI, such as BAPI_ACC_DOCUMENT_POST for journals, or record the transaction, then tie every column to a field. Validate checks the sheet, Simulate lets SAP check every BAPI document and rolls it back, and Run posts under your own SAP login, writing SAP’s message and document number beside each row.
Can you upload an Excel file directly into SAP?
Not the file itself. Every business object in SAP is created through a BAPI, a transaction or a migration object, so some tool has to translate rows into those calls. For a handful of objects SAP ships its own upload app, such as Upload General Journal Entries in S/4HANA, and that app expects SAP’s template.
How do I keep leading zeros when uploading to SAP from Excel?
Either format the column as Text before any values go in, or pad the values during the upload. A G/L account has 10 characters, so 610100 has to reach SAP as 0000610100. An upload tool can also pad them with a per-field leading-zeros rule and a target length.
How do I test an Excel upload before posting to SAP?
In two layers. First validate the file offline for required fields, formats and allowed values, and check that the codes exist in SAP. Then simulate: call the BAPI and roll it back with BAPI_TRANSACTION_ROLLBACK, so SAP checks periods, balances and cost objects without saving anything, ideally in a test client.
What happens if some rows fail during an SAP upload?
If each document is committed on its own, a failed one simply is not posted and the others go through. Fix the failed rows and re-post only those. Do the re-run in the same workbook, so rows that already posted are not posted twice.
Sources: SAP Note 2287723; SAP documentation for BAPI_ACC_DOCUMENT_POST and BAPI_TRANSACTION_ROLLBACK.
About the author: Ben Zahoor is co-founder and Head of AI at PostNow.ai, an SAP data automation and testing platform that works from Excel, and runs an SAP training channel on YouTube. Disclosure: the author works for PostNow.ai.