CorrectBankFile

BAI2 bank statement format and import errors

BAI2 is a record-oriented cash-management format used to exchange account balances and transaction activity. A file can contain groups, multiple accounts, balance summaries, transaction details, continuation records, and trailer totals. That hierarchy makes BAI2 useful for treasury workflows—and means one missing delimiter, record, count, or total can invalidate a larger section of the file.

An import failure can come from three different places: the BAI2 file structure, the bank’s implementation and transaction codes, or the ERP’s configured format and mappings. Treat those as separate checks.

Current CorrectBankFile scope: CorrectBankFile does not currently accept or natively validate BAI2. The current validator supports OFX, QFX, QBO, bounded CAMT.053, and MT940 structural diagnosis. This page is practical format and interoperability guidance, not a BAI2 upload promise.

Understand the BAI2 record hierarchy

The BAI Cash Management Balance Reporting Specifications define an ordered hierarchy:

  • 01 — file header
  • 02 — group header
  • 03 — account identifier and account-level balance data
  • 16 — optional transaction detail within an account
  • 88 — continuation of the preceding record
  • 49 — account trailer
  • 98 — group trailer
  • 99 — file trailer

A file can contain several groups; a group can contain several accounts; an account can contain zero or more transaction details. Each level must close with the appropriate trailer. An importer that loses track of one boundary may report an error much later than the actual defect.

Common BAI2 import failures

A required header or trailer is missing

A partial download or broken concatenation can omit the 01 header, an account’s 49 trailer, a group’s 98 trailer, or the final 99 record. Check the hierarchy before inspecting individual transactions. A file can look plausible in a text editor while still ending mid-account or mid-group.

If several bank files were combined, verify that the process did not place a second file header inside the first file or discard a trailer between them.

Delimiters and record endings changed

BAI2 is delimited and record-oriented. A converter, spreadsheet, or transfer process can change commas, slashes, line endings, or empty fields. That can shift later values into the wrong positions.

Record 88 needs particular care. It continues the immediately preceding record rather than defining an independent transaction. If a line is wrapped without a valid continuation, or the 88 data is detached from its parent, the importer may interpret narrative text as a new field or record.

Counts and control totals do not match

Account, group, and file trailers contain counts and control totals. Their exact calculation follows the chosen BAI2 rules and data in the records. Importers may reject a file when:

  • an account record count omits a continuation or transaction record;
  • an account control total does not match the included balance and transaction amounts;
  • a group trailer reports the wrong number of accounts;
  • a group control total does not reconcile with its accounts;
  • a file trailer reports the wrong number of groups or file total.

Oracle’s BAI2 parser validations illustrate how a real importer checks record codes, continuation behavior, counts, and control totals. Do not overwrite a trailer just to silence an error: first establish which source record or transformation made the totals diverge.

Account identifiers do not map

The 03 account record identifies the account and reports balance/status values. A structurally correct account identifier may not match the ERP’s bank-account master. Leading zeros, domestic identifiers, bank routing conventions, or a changed account number can all break mapping.

When a multi-account file imports partially, investigate whether the failed account is missing, ambiguous, inactive, in another legal entity, or configured for a different statement format.

Transaction codes are unknown or mapped incorrectly

BAI2 uses type codes for balances, summary activity, and transaction details. The destination may use those codes to classify credits, debits, fees, transfers, or other activity. A bank-specific code can be legal in the bank’s profile but unmapped in the ERP.

This distinction matters: changing a valid bank code inside the file can alter accounting meaning. Prefer updating a documented destination mapping or bank-format profile when the source code is correct.

Amount, date, and sign interpretation differs

BAI2 amounts and dates follow format rules rather than localized display conventions. Failures can arise from decimal assumptions, signs, date fields, currency/group context, or a transaction code whose debit/credit meaning is not configured correctly.

If an import succeeds but reverses credits and debits, compare the bank’s type-code specification with the destination mapping before editing amounts. A mapping defect is not the same as a malformed source file.

Bank-specific data exceeds the destination profile

Banks may populate optional fields, long text, proprietary transaction codes, or account summaries differently. An ERP implementation may accept only a subset. Keep a known-good sample from the same bank and channel, and compare it with the failing export at the record level.

Troubleshoot without damaging the statement

  1. Preserve the original file and its encoding.
  2. Confirm the 01 through 99 hierarchy is complete.
  3. Verify group and account boundaries before examining transactions.
  4. Check delimiters and 88 continuations.
  5. Recalculate counts and control totals using the applicable profile.
  6. Compare account identifiers with the destination’s bank-account setup.
  7. Review transaction-code mappings with the bank’s specification.
  8. Test a copy in a non-production company or reconciliation environment.

BAI2 compared with MT940 and CAMT.053

BAI2 is strongly record-oriented and is common in cash-management workflows. MT940 uses tagged statement records. CAMT.053 uses ISO 20022 XML with explicitly nested statements, balances, entries, and transaction details. The right choice depends on what the bank supplies and what the destination has configured—not merely which format is newer.

Use electronic bank statement import errors when the failure layer is still unclear. If the destination is Microsoft Dynamics 365 Finance, see the Dynamics 365 import guide. For questions about a BAI2 integration, contact CorrectBankFile with a redacted description of the bank profile and destination; do not send sensitive statement data through the contact form.

Related help articles

Electronic bank statement import errors Start with the broad symptom router when the failure layer is unclear. MT940 format and import errors Compare BAI2's record hierarchy with a tagged-text statement format. CAMT.052 vs CAMT.053 vs CAMT.054 Understand the roles of the ISO 20022 account-reporting messages. Dynamics 365 bank statement imports Review BAI2 format selection and configuration in Dynamics 365 Finance.

Need help with an enterprise statement workflow?

Review the supported-format guides or contact us about the source format and destination requirements.

Contact CorrectBankFile Back to Help