APAUDIT – Vendor Invoice Audit

System
Accounts Payable (AP)
Prefix
APA
Primary key
VENDOR-GROUP, COMPANY, PROC-LEVEL, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, TRANS-DATE, TRANS-TIME, LOCATION-CODE
Fields
20
Updated by
315 programs
Referenced by
3 programs

APAUDIT is the Vendor Invoice Audit table in Lawson Accounts Payable (prefix APA). It is indexed by VENDOR-GROUP, COMPANY, PROC-LEVEL, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, TRANS-DATE, TRANS-TIME, LOCATION-CODE (APASET1); alternate indexes: APASET2 and APASET3. It is related 1:1 to APCOMPANY, APDICT, APPROCLEV, APVENCLASS, APVENGROUP, APVENLOC and APVENMAST. It is updated by AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 and 307 more and referenced by AP98.1, AP98.2 and AP98.3. The table has 20 fields, 3 indexes and 7 documented relations.

About APAUDIT

The Vendor-Invoice Audit file contains audit records for additions, changes, deletions, and cancellations for vendor and invoice records. Changes to vendors are recorded for vendor groups that audit vendor changes. Changes to released invoices are recorded for companies that audit invoice changes.

Fields (20)

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

Field / columnTypeDescription & valuesUpdated by
APA-VENDOR-GROUP PK
VENDOR_GROUP
Alpha 4If the audit record is for a vendor, this field contains the vendor group assigned to the vendor. Must be a valid record in the Vendor Group file.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-COMPANY PK
COMPANY
Numeric 4If the audit record is for an invoice, this field contains the company number assigned to the invoice. Must be a valid record in the Accounts Payable Company file.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-PROC-LEVEL PK
PROC_LEVEL
Alpha 5The process level associated with the invoice audit record. Must be a valid record in the Accounts Payable Process Level file.AP110, AP141, AP30.1, AP30.2, AP30.3, AP30.4, AP40.1, AP40.2 +3 more
APA-VENDOR PK
VENDOR
Alpha 9 (Right Justified)The vendor number associated with the audit record. Must be a valid record in the Vendor file.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-INVOICE PK
INVOICE
Alpha 22The invoice number associated with the invoice audit record.AP141, AP30.1, AP30.2, AP30.3, AP30.4, AP40.1, AP40.2, AP45.1 +2 more
APA-SUFFIX PK
SUFFIX
Numeric 3The invoice suffix number associated with the invoice audit record. A suffix number is assigned by the system to recurring invoices or system-generated credit memos.AP141, AP30.1, AP30.2, AP30.3, AP30.4, AP40.1, AP40.2, AP45.1 +2 more
APA-CANCEL-SEQ PK
CANCEL_SEQ
Numeric 4The sequence number assigned upon a cancellation of a distributed invoice. The first sequence assigned is 9999.AP141, AP30.1, AP30.2, AP30.3, AP30.4, AP40.1, AP40.2, AP45.1 +2 more
APA-SEQ-NBR PK
SEQ_NBR
Numeric 4The invoice payment sequence number.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-TRANS-DATE PK
TRANS_DATE
Numeric 8 (yyyymmdd)The date the audit record was created.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-TRANS-TIME PK
TRANS_TIME
Numeric 6 (hhmmss)The system time the audit record was created.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-REC-TYPE
REC_TYPE
Alpha 1Indicates the type of audit record. Valid values are:
  • I Invoice Audit Record.
  • V Vendor Audit Record.
AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-VENDOR-SNAME
VENDOR_SNAME
Alpha 30The search name defined for the vendor in the Vendor file at the time the audit record was created.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-VEN-CLASS
VEN_CLASS
Alpha 3The vendor class the vendor was assigned to at the time the audit record was created. Must be a valid record in the Vendor Class file.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-LOCATION-CODE PK
LOCATION_CODE
Alpha 4The alternate vendor location code associated with the audit record. Must be a valid record in the Vendor Location file.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-OPERATOR
OPERATOR
Alpha 10The operator associated with the invoice audit record.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-FIELD-ID
FIELD_ID
Numeric 3The value for this field comes from a table in working storage. Indicates the vendor or invoice field that was changed. 084 085 086 087 088 089 092 093 094 105 106 528 529 530 600 601 602 603 604 605 606 607 608 609 610 611 612 613 621 622 623 624 700 701 702 703 704 705 706 707 708 709 710 711 712 715 716 717 718 719 720 721 722
  • 001 Vendor Class
  • 002 Vendor Name
  • 003 Vendor Search Name
  • 004 Vendor Contact
  • 005 Address 1
  • 006 Address 2
  • 007 Address 3
  • 008 Address 4
  • 009 City/Address 5
  • 010 State/Province
  • 011 Postal Code
  • 012 Country
  • 013 Normal Remit-To Flag
  • 014 Normal Purchase-From Flag
  • 015 Pay Vendor
  • 016 Vendor Status
  • 017 Vendor Priority
  • 018 Phone Prefix
  • 019 Phone Number
  • 020 Phone Extension
  • 021 FAX Prefix
  • 022 FAX Number
  • 023 FAX Extension
  • 024 Telex Number
  • 025 Terms Code
  • 026 Invoice Currency
  • 027 Balance Currency
  • 028 Tax Code
  • 029 Hold Code
  • 030 Distribution Code
  • 031 Accrual Code
  • 032 Payment Type
  • 033 Bank Code
  • 034 Bank Identification Number
  • 035 Bank Account Number
  • 036 Bank Account Type
  • 037 Income Code
  • 038 Tax Identification Number
  • 039 Income Withholding Flag
  • 040 EDI Prefix
  • 041 EDI Number
  • 042 Vendor Legal Name
  • 044 ACH Prenotification Flag
  • 045 Maximum Invoice Amount
  • 046 Origin Date
  • 047 Operator
  • 048 User Field 1
  • 049 User Field 2
  • 050 User Field 3
  • 051 User Field 4
  • 052 User Field 5
  • 053 User Field 6
  • 054 Currency Recalculation Flag
  • 055 Region
  • 056 Country Code
  • 090 Vendor Added
  • 091 Vendor Location Added
  • 098 One-Time Vendor Added
  • 099 Vendor Location Deleted
  • 100 Location Type
  • 101 Normal Remit-To Flag
  • 102 Normal Purchase-From Flag
  • 103 Remit-To Code
  • 395 Print Account Flag
  • 501 Invoice Canceled
  • 502 Process Level
  • 503 Accrual Code
  • 504 Voucher Number
  • 505 Pay To Vendor
  • 506 Purchase Order
  • 507 Remit To Code
  • 510 Invoice Description
  • 511 Invoice Amount
  • 512 Base Invoice Amount
  • 513 Discount Amount
  • 514 Base Discount Amount
  • 515 Tax Amount
  • 519 Bank Code
  • 520 Hold Code
  • 521 Income Code
  • 522 Payment Group
  • 523 Pay Immediately Flag
  • 524 Separate Payment Flag
  • 525 Enclosure Flag
  • 526 Number of Recurring Payments
  • 527 Recurring Frequency
  • 104 Diversity Code
  • 057 Activity
  • 058 Account Category
  • 059 Invoice Group
  • 060 Handling Code
  • 063 Anticipation Rate
  • 064 Separate Payment Flag
  • 065 ERS Capable Flag
  • 066 ERS Invoice Reference
  • 068 EDI Invoice Automatic Release
  • 070 Customer Group
  • 071 Customer
  • 072 SWIFT Identification Number
  • 073 SWIFT Identification Number
  • 074 Normal or Express Code
  • 075 Payment Form
  • 076 Charge Code
  • 077 Cash Code
  • 078 Enclosure
  • 079 Match Ref Processing
  • 080 Match Table
  • 081 Terms Calculation
  • 082 Auto Chargeback Hold
  • 083 Rule Group
AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-BEFORE-IMAGE
BEFORE_IMAGE
Alpha 32The image of the field before the change.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-AFTER-IMAGE
AFTER_IMAGE
Alpha 32The image of the field after the change.AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +52 more (list truncated in source)
APA-PRT-STATUS
PRT_STATUS
Numeric 1This field is not currently used.
APA-FIELD-DESC
FIELD_DESC
Derived

Indexes (3)

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

IndexKeysFlagsConditionUsed in
APASET1VENDOR-GROUP, COMPANY, PROC-LEVEL, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, TRANS-DATE, TRANS-TIME, LOCATION-CODEPrimary, KeyChangeAC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +22 more (list truncated in source)
APASET2VENDOR-GROUP, VENDOR, LOCATION-CODE, TRANS-DATE, TRANS-TIME, SEQ-NBRKeyChange, SubsetWhere REC-TYPE = "V"AP03.1, AP03.2, AP10.1, AP10.3, AP10.5, AP10.6, AP10.7, AP10.9 +18 more
APASET3COMPANY, PROC-LEVEL, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, TRANS-DATE, TRANS-TIME, SEQ-NBRKeyChange, SubsetWhere REC-TYPE = "I"AP135, AP141, AP30.1, AP30.2, AP30.3, AP30.4, AP40.1, AP45.1 +3 more

Relations

One to one (7) — lookups and parents

RelationTableRulesConditionField map
ApcompanyAPCOMPANYRequiredWhen APA-REC-TYPE = "I"APA-COMPANYCPY-COMPANY
ApdictAPDICTRequiredAPA-FIELD-IDDCT-FLD-NBR
ApproclevAPPROCLEVRequiredWhen APA-REC-TYPE = "I"APA-COMPANYAPR-COMPANY, APA-PROC-LEVELAPR-PROC-LEVEL
ApvenclassAPVENCLASSNot RequiredAPA-VENDOR-GROUPVCL-VENDOR-GROUP, APA-VEN-CLASSVCL-VEN-CLASS
ApvengroupAPVENGROUPRequiredWhen APA-REC-TYPE = "V"APA-VENDOR-GROUPVGP-VENDOR-GROUP
ApvenlocAPVENLOCRequiredWhen APA-REC-TYPE = "V"APA-VENDOR-GROUPVLO-VENDOR-GROUP, APA-VENDORVLO-VENDOR, APA-LOCATION-CODEVLO-LOCATION-CODE
ApvenmastAPVENMASTRequiredAPA-VENDOR-GROUPVEN-VENDOR-GROUP, APA-VENDORVEN-VENDOR

Programs

Updated by (315)

Referenced by (3)