APAPPHIST – AP Payment History

System
Accounts Payable (AP)
Prefix
AH3
Primary key
COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ
Fields
89
Updated by
12 programs
Referenced by
13 programs

APAPPHIST is the AP Payment History table in Lawson Accounts Payable (prefix AH3). It is indexed by COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ (AH3SET1); alternate indexes: AH3SET10, AH3SET2, AH3SET6 and AH3SET8. It is related 1:1 to APAPIHIST, APCOMPANY, APDRAFTS, APVENMAST, CBBANKINST, CBCASHCODE, CBCASHFORM, CBCHECK and 1 more and 1:M to APAPPHIST, APDISTPAY, APDSKHIST and APHLDINV. It is updated by AP115, AP180, AP181, AP190, AP198, AP265, AP270, AP28.1 and 4 more and referenced by AP00.5, AP136, AP145, AP146, AP197, AP232, AP245, AP246 and 5 more. The table has 89 fields, 5 indexes and 14 documented relations.

About APAPPHIST

No description in the Lawson data dictionary.

Fields (89)

Column = COBOL field name without the AH3- 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
#AH3-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.AP198
#AH3-VENDOR PK
VENDOR
Alpha 9 (Right Justified)The vendor's identification code.AP115, AP198
#AH3-INVOICE PK
INVOICE
Alpha 22Used to identify the invoice.AP115, AP198
#AH3-SUFFIX PK
SUFFIX
Numeric 3This is the suffix for the invoice.AP198
#AH3-CANCEL-SEQ PK
CANCEL_SEQ
Numeric 4An automatically assigned sequence number.AP198
#AH3-SEQ-NBR PK
SEQ_NBR
Numeric 4An automatically assigned sequence number.AP198
#AH3-VOID-SEQ PK
VOID_SEQ
Numeric 4An automatically assigned sequence number.AP198
#AH3-VOID-DATE
VOID_DATE
Numeric 8 (yyyymmdd)This field displays the system date when this was created.AP198
#AH3-INV-CURRENCY
INV_CURRENCY
Alpha 5—AP198
#AH3-PAY-VENDOR
PAY_VENDOR
Alpha 9 (Right Justified)The vendor's identification code.AP115, AP198
#AH3-REMIT-TO-CODE
REMIT_TO_CODE
Alpha 4A user-defined code that represents a vendor's remittance address.AP115, AP198
#AH3-PAY-COMPANY
PAY_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.AP198
#AH3-CASH-CODE SET8
CASH_CODE
Alpha 4A cash code represents a bank account. More than one company can use the same cash code. The cash code must be linked to a bank in the Lawson Cash Ledger system.AP115, AP198
#AH3-DUE-DATE
DUE_DATE
Numeric 8 (yyyymmdd)The transaction due date.AP198
#AH3-ENCLOSURE
ENCLOSURE
Alpha 1—AP198
#AH3-HOLD-FLAG
HOLD_FLAG
Alpha 1This field enables this entire lot to be put on hold, not allowing any issues or transfers to be made for this lot.AP198
#AH3-VEN-CLASS
VEN_CLASS
Alpha 3A user-defined code representing a subset of vendors within a vendor group.AP115, AP198
#AH3-VEN-PRIORITY
VEN_PRIORITY
Numeric 2The payment priority of a vendor, where lowest.
  • 1 the highest priority and 99 = the
