# Bank Loan Tracking, Interest Accrual and Repayment Schedule Program

> A custom program that keeps bank loans (amount, currency, interest, maturity and installment plan) in one place and automatically posts the monthly interest accrual, principal and interest payments of installments falling due, the revaluation of foreign currency loans and the current/non-current reclassification. Remaining principal and future payments per loan are visible in one list.

- Type: Program, Custom development, Background program
- Module: FI
- Estimated effort: L (10–14 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/bank-loan-tracking-interest-accrual-and-repayment-schedule/


## Why is the standard not enough?

The standard offers Treasury and Risk Management or Consumer and Mortgage Loans (CML) for loans; these need separate licensing and setup. Without them, the installment plan sent by the bank is tracked in a spreadsheet, interest accrual is entered by hand with an FBD1 recurring entry or FB50, and the remaining principal is derived from the G/L balance. The custom program brings loan record, plan and posting together inside FI.

### Closest standard alternatives

- FBD1: A recurring entry with a fixed amount can be defined for interest; changing interest, the installment plan and remaining principal are not tracked.
- FB50: Interest and installment entries are made by hand; amounts are calculated outside SAP.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| T012 | House bank that granted the loan | Read | - | ECC + S/4 |
| T012K | Bank account and G/L account used for drawdown and payments | Read | T012K-BUKRS = T012-BUKRS AND T012K-HBKID = T012-HBKID | ECC + S/4 |
| BNKA | Bank name and branch details | Read | BNKA-BANKS = T012-BANKS AND BNKA-BANKL = T012-BANKL | ECC + S/4 |
| BSIS | Loan account items: comparison of plan and G/L balance | Read | - | ECC + S/4 |
| TCURR | Month-end revaluation rates for foreign currency loans | Read | - | ECC + S/4 |
| BKPF | Drawdown, interest, installment, exchange difference and reclassification documents | Write | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_ACC_DOCUMENT_POST: Posts the loan entries
- BAPI_TRANSACTION_COMMIT: Commits after each document
- READ_EXCHANGE_RATE: Reads the rate for foreign currency loan revaluation

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_BUKRS | Company code | Single value | T012-BUKRS | Yes |
| S_HBKID | House bank | Range / multiple | T012-HBKID | No |
| P_BUDAT | Posting date (month end) | Single value | BKPF-BUDAT | Yes |
| R_ACTN | Action: upload plan, monthly run, reclassification or report | Radio button | - | No |
| P_FILE | Installment plan file (for upload) | Single value | - | No |
| P_TEST | Test mode | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Loan no. | Key of the loan record; written to the document reference | Yes |
| Installment no. | Sequence of the installment in the plan | Yes |
| Due date | Date the installment is paid; becomes the posting date of the payment | Yes |
| Principal | Principal repaid in this installment; deducted from the loan account | Yes |
| Interest | Interest paid in this installment; cleared against accrued interest | Yes |
| Taxes and fees | Taxes and fees paid with the installment; posted to the expense account in the settings table | No |
| Currency | Loan currency; must match the currency on the loan record | Yes |

## Result list columns

| Column | Source |
|---|---|
| Loan no. | Calculated: Number in the loan record |
| Bank | BNKA-BANKA |
| Currency | T012K-WAERS |
| Remaining principal | Calculated: Drawdown − principal repaid |
| Interest this month | Calculated: Remaining principal × rate × days / day basis |
| Next installment date | Calculated: First unpaid installment in the plan |
| Current portion | Calculated: Principal payable in the next 12 months |
| G/L difference | Calculated: Loan account balance − remaining principal |
| Status | Calculated: Test, posted or error |

## How does the program work?

1. A loan is entered on screen: bank (T012 and BNKA), drawdown date, amount, currency, interest rate (fixed or variable), day count basis, maturity, principal account and linked house bank account (T012K).
2. The installment plan is either calculated by the program as equal installments or a single bullet payment, or uploaded from the bank's schedule in Excel; plan lines are kept per loan.
3. The drawdown is posted with BAPI_ACC_DOCUMENT_POST, debiting the bank and crediting the loan account.
4. The monthly run accrues interest from the last payment date to month end (debit interest expense, credit accrued interest). For an installment that falls due, principal and accrued interest are cleared and a payment is posted to the bank account.
5. For foreign currency loans, the remaining principal is revalued at the month-end rate (READ_EXCHANGE_RATE) and the exchange difference is posted.
6. At period end, principal payable in the next 12 months is reclassified to the short-term loan account. The G/L balance of the loan account (BSIS) is compared with the remaining principal in the plan.

## Authorization objects

- F_BKPF_BUK: Posting authorization for the company code
- F_BKPF_KOA: Authorization to post G/L account items

## Frequently asked questions

### How are variable-rate loans handled?

The new interest rate is entered on the loan with its effective date. The program calculates interest after that date at the new rate; if the bank sends a new plan, it can be uploaded again from Excel.

### Where are taxes and fees charged on a loan posted?

The taxes and fees column in the plan is posted to expense accounts defined in the settings table. Which items are expenses and which are financing costs is set at installation according to accounting policy.

### Is it linked to cash flow planning?

Yes. Future installments can be passed to cash flow planning as expected payments, so loan repayments show up in the cash position on their due dates.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=fi-bank-loans
