APCOMPANY – Accounts Payable Company

System
Accounts Payable (AP)
Prefix
CPY
Primary key
COMPANY
Fields
53
Updated by
31 programs
Referenced by
626 programs

APCOMPANY is the Accounts Payable Company table in Lawson Accounts Payable (prefix CPY). It is indexed by COMPANY (CPYSET1); alternate indexes: CPYSET2 and CPYSET3. It is related 1:1 to ADDRDATA, APVENGROUP, CUCODES, GLADDRESS, GLSYSTEM and MACOMPANY and 1:M to APAUDIT, APAUTHOR, APBATCH, APCINVOICE, APDISTCODE, APINVOICE, APMONITOR, APPAYMENT and 7 more. It is updated by AP00.4, AP00.6, AP101, AP175, AP198, AP20.1, AP20.2, AP20.3 and 23 more and referenced by AC03.4, AC03.7, AC145, AC160, AC17.4, AC18.3, AC191, AC203 and 618 more. The table has 53 fields, 3 indexes and 24 documented relations.

About APCOMPANY

The Accounts Payable Company file contains information for each Accounts Payable company. An accounts payable company must first exist as a valid company in the Lawson General Ledger system. The accounts payable company uses the name and base currency defined for the company in the General Ledger system.

Fields (53)

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

Field / columnTypeDescription & valuesUpdated by
CPY-COMPANY PK
COMPANY
Numeric 4The company number. Must be a valid company in General Ledger.AP00.4, API6.1
CPY-NAME
NAME
Alpha 30 (Lower Case)The company name or description. An Accounts Payable company uses the name defined for the company in General Ledger.AP00.4
CPY-DEFAULT-REF
DEFAULT_REF
Alpha 1The default reference value for the company. Used to default a value in the Reference field on distributions during invoice entry. Valid values are:
  • I Invoice.
  • P Purchase Order.
  • V Voucher.
AP00.4
CPY-VENDOR-GROUP
VENDOR_GROUP
Alpha 4The vendor group assigned to the company. Must be a valid record in the Vendor Group file.AP00.4, IC81.2, WH30.4, WH31.4, WH32.4, WH40.1, WH40.2
CPY-PAY-GROUP
PAY_GROUP
Alpha 4The pay group assigned to the company. A pay group is used for processing accounts payable payments. A pay group lets you create a single payment for a vendor to pay invoices received by all company process levels assigned to the pay group. Must be a valid record in the Pay Group file. The company must have the same base currency as the posting company assigned to the pay group.AP00.4, AP101
CPY-BATCH-OPTION
BATCH_OPTION
Alpha 1Indicates whether the company batch option to enter and releases invoices. If this field is No, the company must have Yes selected in the Invoice Approval field. If the company has Yes selected in both the Batch Release and Invoice Approval fields, the company assigns vouchers to invoices but still enters and releases invoices in batches. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-AUTO-BATCH
AUTO_BATCH
Alpha 1Indicates whether the system automatically assigns numbers to batches in AP25.1 (Batch Control). Used only if the company has Yes selected in the Batch Release Option field. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-BATCH-CONTROL
BATCH_CONTROL
Alpha 1Indicates whether the company uses batch control, which indicates whether entry totals must match control totals before a batch can be released. Used only if the company has Yes selected in the Batch Release Option field. Valid values are:
  • Y Yes.
  • N No.
AP00.4
CPY-LAST-BATCH
LAST_BATCH
Numeric 6The last batch number used by the company. Used only if the company has Yes selected in the Automatic Batch Numbering field.AP00.4, AP25.1
CPY-INV-APPROVAL
INV_APPROVAL
Alpha 1Indicates whether the company uses the invoice registration entry option (the assignment of an authority code and a voucher to an invoice). If this field is No, the company must have Yes selected in the Batch Release field. If the company has Yes selected in both the Invoice Approval and Batch Release fields, the company assigns vouchers to invoices but enters and releases invoices in batches. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-NUMERIC-VOUCH
NUMERIC_VOUCH
Alpha 1Indicates whether voucher values will be numeric. Used only if the company has Yes selected in the Invoice Approval field. Valid values are:
  • Y Yes.
  • N No.
AP00.4
CPY-DUP-VOUCHER
DUP_VOUCHER
Alpha 1Indicates whether duplicate voucher numbers are allowed within the company. Used only if the company has Yes selected in the Invoice Approval field. Valid values are:
  • Y Yes.
  • N No.
