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. PK = primary key (present in every index); SETn = leading/alternate key of that index.

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 4—AP125, 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 SET3 SET4
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 SET3 SET4
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 SET3 SET4
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 SET4
VEN_AGRMT_REF
Alpha 30—AP125, 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 SET4
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 are listed in index order; ↓ marks a descending key. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
DTYSET1
  1. COMPANY
  2. VENDOR
  3. INVOICE
  4. SUFFIX
  5. PMT-SEQ-NBR
  6. LINE-NBR
  7. MAD-SEQ-NBR
  8. DIST-SEQ-NBR
PrimaryAP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +22 more (list truncated in source)
DTYSET2
  1. COMPANY
  2. VENDOR
  3. INVOICE
  4. SUFFIX
  5. DIST-SEQ-NBR
  6. LINE-NBR
  7. MAD-SEQ-NBR
  8. PMT-SEQ-NBR
MA70.1, MA75.1
DTYSET3
  1. COMPANY
  2. PO-NUMBER
  3. PO-RELEASE
  4. PO-CODE
  5. LINE-NBR
  6. MAD-SEQ-NBR
  7. VENDOR
  8. INVOICE
  9. SUFFIX
  10. PMT-SEQ-NBR
  11. DIST-SEQ-NBR
AP233, AP97.1, AP97.2, AP97.3
DTYSET4
  1. VENDOR
  2. VEN-AGRMT-REF
  3. PVN-OBJ-ID
  4. COMPANY
  5. PO-NUMBER
  6. PO-RELEASE
  7. PO-CODE
  8. INVOICE
  9. SUFFIX
  10. PMT-SEQ-NBR
  11. LINE-NBR
  12. MAD-SEQ-NBR
  13. DIST-SEQ-NBR
AP133, AP233, AP97.1, AP97.5

Relations

Relationship map — 1:1 lookups/parents on the left, 1:M children on the right (up to 14 each)
APDISTRIBAPINVOICEAPPAYMENTMAINVDTLPOCOMPANYPOLINEPOVAGRMTHDPOVAGRMTLNPURCHORDERMAAOCDTLAPDISTPAY

One to one (9) — lookups and parents

RelationTableRulesConditionField map
ApdistribAPDISTRIBRequired
DTY-API-OBJ-ID→APD-API-OBJ-ID
DTY-DIST-SEQ-NBR→APD-DIST-SEQ-NBR
ApinvoiceAPINVOICERequired
DTY-COMPANY→API-COMPANY
DTY-VENDOR→API-VENDOR
DTY-INVOICE→API-INVOICE
DTY-SUFFIX→API-SUFFIX
Zeroes→API-CANCEL-SEQ
AppaymentAPPAYMENTRequired
DTY-COMPANY→APP-COMPANY
DTY-VENDOR→APP-VENDOR
DTY-INVOICE→APP-INVOICE
DTY-SUFFIX→APP-SUFFIX
Zeroes→APP-CANCEL-SEQ
DTY-PMT-SEQ-NBR→APP-SEQ-NBR
Zeroes→APP-VOID-SEQ
MainvdtlMAINVDTLRequired
DTY-COMPANY→MAD-COMPANY
DTY-VENDOR→MAD-VENDOR
DTY-INVOICE→MAD-INVOICE
DTY-SUFFIX→MAD-SUFFIX
DTY-PO-NUMBER→MAD-PO-NUMBER
DTY-PO-RELEASE→MAD-PO-RELEASE
DTY-PO-CODE→MAD-PO-CODE
DTY-LINE-NBR→MAD-LINE-NBR
DTY-MAD-SEQ-NBR→MAD-SEQ-NBR
PocompanyPOCOMPANYRequired
DTY-COMPANY→PCY-COMPANY
PolinePOLINERequired
DTY-COMPANY→PLI-COMPANY
DTY-PO-NUMBER→PLI-PO-NUMBER
DTY-PO-RELEASE→PLI-PO-RELEASE
DTY-PO-CODE→PLI-PO-CODE
DTY-LINE-NBR→PLI-LINE-NBR
PovagrmthPOVAGRMTHDRequired
PCY-PROCURE-GROUP→PVH-PROCURE-GROUP
DTY-VEN-AGRMT-REF→PVH-VENDOR
DTY-PO-NUMBER→PVH-PO-NUMBER
PovagrmtlnPOVAGRMTLNRequired
DTY-PVN-OBJ-ID→PVN-PVN-OBJ-ID
PurchorderPURCHORDERRequired
DTY-COMPANY→PCR-COMPANY
DTY-PO-CODE→PCR-PO-CODE
DTY-PO-NUMBER→PCR-PO-NUMBER
DTY-PO-RELEASE→PCR-PO-RELEASE

One to many (1) — child tables

RelationTableRulesConditionField map
MaaocdtlMAAOCDTL
DTY-COMPANY→MAA-COMPANY
DTY-VENDOR→MAA-VENDOR
DTY-INVOICE→MAA-INVOICE
DTY-SUFFIX→MAA-SUFFIX
DTY-PO-NUMBER→MAA-PO-NUMBER
DTY-PO-RELEASE→MAA-PO-RELEASE
DTY-PO-CODE→MAA-PO-CODE
DTY-LINE-NBR→MAA-LINE-NBR
—→MAA-AOC-CODE
—→MAA-SEQ-NBR

Programs

Updated by (33)

Referenced by (4)