Fixed day payment terms – The magic behind due date determination!!!
Payment terms define the parameters to derive the due date for the payment of an invoice, cash discount terms and periods, installment terms, default payment block/method that can be set etc. Usually baseline date is defined and derived from payment terms which is in turn used as the base for calculation of due date for payment.
Fixed date payment terms are used when the due date for the payment is a fixed date.
E.G: Payment is due on 20th October of every year.
Usually this kind of payment terms are used in case of seasonal sales/purchases.
Many people might have a doubt, if the due date is a fixed day, why do we need payment terms at all?. Instead, can’t we enter the due date directly in invoice? Fixed day payment terms are used for better management of invoices/payments. We maintain the payment terms in master data of customer/vendor which is defaulted to invoice automatically. So, we don’t have to go through the pain of remembering each fixed date for every customer/vendor.
Definition of fixed day payment term is done with out any baseline date as shown below. Then, how does SAP derives due date?
There is no standard SAP logic which determines the due date for fixed day payment terms. It is left to customers to write their own logic through
BTE (Business transaction event) 1120.
Implicit enhancement can be done in the BTE function module OPEN_FI_PERFORM_00001120_P to write custom ABAP logic and update the field ZFBDT (Baseline date) of internal table t_bsegsub.
One of the flexible way is to maintain a TVARVC variable with the list of fixed day payment terms in the format YYYYMMDD where MMDD is already known.
Year can be replaced with current year/year from posting date through program logic.
In below screenshot, 15th January of every year is the fixed due date for the payment term 070. This TVARVC variable can be queried with the payment term as low value to identify the due date from high value. YYYY should be replaced with year from posting date/any other logic based on business requirement.
Above BTE is called for every FI document creation where due date determination is required (From sales, purchase etc). So, logic has to be restricted based on business requirement.
Your valuable comments/any other better approach if you know would be most welcome 🙂