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 / column | Type | Description & values | Updated by |
|---|---|---|---|
DTY-COMPANY PKCOMPANY | Numeric 4 | Identifies 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 PKVENDOR | 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 PKINVOICE | Alpha 22 | Used to identify the invoice. | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more |
DTY-SUFFIX PKSUFFIX | Numeric 3 | This 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 PKPMT_SEQ_NBR | Numeric 4 | — | AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more |
DTY-API-OBJ-IDAPI_OBJ_ID | Numeric 12 | System 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 PKDIST_SEQ_NBR | Numeric 6 | A 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-AMOUNTPMT_AMOUNT | Signed 18.2 | The amount being paid against this record. | AP125, AP126, AP133, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more |
DTY-PO-NUMBERPO_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-RELEASEPO_RELEASE | Numeric 4 | Used 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-CODEPO_CODE | Alpha 4 | This is the purchase order code. | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more |
DTY-LINE-NBR PKLINE_NBR | Numeric 6 | This 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 PKMAD_SEQ_NBR | Numeric 4 | System assigned sequence number to keep MAINVDTL records unique | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more |
DTY-VEN-AGRMT-REFVEN_AGRMT_REF | Alpha 30 | — | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +19 more |
DTY-RET-CALC-AMTRET_CALC_AMT | Signed 18.2 | If 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-PCTRET_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-IDPVN_OBJ_ID | Numeric 12 | This 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.
| Index | Keys | Flags | Condition | Used in |
|---|---|---|---|---|
DTYSET1 | COMPANY, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, DIST-SEQ-NBR | Primary | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +22 more (list truncated in source) | |
DTYSET2 | COMPANY, VENDOR, INVOICE, SUFFIX, DIST-SEQ-NBR, LINE-NBR, MAD-SEQ-NBR, PMT-SEQ-NBR | MA70.1, MA75.1 | ||
DTYSET3 | COMPANY, PO-NUMBER, PO-RELEASE, PO-CODE, LINE-NBR, MAD-SEQ-NBR, VENDOR, INVOICE, SUFFIX, PMT-SEQ-NBR, DIST-SEQ-NBR | AP233, AP97.1, AP97.2, AP97.3 | ||
DTYSET4 | VENDOR, 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-NBR | AP133, AP233, AP97.1, AP97.5 |
Relations
One to one (9) — lookups and parents
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Apdistrib | APDISTRIB | Required | DTY-API-OBJ-ID → APD-API-OBJ-ID, DTY-DIST-SEQ-NBR → APD-DIST-SEQ-NBR | |
| Apinvoice | APINVOICE | Required | DTY-COMPANY → API-COMPANY, DTY-VENDOR → API-VENDOR, DTY-INVOICE → API-INVOICE, DTY-SUFFIX → API-SUFFIX, Zeroes → API-CANCEL-SEQ | |
| Appayment | APPAYMENT | Required | 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 | |
| Mainvdtl | MAINVDTL | Required | 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 | |
| Pocompany | POCOMPANY | Required | DTY-COMPANY → PCY-COMPANY | |
| Poline | POLINE | Required | 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 | |
| Povagrmth | POVAGRMTHD | Required | PCY-PROCURE-GROUP → PVH-PROCURE-GROUP, DTY-VEN-AGRMT-REF → PVH-VENDOR, DTY-PO-NUMBER → PVH-PO-NUMBER | |
| Povagrmtln | POVAGRMTLN | Required | DTY-PVN-OBJ-ID → PVN-PVN-OBJ-ID | |
| Purchorder | PURCHORDER | Required | 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
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Maaocdtl | MAAOCDTL | 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)
- AP125 Batch Release
- AP126 Mass Invoice Release
- AP133 Mass Retainage Payment Adjust
- AP20.1 Basic Invoice
- AP20.2 Taxed Invoice
- AP20.3 Detail Invoice
- AP20.4 Invoice Line Detail
- AP20.5 Multiple Invoice
- AP20.7 Distributions
- AP21.1 View Distributions
- AP23.1 Transit Invoice Entry
- AP233 Retainage Invoice Listing
- AP25.1 Batch Control
- AP25.2 Batch Review
- AP26.1 Invoice Release
- AP27.1 Single Invoice Release
- AP300 Invoice and Vendor History Purge
- AP33.1 Retainage Payment Adjustment
- API1.1 Add Invoice
- API2.1 Add Invoice
- MA41.1 Add-On Cost Detail - Purchase Order
- MA41.2 Add On Cost Lookup
- MA41.4 Miscellaneous Add-On Cost
- MA41.7 AOC Approval Entry
- MA42.2 Memo Line AOC Detail
- MA43.2 Purchase Order Lookup
- MA44.1 Invoice Line Detail - Purchase Order
- MA44.2 Invoice Line Detail- Service
- MA61.1 Match Invoice Approval
- MA66.2 Invoice Message - Details
- MA70.1 Invoice Unmatch
- MA75.1 PO Invoice Cancel
- MAI1.1 Invoke for MAMATCH Object