AP00.4
CPY-AUTO-VOUCHER
AUTO_VOUCHER
Alpha 1Indicates whether the system automatically assigns voucher numbers to invoices during entry. Used only if the company has Yes selected in both the Invoice Approval and the Numeric Voucher Numbering fields. Valid values are:
  • Y Yes.
  • N No.
AP00.4
CPY-LAST-VOUCHER
LAST_VOUCHER
Numeric 10The last voucher number assigned by the company. Used only if the company has Yes selected in both the Invoice Approval and Numeric Voucher Numbers fields. The system assigns voucher numbers beginning with the next sequential number. If left blank, the system assigns voucher numbers beginning with 1.AP00.4, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.6, AP20.7 +15 more
CPY-POST-OPTION
POST_OPTION
Alpha 1The posting option for the company. Determines the volume of invoice expense distribution information that AP175 (Invoice Distribution Closing) transfers to the general ledger. Valid values are:
  • S Summary.
  • D Detail.
AP00.4
CPY-INVOICE-AUDIT
INVOICE_AUDIT
Alpha 1Indicates whether the system creates audit records when released invoices are changed. Valid values are:
  • Y Yes.
  • N No.
AP00.4
CPY-ACCR-CODE
ACCR_CODE
Alpha 4The invoice accrual code assigned to the company. Represents the default general ledger accrual account for the company. A unique entry in this field creates a record in the Invoice Accrual Code file.AP00.4
CPY-CASH-CODE
CASH_CODE
Alpha 4The cash code assigned to the company. Represents a bank account. Must be a valid record in the Cash Code file. Valid relationship records must exist between the cash code and both the company and the posting company assigned to the company's pay group in the Company-Cash Code Relationship file. If left blank, the cash code assigned to the company's pay group defaults on invoices entered for the company.AP00.4
CPY-BASE-CURRENCY
BASE_CURRENCY
Alpha 5The base currency defined for the company in General Ledger.AP00.4
CPY-CURR-ND
CURR_ND
Numeric 1The number of decimal positions defined for the company base currency.AP00.4
CPY-ADV-EXP-OPT
ADV_EXP_OPT
Alpha 1Indicates how the Lawson Accounts Payable system processes employee advances and expenses entered in the Lawson Employee Advance and Expense system. If the company has the Open option selected, specific matching is not performed. All open items for the employee are considered during reconciliation. If the company has the Matching option selected, each open employee advance is matched to its corresponding open expense. Valid values are:
  • O Open.
  • M Matching.
AP00.4
CPY-PURGE-FL
PURGE_FL
Alpha 1Indicates the status of the company. Used to determine whether the company and associated data can be deleted from the Lawson Accounts Payable system by AP305 (AP Company Purge). Valid values are:
  • A Active.
  • D Delete.
AP00.4
CPY-DISCOUNT-CODE
DISCOUNT_CODE
Alpha 10The discount code assigned to the company. Represents a general ledger discount account. A unique entry in this field creates a record in the Discount Code file.AP00.4
CPY-INC-ACCR-CODE
INC_ACCR_CODE
Alpha 10The income withholding code assigned to the company. Represents the general ledger income withholding account for the company. Used to track reportable withholding for vendors. A unique entry in this field creates a record in the Income Withholding Code file.AP00.4
CPY-INC-WH-PCT
INC_WH_PCT
Signed 5.3The reportable income withholding rate for the company. The system applies this rate to payments for vendors marked for income withholding.AP00.4
CPY-OUT-BAL-FL
OUT_BAL_FL
Alpha 1Indicates whether out of balance invoices can be released. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-APPRVL-EXISTS
APPRVL_EXISTS
Alpha 1Indicates whether approval criteria is defined for the company. If Yes, an associated record exists for the company in the Invoice Approval file. Valid values are:
  • N No.
  • Y Yes.
AP00.6
CPY-DISC-TAX-RCV
DISC_TAX_RCV
Alpha 1If discounts are to be taken for the company exclusive of tax, this field indicates whether tax recovery is required when discounts are taken. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-WORKFLOW
WORKFLOW
Alpha 1Indicates whether the company uses Workflow. If Yes, invoices that meet or exceed approval criteria defined for the company are routed to a workflow system for approval. Valid values are:
  • N No.
  • Y Yes.
