Skip to main content

Creating fixed payment terms for the Payment Terms Harmonizer - SAP (Catalog 3) app

Some SAP payment term codes follow a calendar-anchored due date structure rather than a simple rolling day count. In SAP (transaction OBB8), a payment term can define the due date as, for example, "net amount due on the 15th of the month following invoice date", combining a fixed day of the month, an optional number of months forward, and an optional number of net days. The Payment Terms Harmonizer app handles this SAP native concept through the Fixed Payment Terms calculation path.

Important

For this calculation to work, you need to have the latest Catalog 3.0 SAP ECC / SAP S4 Extension enabled. The main object involved is MasterPaymentTerm.

The MasterPaymentTerm object

Fixed Payment Terms are powered by the custom object type MasterPaymentTerm (o_custom_MasterPaymentTerm), which replicates the SAP payment term configuration. Each row in this object represents one installment line of a payment term code and carries the following fields:

Table 44. 

Field

Description

PaymentTermCode

The SAP payment term key

DateLimit

Day of the month from which this row applies. A value of 0 means the row applies regardless of the document date.

IsFixedTerm

Calculated flag: 1 if the term has any fixed-date component (DueDateDayFixed ≠ 0, BaselineDateDayFixed ≠ 0, or DueDateMonthsForward ≠ 0); 0 for plain net terms.

BaselineDateMonthsForward

Number of months to add to the document date to derive the baseline date.

BaselineDateDayFixed

Fixed day of the month for the baseline date. 0 means no fixed day is applied.

DueDateDays

Number of net days added from the baseline date to derive the due date.

DueDateMonthsForward

Number of months added after the net days to derive the due date.

DueDateFixed

Fixed day of the month for the due date. 0 means no fixed day is applied.

PaymentDaysFixedTerms

Pre-calculated approximate number of payment days, computed as DAYS_BETWEEN(MDBaselineDate, MDDueDate) using a configurable reference date.

TermsText

Human-readable description of the term, for example: "30 days net 1 month forward on day 15, baseline date 1 month forward on day 1".



How fixed payment terms are calculated

The due date for a fixed payment term is derived in two steps.

Step 1 -- Baseline date

The baseline date is computed from the document date (invoice date for Payable Items, or a configurable reference date for POs, Contracts, and Vendor Master Data):

  • If BaselineDateDayFixed = 0: the baseline date is the document date plus BaselineDateMonthsForward months.

  • If BaselineDateDayFixed ≠ 0: the baseline date is set to that fixed day of the month, in the month obtained by adding BaselineDateMonthsForward months to the document date. Month-end edge cases (e.g., day 31 in a 30-day month) are handled by capping the day to DAYS_IN_MONTH.

Step 2 - Due date

Starting from the baseline date:

  • Add DueDateDays net days, then add DueDateMonthsForward months.

  • If DueDateDayFixed ≠ 0: snap the result to that fixed day of the resulting month, again capping to DAYS_IN_MONTH.

  • If DueDateDayFixed = 0: the result of the previous step is the due date.

The final PaymentDaysFixedTerms value is DAYS_BETWEEN(baseline date, due date).

DateLimit and row selection

Because a single SAP payment term code can have multiple installment rows differentiated by the DateLimit field, the app must select the correct row when looking up a payment term.

  • For Payable Items, the actual document date is available. The app selects the row where DAY(DocumentDate) >= DateLimit, which mirrors the exact SAP logic.

  • For Purchase Documents, Contracts, and Vendor Master Data, no posting date is available to drive the row selection. The app uses a configurable parameter, reference_baseline_day_fixed_pt, as a stand-in for the day of the document. The lookup filter is: DateLimit = 0 OR DateLimit > reference_baseline_day_fixed_pt

    • This is an approximation: you are instructing the app to assume that documents generally fall on or after day reference_baseline_day_fixed_pt of the month (default: 15), so the app selects the corresponding SAP installment row. Adjust this value in the Setup and Validation view to match the typical posting pattern in your organization.

Reference date for pre-calculated payment days

The PaymentDaysFixedTerms field on MasterPaymentTerm is pre-calculated using a fixed reference date rather than a live document date, since POs and master data records do not carry an invoice date. This reference date is controlled by the parameter reference_baseline_date_md_fixed_pts (default: 2026-01-01). The resulting PaymentDaysFixedTerms value is an approximation of how many payment days the fixed term translates to, and is used when comparing fixed terms against standard rolling-day terms on the same scale.

How fixed payment terms feed into best payment days

PaymentDaysFixedTerms is included in the function that calculates BestPaymentDays across all objects:

Object

Formula

PurchaseDocument

GREATEST(PaymentDays1, PaymentDays2, PaymentDays3, PaymentDaysFixedTerms)

VendorMasterPurchasingOrg

GREATEST(VendorPaymentDays1, VendorPaymentDays2, VendorPaymentDays3, PaymentDaysFixedTerms)

VendorContract

GREATEST(PaymentDays1, PaymentDays2, PaymentDays3, PaymentDaysFixedTerms)

VendorInvoice

GREATEST(PaymentDays1, PaymentDays2, PaymentDays3, PaymentDaysFixedTerms)

PayableItem

GREATEST(PaymentDays1, PaymentDays2, PaymentDays3, PaymentDaysFixedTerms)

This means fixed-date terms contribute to the BestPaymentDays metric — and therefore to the WC Potential Benefit KPIs — in exactly the same way as standard net terms. Users see the impact through BestPaymentDays in all views; PaymentDaysFixedTerms and IsFixedTerm are not displayed as separate columns.