AP115, AP198
#AH3-PROC-GRP
PROC_GRP
Alpha 4 (Lower Case)A process group is an identifier used for separating vendors into different groups to enable concurrent processing within the cash payment cycle.AP115, AP198
#AH3-BASE-PMT-AMT
BASE_PMT_AMT
Signed 18.2—AP198
#AH3-BASE-ACT-AMT
BASE_ACT_AMT
Signed 18.2—AP198
#AH3-BASE-ND
BASE_ND
Numeric 1The number of decimal positions defined for the company base currency.AP198
#AH3-TRAN-PMT-AMT
TRAN_PMT_AMT
Signed 18.2—AP198
#AH3-TRAN-ND
TRAN_ND
Numeric 1The number of decimals assigned to a particular account as determined by the account currency.AP198
#AH3-BANK-CHK-AMT
BANK_CHK_AMT
Signed 18.2—AP198
#AH3-BANK-ND
BANK_ND
Numeric 1The number of decimals assigned to a particular account as determined by the account currency.AP198
#AH3-BASE-DISC-AMT
BASE_DISC_AMT
Signed 18.2—AP198
#AH3-TRAN-DISC-AMT
TRAN_DISC_AMT
Signed 18.2—AP198
#AH3-BASE-CHK-AMT
BASE_CHK_AMT
Signed 18.2—AP198
#AH3-TRAN-CHK-AMT
TRAN_CHK_AMT
Signed 18.2—AP198
#AH3-BASE-INC-WH
BASE_INC_WH
Signed 18.2—AP198
#AH3-TRAN-INC-WH
TRAN_INC_WH
Signed 18.2—AP198
#AH3-TRAN-INC-AMT
TRAN_INC_AMT
Signed 18.2—AP198
#AH3-GAINLOS-AMT
GAINLOS_AMT
Signed 18.2—AP198
#AH3-UNRL-REV-DATE
UNRL_REV_DATE
Numeric 8 (yyyymmdd)This field displays the system date when this was created.AP198
#AH3-ACT-CNV-RATE
ACT_CNV_RATE
Signed 14.7—AP198
#AH3-DSC-ACCT-UNIT
DSC_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.AP198
#AH3-DSC-ACCOUNT
DSC_ACCOUNT
Numeric 6This field along with the accounting unit and subaccount make up the location (account) where amounts and other account information is stored.AP198
#AH3-DSC-SUB-ACCT
DSC_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.AP198
#AH3-DISCOUNT-RT
DISCOUNT_RT
Percent 5.3 (Percent)—AP198
#AH3-DISC-DATE
DISC_DATE
Numeric 8 (yyyymmdd)This field displays the system date when this was created.AP198
#AH3-TRANS-IDENT SET6
TRANS_IDENT
Numeric 10A unique system-generated identification value assigned to the transaction to make this record unique.AP198
#AH3-ACCR-CODE
ACCR_CODE
Alpha 4A user-defined code representing a general ledger accrual account.AP198
#AH3-PROC-LEVEL SET10
PROC_LEVEL
Alpha 5This field contains the process level, which is the reporting hierarchy below company.AP198
#AH3-REC-STATUS SET10 SET2
REC_STATUS
Numeric 1The record status.AP198
#AH3-TRANS-NBR SET8
TRANS_NBR
Alpha 10 (Right Justified)A unique, user-defined value used to identify the transaction.AP198
#AH3-CHK-SUFFIX
CHK_SUFFIX
Numeric 3—AP198
#AH3-BANK-INST-CODE SET6 SET8
BANK_INST_CODE
Alpha 3A transaction code represents a type of cash payment, bill of exchange payment, or bank service transaction.AP115, AP198
#AH3-CHECK-DATE
CHECK_DATE
Numeric 8 (yyyymmdd)The payment date.AP198
#AH3-INCOME-CODE
INCOME_CODE
Alpha 4A user-defined code that represents a type of income withholding. Used to track reportable income for reporting or withholding.AP198
#AH3-SEP-CHK-FLAG
SEP_CHK_FLAG
Alpha 1—AP198
#AH3-PAY-IMM-FLAG
PAY_IMM_FLAG
Alpha 1—AP198
#AH3-DISC-LOST-FLG
DISC_LOST_FLG
Alpha 1—AP198
#AH3-ANTICIPATION
ANTICIPATION
Alpha 1The anticipation flag.AP198
#AH3-INVOICE-GROUP
INVOICE_GROUP
Alpha 4A user-defined character expression. An invoice group can be assigned to one more invoices. AP150 (Cash Requirements) has an option to select all invoices assigned the same invoice group.AP115, AP198
#AH3-VENDOR-GROUP
VENDOR_GROUP
Alpha 4A vendor group represents a group of vendors that can be shared by one or more companies.AP198
#AH3-PAY-GROUP SET10 SET2 SET6 SET8
PAY_GROUP
Alpha 4A 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.AP198
#AH3-DISCOUNT-CODE
DISCOUNT_CODE
Alpha 10A user-defined code that represents a general ledger discount account.AP198
#AH3-INC-ACCR-CODE
INC_ACCR_CODE
Alpha 10A user-defined code representing a general ledger income withholding accrual account.AP198
#AH3-RECON-STMT-NBR
RECON_STMT_NBR
Numeric 12The bank-assigned reconciliation statement number. Used only for cash codes that require reconciliation statements.AP198
#AH3-MATCH-DISC-TAK
MATCH_DISC_TAK
Alpha 1—AP198
#AH3-OPEN-BASE-PMT
OPEN_BASE_PMT
Derived——
#AH3-OPEN-TRAN-PMT
OPEN_TRAN_PMT
Derived——
#AH3-BASE-NET-PMT
BASE_NET_PMT
Derived——
#AH3-TRAN-NET-PMT
TRAN_NET_PMT
Derived——
#AH3-PMT-STATUS
PMT_STATUS
Derived——
#AH3-BANK-STATUS
BANK_STATUS
Derived——
#AH3-NO-REINSTATE
NO_REINSTATE
Derived——
#AH3-PAID-DOC-DATE
PAID_DOC_DATE
Derived——
#AH3-DRAFT-ACCRUED
DRAFT_ACCRUED
Derived——
#AH3-AP-INV-DATE
AP_INV_DATE
Derived——
#AH3-AP-PO-NBR
AP_PO_NBR
Derived——
#AH3-AP-INV-TYPE
AP_INV_TYPE
Derived——
#AH3-AP-BASE-INV
AP_BASE_INV
Derived——
#AH3-AP-FORMAT-NBR
AP_FORMAT_NBR
Derived——
#AH3-STATEMENT
STATEMENT
Alpha 22Used to identify the invoice.—
#AH3-RETAINAGE-PMT
RETAINAGE_PMT
Numeric 1—
  • 0 No
  • 1 Yes
