0
Mar 31, 2011 at 05:36 AM

# BRF Plus - instalment plan example

33 Views

Hi,

I am learning BRF Plus, and I am trying to work

out the 'best practice' for encoding some real-world business rules.

For example:

At the moment we have implemented the following 'instalment plan'

logic in an ABAP method. The problem is how to adjust an instalment

plan if the debt amount is increased.

So, given a debt of \$300 and an instalment plan of:

1/5 \$100 <-- eg \$100 is due on 1 May

1/7 \$100

1/9 \$100

-

\$300

.. a debt increase to \$420 on March 15 is rescheduled as:

1/5 \$140

1/7 \$140 <-- \$420 is spread evenly over all remaining instalments

1/9 \$140

-

\$420

The rule shown above is very simple, but there is one complication.

If today's date is less than 7 days before a due date,

the amount on that 'imminent' due date cannot be changed.

For example, if the debt was increased to \$420 on April 28:

1/5 \$100 <-- an 'imminent' instalment amount cannot be increased

1/7 \$160 <-- spread the rest evenly over all remaining instalments

1/9 \$160

-

\$420

(Of course, the logic needs to be able handle any number of instalments).

What would be the best way to implement this kind of logic in BRF?

I was thinking 'decision table', but is it possible to do it that

in a general way (without listing all possible outcomes)?

Or would a static ABAP method be preferable in a case like this?