Jump to a template (11)
- FB50GL Journal Entry
- FB01GL Document, full entry
- FBS1Accrual / Deferral Document
- FB60Vendor Invoice
- FB65Vendor Credit Memo
- FB70Customer Invoice
- FB75Customer Credit Memo
- FB08Document Reversal
- ABZONAsset Acquisition with Automatic Offsetting Entry
- KB21NDirect Activity Allocation
- KB31NStatistical Key Figure Posting
Loading order and dependencies
One thing to understand before loading any of the accounting templates: the amount does not live on the line item. The line item structure carries the account and the assignments but no amount at all. Every figure sits in a separate currency table, joined back to its line by an item number, and the sign on the amount is what makes the line a debit or a credit. Get that join wrong and the document is unbalanced with no useful error message. Each template handles the join for you and documents it on the BAPI Mapping tab.
Use this sequence whenever these files serve as SAP migration templates in an S/4HANA migration, and again for mass loads after go live.
Using these templates with the SAP Migration Cockpit or LSMW
Finance data comes after master data in an SAP data migration, and these templates cover it. The column to field mapping is the same mapping the SAP Migration Cockpit and LSMW both need for the initial load. Many teams use them to collect and cleanse GL, vendor and open item data before an S/4HANA migration go live, then keep them for the mass change postings that follow.
SAP GL Journal Entry Upload Template (FB50)
A general ledger journal entry with no sub-ledger line. Every line is a GL account.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe standard SAP interface this template posts through. Same business logic as FB50, no screen and no recording.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 8 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | Company code the document posts in. |
| Document Date | DOCUMENTHEADER | DOC_DATE | Date on the source document. YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | Drives the posting period. Period must be open. YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | SA general journal, AB general document. |
| Currency | CURRENCYAMOUNT | CURRENCY | Document currency. |
| Line Item | ACCOUNTGL | ITEMNO_ACC | Sequential line number. The key that joins ACCOUNTGL to CURRENCYAMOUNT. |
| GL Account | ACCOUNTGL | GL_ACCOUNT | Must be postable. A reconciliation account will be rejected. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Always positive here. Sign applied from the S/H indicator. |
SAP GL Document Upload Template (FB01)
The general posting transaction. Use it when a document mixes GL, vendor and customer lines, which FB50 cannot do.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe standard SAP interface this template posts through. FB01 is the general entry screen; this is the interface behind it.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 7 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | Company code the document posts in. |
| Document Date | DOCUMENTHEADER | DOC_DATE | YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | Drives the posting period. YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | SA, KR, DR, AB. |
| Currency | CURRENCYAMOUNT | CURRENCY | Document currency. |
| Line Item | ACCOUNTGL | ITEMNO_ACC | Must be unique across GL, vendor and customer lines in one document. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Always positive here. |
SAP Accrual / Deferral Document Upload Template (FBS1)
A journal entry that carries its own reversal date, so the reversal can be run later with F.81.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe same interface as any FI document. What makes it an accrual is the reversal date and reason carried on the header.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 10 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | |
| Document Date | DOCUMENTHEADER | DOC_DATE | YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | Usually the period end. YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | SA, or a dedicated accrual type. |
| Currency | CURRENCYAMOUNT | CURRENCY | |
| Reversal Date | DOCUMENTHEADER | REVERSAL_DATE | When the reversal will post. Usually the first day of the next period. YYYYMMDD. |
| Reversal Reason | DOCUMENTHEADER | REASON_REV | Must allow an alternative posting date if the reversal falls in a later period. |
| Line Item | ACCOUNTGL | ITEMNO_ACC | Joins ACCOUNTGL to CURRENCYAMOUNT. |
| GL Account | ACCOUNTGL | GL_ACCOUNT | |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Always positive here. |
SAP Vendor Invoice Upload Template (FB60)
Post supplier invoices that are not tied to a purchase order. An H row is the invoice, D rows are the expense lines.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe general accounting interface. One header, one payable line built from the header, and as many expense lines as you need, with every amount in a separate table.
What to watchMoney does not live on the line item. ACCOUNTGL carries the account and the assignments but no amount at all. Every figure sits in CURRENCYAMOUNT, joined back to its line by ITEMNO_ACC, and the sign in AMT_DOCCUR is what makes the line a debit or a credit. Get the join wrong and the document is unbalanced with no useful message.
Mandatory fields 10 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | |
| Document Date | DOCUMENTHEADER | DOC_DATE | The date on the supplier's invoice. YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | Period must be open. YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | KR is the usual vendor invoice type. |
| Currency | CURRENCYAMOUNT | CURRENCY | Document currency. Goes on every amount row. |
| Vendor | ACCOUNTPAYABLE | VENDOR_NO | |
| Gross Amount | CURRENCYAMOUNT | AMT_DOCCUR | The payable line. Loaded as a negative amount against the vendor. |
| Line Item | ACCOUNTGL | ITEMNO_ACC | The join key. Must be unique within the document. |
| GL Account | ACCOUNTGL | GL_ACCOUNT | Ten characters, zero padded. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Net of tax where the tax code calculates. |
SAP Vendor Credit Memo Upload Template (FB65)
A credit from a supplier with no purchase order reference. Use MIRO when the credit relates to a PO and a goods receipt.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe same interface as FB60. What makes it a credit memo is the document type and the direction of the amounts.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 11 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | |
| Vendor | ACCOUNTPAYABLE | VENDOR_NO | Must exist in this company code. |
| Document Date | DOCUMENTHEADER | DOC_DATE | The supplier's credit note date. YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | KG vendor credit memo. |
| Reference | DOCUMENTHEADER | REF_DOC_NO | The supplier's credit note number. |
| Gross Amount | CURRENCYAMOUNT | AMT_DOCCUR | Total credit including tax. Posted as a DEBIT on the vendor line. |
| Currency | CURRENCYAMOUNT | CURRENCY | |
| Line Item | ACCOUNTGL | ITEMNO_ACC | |
| GL Account | ACCOUNTGL | GL_ACCOUNT | The expense being credited back. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Net line amount, always positive here. |
SAP Customer Invoice Upload Template (FB70)
A customer invoice posted directly in FI, with no sales order or delivery behind it. Use VF01 for invoices from the sales process.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe same interface as any FI document. The customer line lives in ACCOUNTRECEIVABLE rather than ACCOUNTPAYABLE.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 11 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | |
| Customer | ACCOUNTRECEIVABLE | CUSTOMER | Must exist in this company code. |
| Document Date | DOCUMENTHEADER | DOC_DATE | YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | DR customer invoice. |
| Reference | DOCUMENTHEADER | REF_DOC_NO | Your invoice number. |
| Gross Amount | CURRENCYAMOUNT | AMT_DOCCUR | Total receivable including tax. |
| Currency | CURRENCYAMOUNT | CURRENCY | |
| Line Item | ACCOUNTGL | ITEMNO_ACC | |
| GL Account | ACCOUNTGL | GL_ACCOUNT | Revenue account. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Net line amount, always positive here. |
SAP Customer Credit Memo Upload Template (FB75)
A credit to a customer posted directly in FI. Use a credit memo request and VF01 when the credit belongs in the sales process.
BAPI_ACC_DOCUMENT_POSTWatch DemoThe same interface as FB70, with the direction of the amounts reversed.
What to watchThe one thing that catches people: ITEMNO_ACC is the join. A line's account data sits in ACCOUNTGL or the sub-ledger table, and its money sits in CURRENCYAMOUNT. They are linked only by ITEMNO_ACC. Miss the link and the line posts with no value, or the document will not balance.
Mandatory fields 11 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | DOCUMENTHEADER | COMP_CODE | |
| Customer | ACCOUNTRECEIVABLE | CUSTOMER | |
| Document Date | DOCUMENTHEADER | DOC_DATE | YYYYMMDD. |
| Posting Date | DOCUMENTHEADER | PSTNG_DATE | YYYYMMDD. |
| Document Type | DOCUMENTHEADER | DOC_TYPE | DG customer credit memo. |
| Reference | DOCUMENTHEADER | REF_DOC_NO | Your credit note number. |
| Gross Amount | CURRENCYAMOUNT | AMT_DOCCUR | Total credit including tax. |
| Currency | CURRENCYAMOUNT | CURRENCY | |
| Line Item | ACCOUNTGL | ITEMNO_ACC | |
| GL Account | ACCOUNTGL | GL_ACCOUNT | The revenue being reversed. |
| Amount | CURRENCYAMOUNT | AMT_DOCCUR | Always positive here. |
SAP Document Reversal Upload Template (FB08)
Reverse posted accounting documents in bulk. One row is one reversal.
BAPI_ACC_DOCUMENT_REV_POSTWatch DemoThe reversal counterpart to BAPI_ACC_DOCUMENT_POST. It creates a new document that reverses an existing one.
What to watchThe thing that trips people up: this BAPI does not identify the source document by document number, company code and year. It identifies it by OBJ_TYPE and OBJ_KEY, which are the AWTYP and AWKEY of the original document in table BKPF. Your file needs those, or a lookup step that reads BKPF first.
Mandatory fields 6 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Object Type | REVERSAL | OBJ_TYPE | The AWTYP of the document being reversed. Read from BKPF. |
| Object Key | REVERSAL | OBJ_KEY | The AWKEY of the document being reversed. Read from BKPF. |
| Document Number | REVERSAL | AC_DOC_NO | The original document number. Used for your own reconciliation. |
| Company Code | REVERSAL | COMP_CODE | |
| Reversal Posting Date | REVERSAL | PSTNG_DATE | When the reversal posts. Period must be open. YYYYMMDD. |
| Reversal Reason | REVERSAL | REASON_REV | 01 wrong in FI, 02 reversal in FI, 05 accrual reversal. |
SAP Asset Acquisition Upload Template (ABZON)
Capitalise assets with the offsetting entry generated automatically. One row is one acquisition posting.
BAPI_ASSET_ACQUISITION_POSTWatch DemoA dedicated asset posting interface, not the general accounting one. It is the only one of the two that carries an asset transaction type and an offsetting account.
What to watchDo not reach for BAPI_ACC_DOCUMENT_POST here. Its line item structure carries an asset number and a sub number but no asset transaction type field at all, which is why SAP publishes a note about error AA326 on exactly that path. BAPI_ASSET_ACQUISITION_POST has both the transaction type and the offsetting account, which is what ABZON actually needs.
Mandatory fields 9 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Company Code | GENERALPOSTINGDATA | COMP_CODE | |
| Asset Number | GENERALPOSTINGDATA | ASSETMAINO | Twelve characters. The asset must already exist. |
| Asset Subnumber | GENERALPOSTINGDATA | ASSETSUBNO | 0000 where there are no sub numbers. |
| Asset Transaction Type | GENERALPOSTINGDATA | ASSETTRTYP | 100 for an external acquisition. Three characters. |
| Document Date | GENERALPOSTINGDATA | DOC_DATE | YYYYMMDD. |
| Posting Date | GENERALPOSTINGDATA | PSTNG_DATE | Period must be open. YYYYMMDD. |
| Amount | ACQUISITIONDATA | AMOUNT | The capitalised value. |
| Currency | ACQUISITIONDATA | CURRENCY | |
| Offsetting Account | ACQUISITIONDATA | OFFSET_ACCOUNT | The automatic offsetting entry. This is what makes it ABZON rather than F-90. |
SAP Direct Activity Allocation Upload Template (KB21N)
Allocate activity quantities from a sending cost centre to a receiver. An H row is the CO document, D rows are the allocations.
BAPI_ACC_ACTIVITY_ALLOC_POSTWatch DemoA CO document, not an FI one. There is no company code on the header, only a controlling area.
What to watchSender and receiver use different data elements for the same idea and the names transpose easily. SEND_CCTR is the sender cost centre, REC_CCTR the receiver, and ACTTYPE is the sender's activity type while RECACTTYPE is the receiver's. A sheet that maps its one Cost Center column to the receiver and leaves the sender blank fails with no sender, which reads like a master data problem and is not.
Mandatory fields 8 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Controlling Area | DOC_HEADER | CO_AREA | There is no company code on this header. |
| Document Date | DOC_HEADER | DOCDATE | YYYYMMDD. |
| Posting Date | DOC_HEADER | POSTGDATE | YYYYMMDD. |
| Line Item | DOC_ITEMS | ITEMNO_ACC | Sequential within the document. |
| Sender Cost Center | DOC_ITEMS | SEND_CCTR | Data element SKOST. The sender, not the receiver. |
| Sender Activity Type | DOC_ITEMS | ACTTYPE | Data element LSTAR. The sender's activity type. |
| Activity Quantity | DOC_ITEMS | ACTVTY_QTY | |
| Activity Unit | DOC_ITEMS | ACTIVITYUN | H for hours. |
SAP Statistical Key Figure Upload Template (KB31N)
Post statistical key figures such as headcount or floor area. An H row is the CO document, D rows are the figures.
BAPI_ACC_STAT_KEY_FIG_POSTWatch DemoThe one sided sibling of direct activity allocation. Everything here is a receiver, because a statistical key figure has no sender.
What to watchThere is no unit of measure field in this interface at all. BAPISKFITM carries STAT_QTY and nothing to qualify it, unlike the activity allocation item which has both a unit and an ISO unit. The unit comes from the key figure's own master record, so the number you load is read in whatever unit KK01 says. A sheet with a unit column will have nowhere to send it.
Mandatory fields 5 fields
| Column | SAP structure | SAP field | Note |
|---|---|---|---|
| Controlling Area | DOC_HEADER | CO_AREA | |
| Document Date | DOC_HEADER | DOCDATE | YYYYMMDD. |
| Posting Date | DOC_HEADER | POSTGDATE | YYYYMMDD. |
| Statistical Key Figure | DOC_ITEMS | STATKEYFIG | Six characters. Created in KK01. |
| Quantity | DOC_ITEMS | STAT_QTY | The unit comes from the key figure master, not from this sheet. |
After the template
Posting these templates to SAP
Filling in a template is the easy half. PostNow.ai is the other half: it loads the sheet, checks every row against your live SAP system, and posts it through the same SAP interface named on the template, under your own SAP user and authorisations. Nothing is written that you could not write yourself in the SAP GUI, and every row that fails is reported with the SAP message that caused it.
- Load the sheet
- Check every row in live SAP
- Post through the SAP interface
FAQ
Frequently asked questions
Which SAP interface posts a GL journal entry from Excel?
BAPI_ACC_DOCUMENT_POST. It is the general accounting interface and it handles GL journals, vendor invoices, customer invoices, credit memos and accrual documents, which is why six templates on this page share it. The document type and the line item structures are what differentiate them.
Why is my BAPI posting unbalanced when the Excel adds up correctly?
Almost always because the amounts are not joined to the right lines. In the accounting interface the line item table holds no amount, and every figure sits in a separate currency table linked by an item number. If that item number does not match, or if a line has no matching amount row, the document is unbalanced even though the spreadsheet totals are right. The templates on this page keep the join explicit in a column you can see.
How do I post journal entries to SAP in bulk from Excel?
PostNow.ai posts the filled journal template through BAPI_ACC_DOCUMENT_POST, one document per header row, validating every line against your live SAP system first. It runs under your own SAP user, so period controls, tolerance groups and authorisation checks apply exactly as they would in FB50.
Can I test a financial posting before it hits the ledger?
Yes. SAP provides a check function with an identical signature to the posting function that validates everything and writes nothing. Run the whole file through it first and you will catch missing cost objects, closed periods and unbalanced documents before a single document is created.
How do I reverse documents in bulk?
Use the reversal template on this page. It posts through BAPI_ACC_DOCUMENT_REV_POST and takes the original document number, company code, fiscal year and a reversal reason. The reversal reason controls the posting date, so a reason that forces the original date will fail if that period is closed.
Which interface should I use for an asset acquisition?
BAPI_ASSET_ACQUISITION_POST, not the general accounting interface. The accounting interface carries an asset number field but has no asset transaction type and no offsetting account, which is why postings attempted that way fail with error AA326. The asset template on this page uses the correct interface.
Can I load CO plan data and allocations as well as FI postings?
Yes. This page includes templates for direct activity allocation and statistical key figures, and the master data page carries cost centre and activity price planning. CO planning interfaces use a four table structure joined by an index table, which is the single most common reason a plan upload returns success and plans nothing. PostNow.ai builds that index for you.
Keep going