FATAHTBL – Important Columns and Migration Reference
FATAHTBL – Important Columns and Migration Reference
FATAHTBL is one of the main transaction tables required for accounting data migration. The table contains voucher-level accounting transaction records.
The following columns are the main columns required for understanding, preparing, migrating, and verifying the data.
| Column | Description | Migration / Verification Use |
|---|---|---|
| TRANUB | Transaction number. All records belonging to the same transaction/voucher are stored under the same TRANUB. For each complete and valid transaction, total Debit and total Credit should be equal. | Used to identify and group complete voucher transactions and verify Dr/Cr balance. |
| TRASRL | Transaction serial number indicating the order in which transaction data was recorded in the database. | Can be used to understand or verify the original transaction recording order. |
| TRNCOD | Voucher ID/code. Indicates which voucher type or voucher the transaction belongs to. | Used to identify the source voucher type during migration and verification. |
| DOCNUB | Voucher series/number. This is the unique series number of the voucher and is generally the printed voucher number. | Used for voucher identification and voucher-level verification. |
| DOCSRL | Voucher record serial number showing the sequence in which the voucher was recorded in the database. | Can be used to verify voucher recording order. |
| DOCDAT | Voucher date stored in YYYYMMDD format. |
Can be converted into the required date format during data preparation and migration. |
| ACCCOD | Ledger or Chart of Account code. Identifies the ledger associated with the transaction. | Used for ledger mapping, data insertion, and verification. |
| SLCODE | Subledger code associated with the transaction. | Used to identify and migrate subledger-wise transactions. |
| PRTCLS | Narration or transaction description. | Used to preserve transaction narration and assist with verification. |
| BILNUB | Bill number related to the transaction, where available. | Used for bill-level reference and verification. |
| BILDAT | Bill date recorded against the transaction. This may or may not be the same as the voucher date. | Used to retain original bill-date information. |
| CHQNUB | Cheque number. | Used for cheque transaction reference. |
| CHQDAT | Cheque date. | Used to retain cheque-related date information. |
| BNKNAM | Bank name. | Used for bank transaction information. |
| BNKBRN | Bank branch. | Used for bank transaction information. |
| CURCOD | Currency code, such as NPR or INR. |
Used to identify the transaction currency. |
| CURRAT | Currency exchange rate. | Used for foreign currency transaction verification and conversion. |
| AMOUNT | Local currency amount. Positive value represents Debit and negative value represents Credit. Credit values should be converted using ABS() so that the final accounting record stores a positive Credit amount. |
Used to prepare Debit and Credit values for migration. |
| PRJCOD | In sales/debtor-related transactions, this may contain the debtor/receivable profile code. It can also contain other types of codes depending on the transaction. Where it contains a receivable code, the related detailed transaction may be identified in ARTRNTBL. | Used for debtor/receivable mapping and linking related transactions with ARTRNTBL. |
| REVCOD | Cost center code. | Used for cost center mapping and verification. |
| CLOSED | Indicates whether a transaction is active or closed. If the value is C, the voucher/transaction is considered inactive, deleted, or reversed. |
Inactive transactions should not simply be ignored during migration because this may break voucher series continuity. Where required, such transactions should be migrated with Debit = 0.01 and Credit = 0.01 to preserve the voucher sequence. |
| Other Columns | FATAHTBL contains additional columns not listed here. | Only the main columns required for migration, preparation, and verification are included in this document for easier study and reference. |
AMOUNT Conversion Rule
The AMOUNT column stores the local currency amount using the sign to determine Debit or Credit:
-
Positive AMOUNT → Debit
-
Negative AMOUNT → Credit
During migration, negative accounting values should not be stored as negative Credit amounts. The value should be converted to a positive amount using ABS().
Example:
| AMOUNT | Debit | Credit |
|---|---|---|
| 10,000 | 10,000 | 0 |
| -10,000 | 0 | 10,000 |
Example logic:
CASE
WHEN AMOUNT >= 0 THEN AMOUNT
ELSE 0
END AS DEBIT,
CASE
WHEN AMOUNT < 0 THEN ABS(AMOUNT)
ELSE 0
END AS CREDIT
Important Migration Notes
1. Voucher Balancing
Records with the same TRANUB belong to the same transaction/voucher. Before migration, the total Debit and total Credit for each valid transaction should be checked.
TRANUB → Total Debit = Total Credit
This is important for identifying incomplete or incorrectly prepared voucher data.
2. Voucher Identification
The following fields are important for voucher-level identification and verification:
TRANUB → Transaction Group
TRNCOD → Voucher ID/Type
DOCNUB → Voucher/Printed Number
DOCSRL → Voucher Recording Serial
These fields should be retained wherever required so that migrated data can be traced back to the original source records.
3. Closed Transactions
If CLOSED = 'C', the transaction is inactive/deleted/reversed.
Such records should be handled carefully. Simply excluding them may result in missing or broken voucher numbers/series. Where voucher continuity is required, the transaction should be migrated with:
Debit = 0.01
Credit = 0.01
This preserves voucher continuity while keeping the net accounting impact at zero.
4. Debtor / Receivable Transactions
Where PRJCOD contains a receivable/debtor profile code, it can be used to identify and link related detailed records from the ARTRNTBL table.
However, PRJCOD may also contain other types of codes, so it should not automatically be treated as a debtor code without verification.
Summary
For FATAHTBL migration, the most important fields are:
TRANUB, TRASRL, TRNCOD, DOCNUB, DOCSRL, DOCDAT, ACCCOD, SLCODE, PRTCLS, BILNUB, BILDAT, CHQNUB, CHQDAT, BNKNAM, BNKBRN, CURCOD, CURRAT, AMOUNT, PRJCOD, REVCOD and CLOSED.
These columns provide the main information required to:
-
Group and balance vouchers.
-
Identify voucher numbers and voucher types.
-
Map ledgers and subledgers.
-
Convert amounts into Debit and Credit.
-
Preserve narration, bill, cheque, bank, and currency details.
-
Link debtor-related transactions with ARTRNTBL.
-
Handle inactive transactions without breaking voucher series.
-
Verify migrated data against the original source database.
Other columns are available in the table, but only the important columns required for migration and verification are included here to make the document easier to study and use.