APDISTPAY – For invoices with retainage, it is required to track what has been paid against a vendor agreement or purchase order…

System
Accounts Payable (AP)
Prefix
DTY
Primary key
COMPANY, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, DIST-SEQ-NBR
Fields
17
Updated by
33 programs
Referenced by
4 programs

APDISTPAY is the For invoices with retainage, it is required to track what has been paid against a vendor agreement or purchase order… table in Lawson Accounts Payable (prefix DTY). It is indexed by COMPANY, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, DIST-SEQ-NBR (DTYSET1); alternate indexes: DTYSET2, DTYSET3 and DTYSET4. It is related 1:1 to APDISTRIB, APINVOICE, APPAYMENT, MAINVDTL, POCOMPANY, POLINE, POVAGRMTHD, POVAGRMTLN and 1 more and 1:M to MAAOCDTL. It is updated by AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 and 25 more and referenced by AP97.1, AP97.2, AP97.3 and AP97.5. The table has 17 fields, 4 indexes and 10 documented relations.

About APDISTPAY

For invoices with retainage, it is required to track what has been paid against a vendor agreement or purchase order line and thier distributiosn. The APDISTPAY file is used to link payment records for retainage invoices to the invoice distributions and purchase order or vendor agreement lines.

Fields (17)

Column = COBOL field name without the DTY- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored.

Field / columnTypeDescription & valuesUpdated by
DTY-COMPANY PK
COMPANY
Numeric 4Identifies the AP company if the resource type = V. Identifies the HR company if the resource type = E. It is blank for type A, P or Q resources.AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +20 more
DTY-VENDOR PK
VENDOR
Alpha 9 (Right Justified)The vendor's identification code.AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +20 more
DTY-INVOICE PK
INVOICE
Alpha 22Used to identify the invoice.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-SUFFIX PK
SUFFIX
Numeric 3This is the suffix for the invoice.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +21 more
DTY-PMT-SEQ-NBR PK
PMT_SEQ_NBR
Numeric 4AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more
DTY-API-OBJ-ID
API_OBJ_ID
Numeric 12System assigned number for the invoice. Used to tie invoice to distribution records.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +21 more
DTY-DIST-SEQ-NBR PK
DIST_SEQ_NBR
Numeric 6A unique sequence number. Used to tie the APDISTPAY record to the related distribution in APDISTRIB.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +21 more
DTY-PMT-AMOUNT
PMT_AMOUNT
Signed 18.2The amount being paid against this record.AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more
DTY-PO-NUMBER
PO_NUMBER
Alpha 14 (Right Justified)This field contains the number representing the purchase order.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-PO-RELEASE
PO_RELEASE
Numeric 4Used to identify a purchase order release (created from a Blanket or Standing order).AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-PO-CODE
PO_CODE
Alpha 4This is the purchase order code.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-LINE-NBR PK
LINE_NBR
Numeric 6This field contains the line number.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-MAD-SEQ-NBR PK
MAD_SEQ_NBR
Numeric 4System assigned sequence number to keep MAINVDTL records uniqueAP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-VEN-AGRMT-REF
VEN_AGRMT_REF
Alpha 30AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-RET-CALC-AMT
RET_CALC_AMT
Signed 18.2If record is for retainage, this is the amount used to calculate the retainage payment amount (in PMT-AMOUNT field). This is similar to a taxable amount.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more
DTY-RET-PCT
RET_PCT
Percent 5.2 (Percent)This is the percent of retainage that this record represents. It is used in calculating the PMT-AMOUNT from the RET-CALC-AMT.AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more
DTY-PVN-OBJ-ID
PVN_OBJ_ID
Numeric 12This is the object identifier. It is used to relate commitments or posted transactions back to the originating subsystems. Each subsystem record that is updated as a commitment or posted transaction is assigned an object identifier. The object identifier is maintained in the subsystem files and in the Activity Commitments Detail and Activity Transaction files. The object identifier is a unique key used to drill back from Activity Management to the subsystems.AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more

Indexes (4)

