Monday, April 16, 2012

Loans (Part 4) Event 2900

Event: 2900 Loan: Calculate Repayment Plan
Sample FM: FKK_SAMPLE_2900_NEW


The function module processed at event 2900 calculates a repayment plan for a loan on the basis of the transfer parameters.


The module creates the repayment plan in table TFKKLOAN and returns it to the calling program.
Field FAEDN of table FKKLOAN contains the due dates of the individual loan installments. This module calculates the fields INTEREST (interest amount), REPAYMENT (repayment amount), ANNUITY (Annuity = interest amount + repayment amount) for the individual due dates.


Make sure that the condition INTEREST + REPAYMENT = ANNUITY is filled for all due dates.
In addition, the total of the amounts in the field REPAYMENT must agree with the total loan (import parameter I_LOANAMOUNT).


Notes:
  1. Monthly Duration = 30 days
  2. IF interval type = monthly and the interval = 1. The formula is
    • Loan Monthly Payment Amount = [ rate + ( rate / { [ (1 + rate ) ^ months ] - 1 } ) ] * principal
    • rate = annual percentage rate / 1200   
  3. ELSE
    • Get estimate roughly by triangle hypothesis - total interest amount
    • Total Interest Amount = [ ( principal /2 ) * rate * ( duration / 360 ) ] 
    • Payment Amount per Interval = [ Total Interest Amount + Principal Amount ] / Number of Installments