AP00.4
CPY-DISC-CALC-DATE
DISC_CALC_DATE
Alpha 1Indicates which date to use when calculating discounts. You can use the invoice date, receipt date, or the date the invoice was received. Valid values are:
  • I Invoice date
  • R Receipt date
  • D Receipt of invoice date
  • E Earliest Receipt Date
  • S Ship to Arrive Date
AP00.4
CPY-VOUCHER-REQ
VOUCHER_REQ
Alpha 1Indicates if a voucher is required. Valid values are:
  • N No
  • Y Yes
AP00.4
CPY-BEST-TERMS
BEST_TERMS
Alpha 1Indicates whether to recalculate the terms during matching.
  • N No
  • Y Yes
AP00.4
CPY-LAST-ARCH-DATE
LAST_ARCH_DATE
Numeric 8 (yyyymmdd)This field displays the system date when this was created.AP198
CPY-CREATE-TR-DIST
CREATE_TR_DIST
Alpha 1AP00.4
CPY-DIST-CODE
DIST_CODE
Alpha 9A user-defined code used to automatically create expense distributions or expense distribution "shells" for invoices or to split an invoice distribution into multiple distributions.AP00.4
CPY-WKFL-DST-ADJ
WKFL_DST_ADJ
Alpha 1
  • N No
  • Y Yes
AP00.4
CPY-FLOAT-DAYS
FLOAT_DAYS
Numeric 3THis is a number of days to add to best terms calculation if the vendor will allow a specific number of days for payment to reach them and still receive the discount.AP00.4
CPY-TAX-CODE
TAX_CODE
Alpha 10This field contains a code representing specific tax information. This must be valid Tax Code.AP00.4
CPY-TAX-ACCT-UNIT
TAX_ACCT_UNIT
Alpha 15The accounting unit is a shorthand notation representing the variable level number. When used in the General Ledger Account Master file, the accounting unit must be defined in the General Ledger Names file as a posting accounting unit.AP00.4
CPY-TAX-ACCOUNT
TAX_ACCOUNT
Numeric 6This field along with the accounting unit and subaccount make up the location (account) where amounts and other account information is stored.AP00.4
CPY-TAX-SUB-ACCT
TAX_SUB_ACCT
Numeric 4This field contains the subaccount from your general ledger chart of accounts that was charged with the amount carried on this record.AP00.4
CPY-TAX-TOL-AMT
TAX_TOL_AMT
Signed 18.2AP00.4
CPY-HOLD-CODE
HOLD_CODE
Alpha 4The hold code.AP00.4
CPY-PCARD-INVOICE
PCARD_INVOICE
Alpha 22Used to identify the invoice.PD130
CPY-RET-ACCR-CODE
RET_ACCR_CODE
Alpha 4AP00.4
CPY-VERTEX-INV-TAX
VERTEX_INV_TAX
Alpha 1
  • 1 Do not create Vertex for Inv
CPY-SETUP-AUD-FLAG
SETUP_AUD_FLAG
Alpha 1
  • Y Yes
  • N No
AP00.4
CPY-INV-FROM-DATE
INV_FROM_DATE
Numeric 8 (yyyymmdd)AP00.4
CPY-INV-TO-DATE
INV_TO_DATE
Numeric 8 (yyyymmdd)AP00.4
CPY-SEC-WITHHOLD
SEC_WITHHOLD
Alpha 1
  • Y Yes
  • N No
AP00.4
CPY-SEC-WTH-CODE1
SEC_WTH_CODE1
Alpha 10AP00.4
CPY-SEC-WTH-CODE2
SEC_WTH_CODE2
Alpha 10AP00.4
CPY-SEC-WTH-CODE3
SEC_WTH_CODE3
Alpha 10AP00.4

Indexes (3)

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

IndexKeysFlagsConditionUsed in
CPYSET1COMPANYPrimaryAC03.4, AC03.7, AC145, AC160, AC17.4, AC18.3, AC191, AC203 +22 more (list truncated in source)
CPYSET2VENDOR-GROUP, COMPANYKeyChangeAC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +22 more (list truncated in source)
CPYSET3PAY-GROUP, COMPANYKeyChangeAP141

Relations

One to one (6) — lookups and parents