Keys marked * are descending. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
DTYSET1COMPANY, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, DIST-SEQ-NBRPrimaryAP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +22 more (list truncated in source)
DTYSET2COMPANY, VENDOR, INVOICE, SUFFIX, DIST-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, PMT-SEQ-NBRMA70.1, MA75.1
DTYSET3COMPANY, PO-NUMBER, PO-RELEASE, PO-CODE, LINE-NBR, MAD-SEQ-NBR, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, DIST-SEQ-NBRAP233, AP97.1, AP97.2, AP97.3
DTYSET4VENDOR, VEN-AGRMT-REF, PVN-OBJ-ID, COMPANY, PO-NUMBER, PO-RELEASE, PO-CODE, INVOICE, SUFFIX, PMT-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, DIST-SEQ-NBRAP133, AP233, AP97.1, AP97.5

Relations

One to one (9) — lookups and parents

RelationTableRulesConditionField map
ApdistribAPDISTRIBRequiredDTY-API-OBJ-IDAPD-API-OBJ-ID, DTY-DIST-SEQ-NBRAPD-DIST-SEQ-NBR
ApinvoiceAPINVOICERequiredDTY-COMPANYAPI-COMPANY, DTY-VENDORAPI-VENDOR, DTY-INVOICEAPI-INVOICE, DTY-SUFFIXAPI-SUFFIX, ZeroesAPI-CANCEL-SEQ
AppaymentAPPAYMENTRequiredDTY-COMPANYAPP-COMPANY, DTY-VENDORAPP-VENDOR, DTY-INVOICEAPP-INVOICE, DTY-SUFFIXAPP-SUFFIX, ZeroesAPP-CANCEL-SEQ, DTY-PMT-SEQ-NBRAPP-SEQ-NBR, ZeroesAPP-VOID-SEQ
MainvdtlMAINVDTLRequiredDTY-COMPANYMAD-COMPANY, DTY-VENDORMAD-VENDOR, DTY-INVOICEMAD-INVOICE, DTY-SUFFIXMAD-SUFFIX, DTY-PO-NUMBERMAD-PO-NUMBER, DTY-PO-RELEASEMAD-PO-RELEASE, DTY-PO-CODEMAD-PO-CODE, DTY-LINE-NBRMAD-LINE-NBR, DTY-MAD-SEQ-NBRMAD-SEQ-NBR
PocompanyPOCOMPANYRequiredDTY-COMPANYPCY-COMPANY
PolinePOLINERequiredDTY-COMPANYPLI-COMPANY, DTY-PO-NUMBERPLI-PO-NUMBER, DTY-PO-RELEASEPLI-PO-RELEASE, DTY-PO-CODEPLI-PO-CODE, DTY-LINE-NBRPLI-LINE-NBR
PovagrmthPOVAGRMTHDRequiredPCY-PROCURE-GROUPPVH-PROCURE-GROUP, DTY-VEN-AGRMT-REFPVH-VENDOR, DTY-PO-NUMBERPVH-PO-NUMBER
PovagrmtlnPOVAGRMTLNRequiredDTY-PVN-OBJ-IDPVN-PVN-OBJ-ID
PurchorderPURCHORDERRequiredDTY-COMPANYPCR-COMPANY, DTY-PO-CODEPCR-PO-CODE, DTY-PO-NUMBERPCR-PO-NUMBER, DTY-PO-RELEASEPCR-PO-RELEASE

One to many (1) — child tables

RelationTableRulesConditionField map
MaaocdtlMAAOCDTLDTY-COMPANYMAA-COMPANY, DTY-VENDORMAA-VENDOR, DTY-INVOICEMAA-INVOICE, DTY-SUFFIXMAA-SUFFIX, DTY-PO-NUMBERMAA-PO-NUMBER, DTY-PO-RELEASEMAA-PO-RELEASE, DTY-PO-CODEMAA-PO-CODE, DTY-LINE-NBRMAA-LINE-NBR, MAA-AOC-CODE, MAA-SEQ-NBR

Programs

Updated by (33)

Referenced by (4)