How an FB50 mass upload works
FB50 in SAP is the transaction for entering a G/L account document: one journal entry with a header and balanced debit and credit lines, document type SA by default. PostNow.ai does an FB50 mass upload from Excel through BAPI_ACC_DOCUMENT_POST, SAP's standard BAPI for posting the same G/L documents without the screen: one header row per journal and one detail row per G/L line, so a whole month of SAP journal entry uploads runs from one sheet. Validate checks the sheet offline, Simulate lets SAP check every journal and rolls it back, and Run writes each document number back to its row.
- Credits are negative amounts. The BAPI has no posting key and no debit/credit column: a positive amount is a debit, a negative amount a credit, and each journal's lines must add up to zero.
- One journal = one document. Rows that share a document reference post together or not at all; SAP never posts half a journal.
This page covers SAP journal entry automation for one job: posting G/L-only journals (accruals, reclassifications, allocations, provision releases) in bulk from Excel. Postings with explicit posting keys and special G/L transactions belong in FB01 GL document upload, vendor invoices without a purchase order in FB60 mass upload, and the wider picture of finance postings in SAP FICO mass posting.
SAP journal entry automation with PostNow.ai, step by step
PostNow.ai turns an FB50 mass upload into a published template: a designer maps it once against your SAP system, and accountants run their own journal files through it, each under their own SAP login, on their own computer, when they click Run.
- Start from the template or the BAPI. Download the free FB50 G/L journal entry template, whose columns are already mapped to
BAPI_ACC_DOCUMENT_POST, or open the BAPI in the add-in: Find with AI answers "FB50" with this BAPI, and Mapping AI matches your own column headers to its fields. Mapping AI reads headers, never your amounts. - Group header and lines. A marker column turns one
Hrow (company code, document date, posting date, document type, currency, reference, header text) and itsDrows (one G/L line each) into one journal. A Document Ref column such asJE-0001keeps the rows of each journal together. - Validate the sheet. Validate checks every cell offline, in Excel: required fields, type, length, date format, decimals and allowed values, such as an allow-list of document types. Whether the journal balances and the period is open is SAP's call, in the next step.
- Simulate. PostNow.ai calls the BAPI for every journal and then
BAPI_TRANSACTION_ROLLBACKinstead of a commit. SAP's own messages (balance, closed period, missing cost center, blocked account) land on each journal's row, and nothing is posted. - Run. For each journal PostNow.ai calls the BAPI and commits with
BAPI_TRANSACTION_COMMITonly when SAP returned no error; otherwise it rolls back. The H row gets "Accounting Document number posted successfully" with user, time and SAP system. A failed journal shows every error SAP returned, joined in one cell. With Call Transaction set toFB03, each document number becomes a link that opens FB03 with the number filled in. - Re-run only what failed. Retry Failed re-posts the journals whose Run Log starts with ERROR. If you click Run again on the same sheet, PostNow.ai first lists the journals that already hold a document number and offers Skip posted rows, Post again or Cancel.

