Quick answer

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.

  1. 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.
  2. Group header and lines. A marker column turns one H row (company code, document date, posting date, document type, currency, reference, header text) and its D rows (one G/L line each) into one journal. A Document Ref column such as JE-0001 keeps the rows of each journal together.
  3. 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.
  4. Simulate. PostNow.ai calls the BAPI for every journal and then BAPI_TRANSACTION_ROLLBACK instead 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.
  5. Run. For each journal PostNow.ai calls the BAPI and commits with BAPI_TRANSACTION_COMMIT only 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 to FB03, each document number becomes a link that opens FB03 with the number filled in.
  6. 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.
PostNow.ai mapping BAPI_ACC_DOCUMENT_POST in Excel for an FB50 mass upload: DOCUMENTHEADER fields mapped to columns, ACCOUNTGL line item columns in the sheet below
The BAPI behind FB50 open in PostNow.ai: header fields map to the H row, ACCOUNTGL and CURRENCYAMOUNT fields to the detail columns.

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.

LevelFB50 fieldBAPI fieldWhat to watch
HeaderCompany codeDOCUMENTHEADER-COMP_CODEThe company code the journal posts in; your user needs posting authorization there, not only display
HeaderDocument date, posting dateDOC_DATE, PSTNG_DATEThe posting date decides the period, and the period must be open in OB52
HeaderDocument typeDOC_TYPESA (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
HeaderReference, document header textREF_DOC_NO, HEADER_TXTThe reference is what you search on later in FB03 and in reports
HeaderCurrencyCURRENCYAMOUNT-CURRENCYSent on every line, taken from the H row
LineG/L accountACCOUNTGL-GL_ACCOUNTMust exist in the company code and not be blocked for posting; zero-padded as text
LineAmountCURRENCYAMOUNT-AMT_DOCCURSigned: positive = debit, negative = credit
LineCost center, profit center, order, WBS elementCOSTCENTER, PROFIT_CTR, ORDERID, WBS_ELEMENTAn expense account that is a cost element needs one CO object (otherwise KI 235); the field status group can make further fields required
LineTax code, assignment, item textTAX_CODE, ALLOC_NMBR, ITEM_TEXTAssignment 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 postHow debit and credit are setWhat goes in the Excel file
PostNow.ai with BAPI_ACC_DOCUMENT_POSTSign of AMT_DOCCUR: positive debit, negative creditOne signed amount column, credits entered as -14500.00
FB50 screenDebit/credit indicator per line (S debit, H credit)Not used for a BAPI upload
FB01 screenPosting key per line: 40 G/L debit, 50 G/L creditA 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.

ParameterOne perFields a journal upload usually fills
DOCUMENTHEADERJournalBUS_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
ACCOUNTGLG/L lineITEMNO_ACC, GL_ACCOUNT, ITEM_TEXT, ALLOC_NMBR, TAX_CODE, COSTCENTER, PROFIT_CTR, ORDERID, WBS_ELEMENT, SEGMENT, FUNC_AREA
CURRENCYAMOUNTLine and currency typeITEMNO_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
ACCOUNTTAXTax lineOnly 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
RETURNMessageSAP's messages; any E or A means the journal was not posted
ExportsJournalOBJ_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.

ⓘ
The other routes PostNow.ai offers. A recorded FB50 transaction (BDC) can post the same journals when a team prefers the screen logic: one recorded G/L line is repeated once per detail row, and Save is pressed once per journal. The SAP BDC recording guide covers how to record it. On S/4HANA, PostNow.ai's API mode also posts journals through SAP's SOAP service Journal Entry - Post (Synchronous). For a G/L journal from Excel, the BAPI is the shortest path; BAPI vs BDC in SAP compares the two in general.

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_ACC restarts 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 SUMIF on 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.

NeedRouteHow it works
Amounts calculated each period (accruals, allocations, provisions)PostNow.ai FB50 templateThe 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.14FBD1 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 dateSAP accrual/deferral: FBS1, then F.81FBS1 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 in SHDB.
  • Parking through the BAPI depends on your release. The BAPI header has a DOC_STATUS field, 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:

RowDocument RefHeader fieldsLine fields
HACCR-2610-007Company code 1010, document date 20261031, posting date 20261031, type SA, EUR, reference ACCR-2610-007, text "Oct consulting accrual"
DACCR-2610-007Line 1, G/L 0000476000, 12,400.00, cost center 10101301
DACCR-2610-007Line 2, G/L 0000476000, 3,980.50, cost center 10101402
DACCR-2610-007Line 3, G/L 0000219100, -16,380.50, no CO object (balance sheet account)
  1. Validate. Two cells are flagged: a posting date typed as 31/10/2026 and a document type SB outside the allow-list. Both are fixed in the sheet.
  2. Simulate. 21 journals pass. Two return F5 702 because the accrued liability was copied in as a positive amount; one returns KI 235 because a new expense line has no cost center. All three are corrected and pass a second Simulate.
  3. Run. All 24 post. Each H row now holds its document number with user, time and SAP system.
  4. 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.
  5. 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 (AWTYP and AWKEY in BKPF). For journals posted through BAPI_ACC_DOCUMENT_POST those are BKPFF and the 18-character OBJ_KEY returned at posting; map $OBJ_KEY to 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_POST refuses BKPFF documents with RW messages 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 or F.80 does 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 FBS1 are normally reversed with F.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:

MessageWhat it meansFix
RW 609 Error in documentA wrapper from the accounting interface; the real reason is the next message in the cellRead the message after it and fix that one
F5 702 Balance in transaction currencyThe journal's lines do not add up to zeroEnter 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 openThe posting date falls in a period closed in OB52Correct the posting date, or ask FI to open the period
KI 235 Account … requires an assignment to a CO objectAn expense line (a cost element) has no cost center, order or WBS elementAdd the CO object column to the line
F5 727 Maximum number of items in FI reachedMore than 999 lines in one journalSplit it into several balanced journals
Run Log: UNKNOWN (PostNow.ai)SAP's answer was lost after the journal was sent, so it may have postedLook 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.

QuestionFB50FB01FB60
LinesG/L accounts onlyAny account type, set by posting keyOne vendor line plus G/L lines
Debit/creditDebit/credit indicator (in the BAPI: the sign)Posting key, such as 40 / 50Invoice or credit memo, set on the header
Typical document typeSAEntered on the header for each posting (SA, DR, KR ...)KR
GuideThis pageFB01 GL document uploadFB60 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 and BSEG still 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 scenario SAP_COM_0002; on premise, Basis exposes it in SOAMANAGER.

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.

  1. Every journal's signed amounts add up to zero, checked with a SUMIF per Document Ref.
  2. Credits are negative; no separate debit/credit or posting key column is mapped.
  3. Each journal's D rows sit directly under its H row, and the sheet was not re-sorted afterwards.
  4. Posting dates are typed values in the target period, not =TODAY(), and the period is open in OB52.
  5. G/L accounts are text with leading zeros, exist in the company code and are not blocked for posting.
  6. Every expense line has the CO object its account requires, and a profit center where S/4HANA needs one.
  7. Document type and reference follow your FI conventions, and every reference is unique to this run.
  8. No journal exceeds 999 lines.
  9. The reversal plan is agreed: FB08 template, recording, F.80, or a new journal with flipped signs.
  10. 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.

Frequently asked questions

How do I upload journal entries from Excel into SAP?
With PostNow.ai, put one header row per journal and one detail row per G/L line in a template mapped to BAPI_ACC_DOCUMENT_POST, such as the free FB50 template, with credits as negative amounts. Validate checks the sheet offline, Simulate lets SAP check every journal and rolls it back, and Run posts each journal and writes its document number back to the header row. Journals that fail show SAP's messages in the row and can be re-posted with Retry Failed.
What is FB50 in SAP?
FB50 is the SAP transaction for entering a G/L account document: a journal entry whose lines are all general ledger accounts, entered on one screen with a debit/credit indicator per line. Its default document type in the standard system is SA, and the document must balance before SAP posts it.
Do I need posting keys for FB50?
No. FB50 sets debit or credit with an indicator per line, and BAPI_ACC_DOCUMENT_POST reads it from the sign of the amount: positive is a debit, negative a credit. Posting keys such as 40 and 50 belong to FB01, where you choose the key yourself.
Which BAPI posts a G/L journal entry?
BAPI_ACC_DOCUMENT_POST. The header goes in DOCUMENTHEADER with business transaction RFBU, the account and assignments of each line in ACCOUNTGL, and the amount in CURRENCYAMOUNT, joined to the line by ITEMNO_ACC. The caller must commit with BAPI_TRANSACTION_COMMIT, and the document number comes back in OBJ_KEY.
Can one Excel file hold many journal entries?
Yes. Each header row starts a journal and the detail rows under it are its lines, so one file can hold hundreds of journals. Each one is posted or rejected on its own, must balance to zero, and can have at most 999 lines.
How do I reverse journal entries posted in bulk?
FB08 reverses one document and F.80 reverses a selection of documents in one run. With PostNow.ai you can reverse from a file with the FB08 reversal template on BAPI_ACC_DOCUMENT_REV_POST, which needs each document's object type and key, or with a recording of FB08; reverse a few documents in a test client first. Accruals entered with FBS1 are reversed with F.81.
FB50, FB01 or FB60: which one should I use?
FB50 for journals whose lines are all G/L accounts, such as accruals and reclassifications. FB01 when you need posting keys or customer and vendor lines in the same document. FB60 for a vendor invoice without a purchase order.
Can journal entries be automated in SAP?
Yes. SAP itself automates fixed recurring entries (FBD1 and F.14) and accruals that reverse on a set date (FBS1 and F.81). For journals whose amounts are calculated each period, SAP journal entry automation with PostNow.ai posts them from the Excel model through BAPI_ACC_DOCUMENT_POST, under the user's own SAP login, with each document number written back.
Your accrual model. SAP's posting rules.

Post your next month-end journals from Excel

Map FB50 once, simulate every journal, then post and see each document number on its row.

Start free trial
  • 14-day free trial
  • Works with ECC and S/4HANA
  • Posts under your own SAP login