AP198
#AH3-SEC-WTH-CODE1
SEC_WTH_CODE1
Alpha 10—AP198
#AH3-SEC-WTH-PCT1
SEC_WTH_PCT1
Percent 5.3 (Percent)—AP198
#AH3-BASE-SEC-WTH1
BASE_SEC_WTH1
Signed 18.2—AP198
#AH3-TRAN-SEC-WTH1
TRAN_SEC_WTH1
Signed 18.2—AP198
#AH3-SEC-WTH-CODE2
SEC_WTH_CODE2
Alpha 10—AP198
#AH3-SEC-WTH-PCT2
SEC_WTH_PCT2
Percent 5.3 (Percent)—AP198
#AH3-BASE-SEC-WTH2
BASE_SEC_WTH2
Signed 18.2—AP198
#AH3-TRAN-SEC-WTH2
TRAN_SEC_WTH2
Signed 18.2—AP198
#AH3-SEC-WTH-CODE3
SEC_WTH_CODE3
Alpha 10—AP198
#AH3-SEC-WTH-PCT3
SEC_WTH_PCT3
Percent 5.3 (Percent)—AP198
#AH3-BASE-SEC-WTH3
BASE_SEC_WTH3
Signed 18.2—AP198
#AH3-TRAN-SEC-WTH3
TRAN_SEC_WTH3
Signed 18.2—AP198

Indexes (5)

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
AH3SET1
  1. COMPANY
  2. VENDOR
  3. INVOICE
  4. SUFFIX
  5. CANCEL-SEQ
  6. SEQ-NBR
  7. VOID-SEQ
PrimaryAP115, AP136, AP180, AP181, AP190, AP197, AP232, AP271 +5 more
AH3SET10
  1. REC-STATUS
  2. COMPANY
  3. PROC-LEVEL
  4. VENDOR
  5. INVOICE
  6. SUFFIX
  7. CANCEL-SEQ
  8. SEQ-NBR
  9. VOID-SEQ
  10. PAY-GROUP
KeyChangeAP00.5, AP145, AP146, AP245, AP246, AP270
AH3SET2
  1. PAY-GROUP
  2. REC-STATUS
  3. VENDOR
  4. INVOICE
  5. SUFFIX
  6. CANCEL-SEQ
  7. SEQ-NBR
  8. VOID-SEQ
  9. COMPANY
KeyChangeAP93.2
AH3SET6
  1. PAY-GROUP
  2. BANK-INST-CODE
  3. TRANS-IDENT
  4. VENDOR
  5. INVOICE
  6. SUFFIX
  7. CANCEL-SEQ
  8. SEQ-NBR
  9. VOID-SEQ
  10. COMPANY
KeyChange, SubsetWhere TRANS-IDENT != ZeroesAP180, AP181, AP190, AP265, AP28.1, AP28.2, CB186, CB286
AH3SET8
  1. PAY-GROUP
  2. CASH-CODE
  3. TRANS-NBR
  4. BANK-INST-CODE
  5. COMPANY
  6. VENDOR
  7. INVOICE
  8. SUFFIX
  9. CANCEL-SEQ
  10. SEQ-NBR
  11. VOID-SEQ
