To push sales figures up and motivate vendors, companies often pay incentives or rebates to their vendors. These rebates or incentives can be based on sales number reported by them or some other key parameters.
But at the same time companies also want to ensure that the payments from them are received in time and open balance is within a certain threshold.
In my latest FS-ICM (Incentives and Commission Management) implementation project we got the same set of requirements but both linked with each other.
The requirement was: ‘Company wants to pay incentives to their customers, but only at the condition that customers don’t have any open amounts due to the company and the payments for the last period have arrived in time (We termed this as Solvency Check)’.
This requirement can be further broken into 2 parts:
a) Open Item Check
b) Payment Due Date Check
The requirement was realized by using standard BAPI’s available from FI-AR as customer was using AR system to post amounts.
a) Realization of Open Item Check: FI-AR exposes BAPI ‘BAPI_AR_ACC_GETOPENITEMS’. By calling this BAPI with required parameters one can get list of all open items for particular customer. By making a loop at open items and adding the respective amounts one can get to know the open amount for that customer and make a decision to pass or fail this Open Item Check.
b) Realization of Payment due Date Check: For this, first of all one needs to fetch all invoices posted within check period. This can be achieved by calling BAPI ‘BAPI_AR_ACC_GETSTATEMENT’. Resultant items can be then filtered further to pick up line items for which clearing document number is mentioned.
A loop is then made on filtered items, and for each item under loop following steps are performed:
- Calculation of Net Payment Due Date – this can be calculated by adding Payment Terms to Baseline Due Date (one can add also Grace Days as decided by company).
- Reading corresponding Clearing Document Header - Clearing document number mentioned in line items is then read from database so that document date of clearing document can be fetched. For this function module ‘FAGL_GET_BKPF’ can be used.
- Comparison of Document Date of Clearing Document against Net Payment Due Date -
¨ If Document date of clearing document is less than Net Payment Due Date then this means that Payment has arrived in time. So Payment Due Date check for Line item under loop is passed and the same check is executed for next line item.
¨ If Document date of clearing document is greater than Net Payment Due Date then this means that Payment has not arrived in time. So Payment Due Date check for Line item under loop is failed and so whole Payment Due Date check is marked as Failed.
Once both the checks are executed and status for both of them is passed then actual Incentive Postings take place else system skips Incentive Posting for customer by issuing appropriate log messages.