Thanks for sharing the document. Based on your setup and the issue described, here’s a clear summary and guidance to help you include both the header and missing fields in your payment export file from Business Central:
Objective
You want to export a CSV payment file from the Payment Journal using a custom HSBC BACS format, including:
- A header row
- Fields that are currently missing from table 1226
Identified Issues
- The header row is not exported by default
- Missing fields include:
- Batch Name
- 1RG Bank Sort Code
- 1RG Bank Account No.
- (Optional) SWIFT Code for future international payments
Suggested Solution
-
Header Row
- In the Data Exchange Definition, make sure:
- The first row is defined as a header
- The “Include Header” option is set to “Yes” in the column definitions
-
Missing Fields If the required fields are not available in table 1226, you have two options:
Option A: Extend Table 1226
- Create a table extension for
Gen. Journal Line or the table used for export
- Add the required fields and populate them via code or during journal entry
Option B: Use Related Tables
- If the data exists in related tables (e.g., Bank Account, Vendor Bank Account), retrieve them using a custom codeunit or mapping logic in the Data Exchange Definition
-
Custom Codeunit (Optional)
- If standard mapping doesn’t allow access to the required fields, create a codeunit to:
- Extend the export logic
- Populate the missing fields
- Format the CSV output as needed
Expected Output Format
Transaction Type,Remitter Batch Reference,Customer Reference,DebtorAgent ClearingMmbrId,Debit Account Number,Beneficiary Name,CreditorAgent ClearingMmbrId,Beneficiary Account Number,Transaction Amount,Payment Currency,Requested Processing Date
NURG,BATCH001,INV123,123456,12345678,Vendor A,654321,87654321,1000.00,GBP,25/07/2025
Let me know if you’d like help drafting the AL code for the table extension or the custom export logic.
Best regards,
Daniele