KeyChangeAP255

Relations

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

One to one (10) — lookups and parents

RelationTableRulesConditionField map
ApapihistAPAPIHISTRequired
AH3-COMPANY→AH1-COMPANY
AH3-VENDOR→AH1-VENDOR
AH3-INVOICE→AH1-INVOICE
AH3-SUFFIX→AH1-SUFFIX
AH3-CANCEL-SEQ→AH1-CANCEL-SEQ
ApcompanyAPCOMPANYRequired
AH3-COMPANY→CPY-COMPANY
ApdraftsAPDRAFTSNot Required
AH3-BANK-INST-CODE→APT-BANK-INST-CODE
AH3-TRANS-IDENT→APT-TRANS-IDENT
AppayvendorAPVENMASTRequired
AH3-VENDOR-GROUP→VEN-VENDOR-GROUP
AH3-PAY-VENDOR→VEN-VENDOR
ApvenmastAPVENMASTRequired
AH3-VENDOR-GROUP→VEN-VENDOR-GROUP
AH3-VENDOR→VEN-VENDOR
CbbankinstCBBANKINSTRequired
AH3-BANK-INST-CODE→CBI-BANK-INST-CODE
CbcashcodeCBCASHCODERequired
AH3-CASH-CODE→CBC-CASH-CODE
CbcashformCBCASHFORMNot Required
AH3-CASH-CODE→CCF-CASH-CODE
AH3-BANK-INST-CODE→CCF-BANK-INST-CODE
AH3-PROC-GRP→CCF-PROC-GRP
CbcheckCBCHECKRequired
AH3-CASH-CODE→CHK-CASH-CODE
AH3-BANK-INST-CODE→CHK-BANK-INST-CODE
AH3-TRANS-IDENT→CHK-TRANS-IDENT
CbtransCBTRANSNot RequiredValid When CHK-SERIAL-NUM = Zeroes
AH3-BANK-INST-CODE→CBT-BANK-INST-CODE
AH3-TRANS-IDENT→CBT-TRANS-IDENT

One to many (4) — child tables

RelationTableRulesConditionField map
Ah3set6APAPPHIST
AH3-PAY-GROUP→AH3-PAY-GROUP
AH3-BANK-INST-CODE→AH3-BANK-INST-CODE
AH3-TRANS-IDENT→AH3-TRANS-IDENT
—→AH3-VENDOR
—→AH3-INVOICE
—→AH3-SUFFIX
—→AH3-CANCEL-SEQ
—→AH3-SEQ-NBR
—→AH3-VOID-SEQ
—→AH3-COMPANY
ApdistpayAPDISTPAY
AH3-COMPANY→DTY-COMPANY
AH3-VENDOR→DTY-VENDOR
AH3-INVOICE→DTY-INVOICE
AH3-SUFFIX→DTY-SUFFIX
AH3-SEQ-NBR→DTY-PMT-SEQ-NBR
—→DTY-LINE-NBR
—→DTY-MAD-SEQ-NBR
—→DTY-DIST-SEQ-NBR
ApdskhistAPDSKHIST
AH3-COMPANY→AH8-COMPANY
AH3-VENDOR→AH8-VENDOR
AH3-INVOICE→AH8-INVOICE
AH3-SUFFIX→AH8-SUFFIX
AH3-CANCEL-SEQ→AH8-CANCEL-SEQ
AH3-SEQ-NBR→AH8-SEQ-NBR
—→AH8-VOID-SEQ
—→AH8-DISC-TYPE
AphldinvAPHLDINVDelete CascadesValid When AH3-HOLD-FLAG = "Y"
"P"→HLI-REC-TYPE
AH3-VENDOR-GROUP→HLI-VENDOR-GROUP
AH3-COMPANY→HLI-COMPANY
AH3-VENDOR→HLI-VENDOR
AH3-INVOICE→HLI-INVOICE
AH3-SUFFIX→HLI-SUFFIX
AH3-CANCEL-SEQ→HLI-CANCEL-SEQ
AH3-SEQ-NBR→HLI-SEQ-NBR
AH3-VOID-SEQ→HLI-VOID-SEQ
—→HLI-HLD-CODE

Programs

Updated by (12)

Referenced by (13)