APBATCH – Batch
- System
- Accounts Payable (AP)
- Prefix
APB- Primary key
COMPANY,BATCH-NUM- Fields
- 15
- Updated by
- 33 programs
- Referenced by
- 3 programs
APBATCH is the Batch table in Lawson Accounts Payable (prefix APB). It is indexed by COMPANY, BATCH-NUM (APBSET1). It is related 1:1 to APCOMPANY and 1:M to APINVOICE and POMESSAGE. It is updated by AP125, AP126, AP170, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 and 25 more and referenced by AP00.4, AP220 and MA540. The table has 15 fields, 1 index and 4 documented relations.
About APBATCH
The Batch file contains unreleased invoice batches. This file is used only by companies that have the batch invoice entry option selected. A batch is a unique numeric value within a company for a group of unreleased invoices. Batch numbers are automatically assigned by the system or entered manually depending on the batch entry options selected for the company.
Fields (15)
Column = COBOL field name without the APB- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored.
| Field / column | Type | Description & values | Updated by |
|---|---|---|---|
APB-COMPANY PKCOMPANY | Numeric 4 | The company number. Must be a valid record in the Accounts Payable Company file. | AP170, AP25.1, AP25.2, API1.1, API2.1 |
APB-BATCH-NUM PKBATCH_NUM | Numeric 6 | The batch number. This number is system-assigned or user-assigned depending on the option selected for the company in the Auto Batch Numbering field. | AP170, AP25.1, AP25.2, API1.1, API2.1 |
APB-BATCH-DATEBATCH_DATE | Numeric 8 (yyyymmdd) | The system date the batch was created. | AP170, AP25.1, API1.1, API2.1 |
APB-DISTRIB-DATEDISTRIB_DATE | Numeric 8 (yyyymmdd) | The general ledger posting date assigned to the batch. Used to default a post date to all invoices entered for the batch. | AP170, AP25.1, API1.1, API2.1 |
APB-CTL-NET-TOTCTL_NET_TOT | Signed 18.2 | The control net total of all invoices, debit memos, and credit memos in the batch. | AP125, AP126, AP25.1, AP25.2, AP26.1, AP27.1, API1.1, API2.1 |
APB-CTL-NBR-INVCTL_NBR_INV | Numeric 15 | The control total number of invoices, debit memos, and credit memos in the batch. | AP125, AP126, AP25.1, AP25.2, AP26.1, AP27.1, API1.1, API2.1 |
APB-CTL-VEND-HASHCTL_VEND_HASH | Numeric 15 | The control total sum of all vendor numbers in the batch. Used with numeric vendor numbering only. | AP125, AP126, AP25.1, AP25.2, AP26.1, AP27.1, API1.1, API2.1 |
APB-ACT-INV-TOTACT_INV_TOT | Signed 18.2 | The actual net total of all invoices entered for the batch. | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.6 +23 more |
APB-ACT-DB-TOTACT_DB_TOT | Signed 18.2 | The actual net total of all debit memos entered for the batch. | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +20 more |
APB-ACT-CR-TOTACT_CR_TOT | Signed 18.2 | The actual net total of all credit memos entered for the batch. | AP125, AP126, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7 +20 more |
APB-ACT-NBR-INVACT_NBR_INV | Numeric 15 | The actual total number of invoices entered for the batch. | AP125, AP126, AP170, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +21 more |
APB-ACT-VEND-HASHACT_VEND_HASH | Numeric 15 | The actual total sum of vendor numbers entered for the batch. Used with numeric vendor numbering only. | AP125, AP126, AP170, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +24 more |
APB-INV-CURRENCYINV_CURRENCY | Alpha 5 | The currency code assigned to the batch. If assigned, the batch is restricted to invoices, debit memos, and credit memos with the currency selected. If left blank, invoice currency is not restricted for the batch. Must be a valid record in the Currency Code file. | AP25.1, API1.1, API2.1 |
APB-ORIGIN-CODEORIGIN_CODE | Alpha 2 | Indicates the system the batch was created in. Must be a valid record in the General Ledger Codes file. Valid values are:
| AP25.1, API1.1, API2.1 |
APB-ACT-NET-AMTACT_NET_AMT | Derived | The actual net amount of invoices, debit memos, and credit memos entered for the batch. | — |
Indexes (1)
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 |
|---|---|---|---|---|
APBSET1 | COMPANY, BATCH-NUM | Primary | AP00.4, AP125, AP126, AP170, AP20.1, AP20.2, AP20.3, AP20.4 +22 more (list truncated in source) |
Relations
One to one (1) — lookups and parents
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Apcompany | APCOMPANY | Required | APB-COMPANY → CPY-COMPANY |
One to many (3) — child tables
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Apibatch | APINVOICE | Delete Cascades | Zeroes → API-REC-STATUS, APB-COMPANY → API-COMPANY, APB-BATCH-NUM → API-BATCH-NUM, → API-AUTH-CODE, → API-OPERATOR, → API-CREATE-DATE, → API-CREATION-TIME, → API-VENDOR, → API-INVOICE, → API-SUFFIX, → API-CANCEL-SEQ | |
| Apinvoice | APINVOICE | Delete Cascades | Zeroes → API-REC-STATUS, APB-COMPANY → API-COMPANY, APB-BATCH-NUM → API-BATCH-NUM, → API-AUTH-CODE, → API-OPERATOR, → API-CREATE-DATE, → API-CREATION-TIME, → API-VENDOR, → API-INVOICE, → API-SUFFIX, → API-CANCEL-SEQ | |
| Pomessage | POMESSAGE | APB-COMPANY → POM-COMPANY, APB-BATCH-NUM → POM-BATCH-NBR, → POM-VENDOR, → POM-INVOICE, → POM-SUFFIX, → POM-PO-NUMBER, → POM-PO-RELEASE, → POM-LINE-NBR |
Programs
Updated by (33)
- AP125 Batch Release
- AP126 Mass Invoice Release
- AP170 Payment Closing
- AP20.1 Basic Invoice
- AP20.2 Taxed Invoice
- AP20.3 Detail Invoice
- AP20.4 Invoice Line Detail
- AP20.5 Multiple Invoice
- AP20.6 Prepayment
- AP20.7 Distributions
- AP21.1 View Distributions
- AP23.1 Transit Invoice Entry
- AP25.1 Batch Control
- AP25.2 Batch Review
- AP25.3 Invoice Batch Transfer
- AP26.1 Invoice Release
- AP27.1 Single Invoice Release
- AP305 Accounts Payable Company Purge
- AP520 Invoice Interface
- 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.1 Invoice Line Detail - Purchase Order
- MA43.2 Purchase Order Lookup
- MA44.1 Invoice Line Detail - Purchase Order
- MA44.2 Invoice Line Detail- Service
- MA61.1 Match Invoice Approval
- MA66.3 Purchase Order Cost Review Message
- MAI1.1 Invoke for MAMATCH Object