RelationTableRulesConditionField map
AddrdataADDRDATANot RequiredGAD-ADDR-CODEGDD-ADDR-CODE
ApvengroupAPVENGROUPRequiredCPY-VENDOR-GROUPVGP-VENDOR-GROUP
CucodesCUCODESRequiredCPY-BASE-CURRENCYCUC-CURRENCY-CODE
GladdressGLADDRESSRequiredCPY-COMPANYGAD-COMPANY, SpacesGAD-ACCT-UNIT
GlsystemGLSYSTEMRequiredCPY-COMPANYGLS-COMPANY
MacompanyMACOMPANYNot RequiredCPY-COMPANYMAY-COMPANY

One to many (18) — child tables

RelationTableRulesConditionField map
ApauditAPAUDITCPY-VENDOR-GROUPAPA-VENDOR-GROUP, CPY-COMPANYAPA-COMPANY, APA-PROC-LEVEL, APA-VENDOR, APA-INVOICE, APA-SUFFIX, APA-CANCEL-SEQ, APA-SEQ-NBR, APA-TRANS-DATE, APA-TRANS-TIME, APA-LOCATION-CODE
ApauthorAPAUTHORCPY-COMPANYATR-COMPANY, ATR-AUTH-CODE
ApbatchAPBATCHCPY-COMPANYAPB-COMPANY, APB-BATCH-NUM
ApcinvoiceAPCINVOICECPY-COMPANYCVI-COMPANY, CVI-VENDOR, CVI-EDI-NBR, CVI-INVOICE, CVI-SUFFIX
ApdistcodeAPDISTCODECPY-COMPANYDTC-COMPANY, DTC-DIST-CODE, DTC-SEQ-NBR
ApinvoiceAPINVOICECPY-COMPANYAPI-COMPANY, API-VENDOR, API-INVOICE, API-SUFFIX, API-CANCEL-SEQ
ApmonitorAPMONITORCPY-COMPANYMON-COMPANY, MON-BATCH-NUM, MON-AUTH-CODE, MON-RUN-PROG, MON-PROC-LEVEL, MON-ADA-ACCT-STRCT, MON-PAY-GROUP, MON-PROC-GRP
AppaymentAPPAYMENTCPY-COMPANYAPP-COMPANY, APP-VENDOR, APP-INVOICE, APP-SUFFIX, APP-CANCEL-SEQ, APP-SEQ-NBR, APP-VOID-SEQ
ApproclevAPPROCLEVRequiredCPY-COMPANYAPR-COMPANY, APR-PROC-LEVEL
ApvcommentsAPCOMMENTSDelete Cascades"V"APC-REC-TYPE, CPY-COMPANYAPC-COMPANY, APC-VENDOR, APC-LOCATION-CODE, APC-SEQ-NBR
ApvenmastAPVENMASTRequiredCPY-VENDOR-GROUPVEN-VENDOR-GROUP, VEN-VENDOR
CbcheckCBCHECKCPY-PAY-GROUPCHK-PAY-GROUP, CHK-REC-STATUS, CHK-CASH-CODE, CHK-BANK-INST-CODE, CHK-TRANS-NBR, CHK-TRANS-IDENT
CbcpycashCBCPYCASHCPY-COMPANYCBY-COMPANY, CBY-CASH-CODE
Company AuditAPCOMPAUDCPY-COMPANYCAP-COMPANY, CAP-ACTION, CAP-DATE, CAP-TIME, CAP-UNIQUE-I-D
Draft AcceptedAPDRAFTSCPY-PAY-GROUPAPT-PAY-GROUP, 2APT-REC-STATUS, APT-DRAFT-DATE, APT-BANK-INST-CODE, APT-DRAFT-NBR, APT-SUFFIX, APT-TRANS-IDENT
Draft UnacceptAPDRAFTSCPY-PAY-GROUPAPT-PAY-GROUP, 1APT-REC-STATUS, APT-DRAFT-DATE, APT-BANK-INST-CODE, APT-DRAFT-NBR, APT-SUFFIX, APT-TRANS-IDENT
Draft UnrelAPDRAFTSCPY-PAY-GROUPAPT-PAY-GROUP, ZeroesAPT-REC-STATUS, APT-DRAFT-DATE, APT-BANK-INST-CODE, APT-DRAFT-NBR, APT-SUFFIX, APT-TRANS-IDENT
Open PaymentsAPPAYMENTCPY-COMPANYAPP-COMPANY, APP-VENDOR, APP-INVOICE, APP-SUFFIX, APP-CANCEL-SEQ, APP-SEQ-NBR, APP-VOID-SEQ

Programs

Updated by (31)

Referenced by (626)