How an FB50 document is built: header, lines and document type SA
An FB50 journal entry is one document header plus two or more G/L lines whose debits and credits are equal. In a PostNow.ai FB50 template the header sits on the H row and each line on its own D row, so the sheet has the same shape as the document SAP stores.
| Level | FB50 field | BAPI field | What to watch |
|---|---|---|---|
| Header | Company code | DOCUMENTHEADER-COMP_CODE | The company code the journal posts in; your user needs posting authorization there, not only display |
| Header | Document date, posting date | DOC_DATE, PSTNG_DATE | The posting date decides the period, and the period must be open in OB52 |
| Header | Document type | DOC_TYPE | SA (G/L account document) is FB50's default in the standard system; use the type your FI team set for accruals or allocations if there is one |
| Header | Reference, document header text | REF_DOC_NO, HEADER_TXT | The reference is what you search on later in FB03 and in reports |
| Header | Currency | CURRENCYAMOUNT-CURRENCY | Sent on every line, taken from the H row |
| Line | G/L account | ACCOUNTGL-GL_ACCOUNT | Must exist in the company code and not be blocked for posting; zero-padded as text |
| Line | Amount | CURRENCYAMOUNT-AMT_DOCCUR | Signed: positive = debit, negative = credit |
| Line | Cost center, profit center, order, WBS element | COSTCENTER, PROFIT_CTR, ORDERID, WBS_ELEMENT | An expense account that is a cost element needs one CO object (otherwise KI 235); the field status group can make further fields required |
| Line | Tax code, assignment, item text | TAX_CODE, ALLOC_NMBR, ITEM_TEXT | Assignment drives sorting and clearing on open-item accounts |
Three rules follow from that structure. Every H row field is the same for all lines of the journal, because it exists once in SAP. The lines must add up to zero in the document currency. And the journal is atomic: SAP posts all of its lines or none, so a failed journal leaves nothing behind to clean up.
Debit and credit in FB50: no posting keys needed
An FB50 mass upload in PostNow.ai needs no posting key column: BAPI_ACC_DOCUMENT_POST reads debit or credit from the sign of the amount, the same way FB50's screen uses a debit/credit indicator instead of a posting key.
| Where you post | How debit and credit are set | What goes in the Excel file |
|---|---|---|
PostNow.ai with BAPI_ACC_DOCUMENT_POST | Sign of AMT_DOCCUR: positive debit, negative credit | One signed amount column, credits entered as -14500.00 |
| FB50 screen | Debit/credit indicator per line (S debit, H credit) | Not used for a BAPI upload |
| FB01 screen | Posting key per line: 40 G/L debit, 50 G/L credit | A posting key column; see FB01 GL document upload |
If your source model has separate debit and credit columns, add one helper column such as =Debit-Credit and map that to the amount. Sending credits as positive numbers is a common reason a journal that looks balanced in Excel fails with F5 702 "Balance in transaction currency".
BAPI_ACC_DOCUMENT_POST for journal entries: ACCOUNTGL and CURRENCYAMOUNT
PostNow.ai posts FB50 journal entries through BAPI_ACC_DOCUMENT_POST ("Accounting: Posting"). A G/L line is split across two tables: the account and its assignments go in ACCOUNTGL, the money in CURRENCYAMOUNT, and the line number ITEMNO_ACC joins them.
| Parameter | One per | Fields a journal upload usually fills |
|---|---|---|
DOCUMENTHEADER | Journal | BUS_ACT (RFBU for an FI posting), USERNAME, COMP_CODE, DOC_DATE, PSTNG_DATE, DOC_TYPE, REF_DOC_NO, HEADER_TXT, TRANS_DATE for the exchange rate date |
ACCOUNTGL | G/L line | ITEMNO_ACC, GL_ACCOUNT, ITEM_TEXT, ALLOC_NMBR, TAX_CODE, COSTCENTER, PROFIT_CTR, ORDERID, WBS_ELEMENT, SEGMENT, FUNC_AREA |
CURRENCYAMOUNT | Line and currency type | ITEMNO_ACC (same number as the G/L line), CURRENCY, AMT_DOCCUR (signed), and EXCH_RATE only if you pass a rate instead of letting SAP read it |
ACCOUNTTAX | Tax line | Only on tax-relevant journals: one tax line with TAX_CODE and its own ITEMNO_ACC; its CURRENCYAMOUNT row carries the tax amount in AMT_DOCCUR and the base amount in AMT_BASE |
RETURN | Message | SAP's messages; any E or A means the journal was not posted |
| Exports | Journal | OBJ_TYPE BKPFF and OBJ_KEY: document number, company code and fiscal year in one 18-character key, which PostNow.ai splits to write the document number back |
Two details catch first builds. A line in ACCOUNTGL without a CURRENCYAMOUNT row of the same ITEMNO_ACC has no value, so the journal will not balance. And the BAPI does not save on its own: the caller commits, which PostNow.ai does only after an error-free answer. When SAP rejects a journal, the first message is often RW 609 "Error in document", a wrapper; the real reason (for example F5 702) follows it, and PostNow.ai writes all of them into the row.
Multiple journal entries in one Excel file
One PostNow.ai FB50 sheet can hold hundreds of journals: each H row starts a new journal, and the D rows under it are its lines until the next H row. Every journal is posted, committed or rolled back on its own, so one unbalanced journal does not stop the others.
- Keep each journal's D rows directly under its H row. A D row belongs to the H row above it. Sorting the sheet by account or amount after building it moves lines into the wrong journal.
- Give every journal its own Document Ref, such as
ACCR-2610-014, and put it in the reference field too. It is the key you will search on in FB03 and in reports months later. - Number lines per journal.
ITEMNO_ACCrestarts at 1 in every journal; it is a line number inside the document, not a row number in the file. - Check the zero sum per journal before Simulate. A
SUMIFon Document Ref over the signed amount column must return 0.00 for every journal. - Stay under 999 lines per journal. An FI document holds at most 999 line items; above that SAP stops with
F5 727"Maximum number of items in FI reached". Split a large allocation into several journals, each balanced on its own.
The same grouping applies to every header/detail upload; how to upload data into SAP from Excel walks through a first upload end to end.
Recurring and accrual entries
PostNow.ai fits recurring journals whose amounts change every period: the accrual model in Excel produces this month's figures, and the same published FB50 template posts them. Where an amount is identical every month, SAP's own recurring entry tools may need no file at all.
| Need | Route | How it works |
|---|---|---|
| Amounts calculated each period (accruals, allocations, provisions) | PostNow.ai FB50 template | The model writes this period's lines into the template; Validate, Simulate and Run as usual; the document numbers stay in the file as the record |
| The same amount every period (fixed rent, fixed recharge) | SAP recurring entry: FBD1, then F.14 | FBD1 stores a recurring entry document with its run schedule; F.14 creates a batch input session from it, which is processed in SM35 |
| An accrual that must reverse on a set date | SAP accrual/deferral: FBS1, then F.81 | FBS1 posts the accrual with a reversal date; F.81 reverses the selected accruals, and the reversal posts on that date |
Month-end accruals built in Excel usually reverse in the next period. With PostNow.ai the reversal is a second run: either the free FB08 reversal template on the posted documents (see reversal below), or a new journal with the signs flipped if your FI team prefers a fresh document over a reversal. Decide which before the first close, because the two look different in the line item reports.
Park (FV50) or post
PostNow.ai posts journals and puts the review before Run: when an approval policy covers the template, Run waits until an approver in the PostNow.ai portal has approved that exact data. Parking in SAP (FV50, with FBV0 to post the parked document) is the SAP-side alternative, and it behaves differently through an interface.
- PostNow.ai approval. The approved data is matched by a fingerprint, so a file changed after approval needs a new approval, and the person who submits cannot approve their own run.
- Parking cannot be recorded. SAP KBA 2815035 describes message
FP 140"Parking not possible during batch input" when FI Enjoy transactions such as FB50 and FV50 are recorded inSHDB. - Parking through the BAPI depends on your release. The BAPI header has a
DOC_STATUSfield, and SAP Community answers tie parking through it to SAP Note 2092366; some posters report systems where the document posted instead of parking. SAP KBA 3458441 states that documents parked this way cannot be processed in Enjoy transactions such as FV53 and FV63. Agree the release process with your FI team before you choose this path.
Worked example: 24 month-end accruals in company code 1010
PostNow.ai handles this with one published FB50 template and one run. Finance in company code 1010 has 24 accrual journals for October 2026, 96 lines in all, currency EUR, posting date 31.10.2026, document type SA. One journal from the accrual model looks like this:
| Row | Document Ref | Header fields | Line fields |
|---|---|---|---|
| H | ACCR-2610-007 | Company code 1010, document date 20261031, posting date 20261031, type SA, EUR, reference ACCR-2610-007, text "Oct consulting accrual" | |
| D | ACCR-2610-007 | Line 1, G/L 0000476000, 12,400.00, cost center 10101301 | |
| D | ACCR-2610-007 | Line 2, G/L 0000476000, 3,980.50, cost center 10101402 | |
| D | ACCR-2610-007 | Line 3, G/L 0000219100, -16,380.50, no CO object (balance sheet account) |
- Validate. Two cells are flagged: a posting date typed as 31/10/2026 and a document type
SBoutside the allow-list. Both are fixed in the sheet. - Simulate. 21 journals pass. Two return
F5 702because the accrued liability was copied in as a positive amount; one returnsKI 235because a new expense line has no cost center. All three are corrected and pass a second Simulate. - Run. All 24 post. Each H row now holds its document number with user, time and SAP system.
- Reconcile. The GL Line Items 360 report in the PostNow.ai Report Library, run for company code 1010, posting date 31.10.2026, document type SA and the user who ran the file, shows 24 documents and a debit turnover equal to the model's total.
- Next month. On 1 November the same 24 documents go into the reversal file (the route proved in the test client, see below) with posting date 01.11.2026, so the accruals unwind in the new period.
The workbook now holds the calculation, the posted document numbers and the run details in one file, which is what an auditor asks for when they pick one of these journals.
Reverse journal entries: FB08 one by one, F.80 or a reversal file
PostNow.ai reverses journals in bulk with a second template, one row per document with its reversal reason and reversal posting date: the free FB08 reversal template on BAPI_ACC_DOCUMENT_REV_POST, or a recording of FB08 itself with document number, company code and fiscal year as columns. In SAP itself, FB08 reverses one document at a time and F.80 reverses a selection of documents in one run.
- The reversal BAPI finds the document by its object key, not its number. It needs the original document's object type and key (
AWTYPandAWKEYinBKPF). For journals posted throughBAPI_ACC_DOCUMENT_POSTthose areBKPFFand the 18-characterOBJ_KEYreturned at posting; map$OBJ_KEYto a result column when you post, and the reversal file is ready the day you need it. - Prove the route on a few documents first. Several SAP Community answers report that
BAPI_ACC_DOCUMENT_REV_POSTrefusesBKPFFdocuments withRWmessages such as "Reversal in component Financial Accounting not possible", while others report it working. Reverse three journals in a test client and check them in FB03; if SAP refuses them, the FB08 recording orF.80does the same job. - Pick the reversal reason deliberately. The reason decides whether a posting date other than the original one is allowed. Use the reasons your FI team has configured.
- Accruals posted with
FBS1are normally reversed withF.81, which reverses them in bulk on the reversal date stored in each accrual document. - Cleared lines stop a reversal. If a line on an open-item account has been cleared, SAP refuses the reversal with "Document already contains cleared items - reversal not possible" until the clearing is reset.
- Reverse, don't delete. The original and the reversal both stay in the ledger, linked to each other, which is the audit trail finance wants.
FB50 upload errors and how to fix them
PostNow.ai writes SAP's messages to each failed journal's H row, so the fix starts from the message text. These are the ones a bulk journal run meets most:
| Message | What it means | Fix |
|---|---|---|
RW 609 Error in document | A wrapper from the accounting interface; the real reason is the next message in the cell | Read the message after it and fix that one |
F5 702 Balance in transaction currency | The journal's lines do not add up to zero | Enter credits as negative amounts; check that every D row has an amount and sits under the right H row |
F5 201 Posting period … is not open | The posting date falls in a period closed in OB52 | Correct the posting date, or ask FI to open the period |
KI 235 Account … requires an assignment to a CO object | An expense line (a cost element) has no cost center, order or WBS element | Add the CO object column to the line |
F5 727 Maximum number of items in FI reached | More than 999 lines in one journal | Split it into several balanced journals |
| Run Log: UNKNOWN (PostNow.ai) | SAP's answer was lost after the journal was sent, so it may have posted | Look the reference up in FB03 or the GL Line Items 360 report before posting it again; Retry Failed leaves UNKNOWN rows alone |
FB50, FB01 or FB60: which one to upload
Use the PostNow.ai FB50 template for journals whose lines are all G/L accounts. Use FB01 when you need posting keys or customer and vendor lines in one document, and FB60 for a vendor invoice without a purchase order.
| Question | FB50 | FB01 | FB60 |
|---|---|---|---|
| Lines | G/L accounts only | Any account type, set by posting key | One vendor line plus G/L lines |
| Debit/credit | Debit/credit indicator (in the BAPI: the sign) | Posting key, such as 40 / 50 | Invoice or credit memo, set on the header |
| Typical document type | SA | Entered on the header for each posting (SA, DR, KR ...) | KR |
| Guide | This page | FB01 GL document upload | FB60 mass upload |
FB50 in S/4HANA: Universal Journal and ledgers
PostNow.ai uses the same FB50 template on S/4HANA: FB50 and BAPI_ACC_DOCUMENT_POST are both there, and the posted journal lands in the Universal Journal. What changes is mostly which account assignments your configuration makes mandatory.
- One line item table. In S/4HANA the universal journal entry replaces the separate FI and CO documents, and its line items are written to table
ACDOCA(SAP Help). The header andBSEGstill exist, so FB03 shows the journal as before. - Profit center and segment. Many S/4HANA systems require a profit center on every line, and the segment is usually derived from it. Add the profit center column to the template even where ECC did not ask for it.
- Ledger-specific journals. Adjustments for one ledger group only are entered in
FB50L. Agree with FI how such journals are posted in your system before you upload them, and prove it on Simulate. - The Fiori app. Post General Journal Entries (F0718) is the Fiori counterpart of FB50 for one journal at a time; files of many journals are where the Excel template earns its place.
- API mode. PostNow.ai can also post journals through SAP's SOAP service Journal Entry - Post (Synchronous) (
JournalEntryCreateRequestConfirmation_In), with a test-run flag for Simulate. SAP Help documents it for S/4HANA Cloud under communication scenarioSAP_COM_0002; on premise, Basis exposes it inSOAMANAGER.
Checklist before an FB50 mass upload
PostNow.ai checks formats and allowed values and keeps operators on the published template; this list covers the decisions that stay with the accountants.
- Every journal's signed amounts add up to zero, checked with a
SUMIFper Document Ref. - Credits are negative; no separate debit/credit or posting key column is mapped.
- Each journal's D rows sit directly under its H row, and the sheet was not re-sorted afterwards.
- Posting dates are typed values in the target period, not
=TODAY(), and the period is open inOB52. - G/L accounts are text with leading zeros, exist in the company code and are not blocked for posting.
- Every expense line has the CO object its account requires, and a profit center where S/4HANA needs one.
- Document type and reference follow your FI conventions, and every reference is unique to this run.
- No journal exceeds 999 lines.
- The reversal plan is agreed: FB08 template, recording, F.80, or a new journal with flipped signs.
- Simulate has run clean on the whole file.
What to plan for in an FB50 mass upload
PostNow.ai posts through SAP's accounting BAPI, so SAP's own balance, period, account and CO checks decide every result.
- Run SAP's checks in Simulate. Validate checks formats, lengths and allowed values in Excel; balance, period and account checks start when SAP sees the journal in Simulate.
- Keep re-runs in the same workbook. The re-post check reads this sheet's Run Log. A copied file with the same journals has no Run Log, so look the references up in the GL Line Items 360 report before posting it.
- Check UNKNOWN rows in SAP first. Look the reference up in FB03 or the report; post the row again only if the journal is not there.
- Test tax-relevant journals separately. Most journals carry no tax; where a tax code is used, prove the tax line on Simulate before the full run.
- Keep the PostNow.ai portal reachable on approval-controlled runs. The approval check asks the portal at Run; if the portal cannot be reached, the run goes ahead without the approval step.
Making a template like this repeatable for a team (designers who build, operators who only run, a published template in the central library) is covered in Excel to SAP automation.
Free FB50 journal entry template
PostNow.ai publishes a free FB50 G/L journal entry template: H rows for the document header and D rows for the G/L lines, three sample journals (an accrual, a cost center reclassification and a project cost transfer), and a field guide that maps every column to its BAPI_ACC_DOCUMENT_POST field. Delete the sample rows, paste your journals and open it in PostNow.ai. The FB08 reversal template is the companion for reversing them, and the GL line items report shows what was posted.
