APDRAFTS – AP Bill of Exchange

System
Accounts Payable (AP)
Prefix
APT
Primary key
BANK-INST-CODE, TRANS-IDENT
Fields
43
Updated by
38 programs
Referenced by
62 programs

APDRAFTS is the AP Bill of Exchange table in Lawson Accounts Payable (prefix APT). It is indexed by BANK-INST-CODE, TRANS-IDENT (APTSET1); alternate indexes: APTSET10, APTSET2, APTSET3, APTSET4, APTSET5, APTSET6, APTSET7 and APTSET8. It is related 1:1 to APCOMPANY, APPAYGROUP, APPROCLEV, APVENBAL, APVENMAST, APVENLOC, CBBANKENT, CBBANKINST and 3 more and 1:M to APAPPHIST, APDRFTDIST and APPAYMENT. It is updated by AP125, AP126, AP151, AP156, AP166, AP167, AP180, AP181 and 30 more and referenced by AP10.1, AP10.2, AP100, AP109, AP110, AP111, AP115, AP136 and 54 more. The table has 43 fields, 9 indexes and 15 documented relations.

About APDRAFTS

The Accounts Payable Bill of Exchange file contains bill of exchange payment records.

Fields (43)

Column = COBOL field name without the APT- 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
#APT-PAY-GROUP SET10 SET3 SET4 SET5 SET6 SET7
PAY_GROUP
Alpha 4The pay group associated with the bill of exchange payment. A pay group is used for processing accounts payable payments. Must be a valid record in the Pay Group file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-COMPANY SET2 SET8
COMPANY
Numeric 4The company associated with the bill of exchange payment. Must be a valid record in the Accounts Payable Company file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-TRANS-IDENT PK
TRANS_IDENT
Numeric 10A unique system-generated identification value assigned to the bill of exchange payment transaction to make this record unique.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-VENDOR-GROUP SET8
VENDOR_GROUP
Alpha 4The vendor group associated with the bill of exchange payment. A vendor group represents a group of vendors that can be shared by one or more companies. Must be a valid record in the Vendor Group file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-VENDOR SET2 SET4 SET6 SET7 SET8
VENDOR
Alpha 9 (Right Justified)The payment vendor number. Must be a valid record in the Vendor file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-VENDOR-VNAME
VENDOR_VNAME
Alpha 30 (Lower Case)The vendor name or description.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-BANK-INST-CODE PK
BANK_INST_CODE
Alpha 3The payment code assigned to the bill of exchange. Represents the type of bill of exchange payment. Must be a valid bill of exchange payment transaction code in the Bank Transaction Code file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DRAFT-NBR SET10 SET2 SET3 SET4 SET5 SET6 SET7
DRAFT_NBR
Alpha 10 (Right Justified)The bill of exchange number.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-SUFFIX SET10 SET2 SET3 SET4 SET5 SET6 SET7
SUFFIX
Numeric 3The bill of exchange suffix number.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-PROC-LEVEL
PROC_LEVEL
Alpha 5The process level associated with the bill of exchange. Must be a valid record in the Accounts Payable Process Level file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-REMIT-TO-CODE
REMIT_TO_CODE
Alpha 4The remit-to location code associated with the bill of exchange. Represents an alternate remittance location for the vendor. Must be a valid record in the Vendor Location file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-PMT-DOC-ORIGIN
PMT_DOC_ORIGIN
Alpha 1The bill of exchange payment origin. Indicates who created the bill of exchange document or transaction. Valid values are:
  • P Accounts Payable
  • R Accounts Receivable.
AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-CASH-CODE SET10 SET2 SET5
CASH_CODE
Alpha 4The cash code assigned to the bill of exchange. Represents the bank account used to pay the bill of exchange. Must be a valid record in the Cash Code file. If left blank, the cash code assigned to the remit-to location, vendor, vendor class, process level, company, or pay group defaults.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-CURRENCY-CODE
CURRENCY_CODE
Alpha 5The currency of the bill of exchange. Must be a valid record in the Currency Code file. If left blank, the company base currency defaults.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DRAFT-AMOUNT
DRAFT_AMOUNT
Signed 18.2The amount of the bill of exchange payment in the currency of the bill of exchange.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-APPLIED-AMT
APPLIED_AMT
Signed 18.2The total invoice amount that is applied to the bill of exchange.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-TRAN-ND
TRAN_ND
Numeric 1The number of decimal positions defined for the bill of exchange currency.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ORIG-RATE
ORIG_RATE
Signed 14.7The currency exchange rate used to convert the bill of exchange amount to the company base currency at the time the bill of exchange was created.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-BASE-ORIG-AMT
BASE_ORIG_AMT
Signed 18.2The amount of the bill of exchange payment in the company base currency. This amount is based on the currency exchange rate in effect at the time the bill of exchange was created.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-BASE-ACT-AMT
BASE_ACT_AMT
Signed 18.2The amount of the bill of exchange payment in the company base currency. This amount is based on the currency exchange rate in effect at the time the bill of exchange is cashed.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-BASE-ND
BASE_ND
Numeric 1The number of decimal positions defined for the company base currency.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ACT-RATE
ACT_RATE
Signed 14.7The currency exchange rate used to convert the bill of exchange amount to the company base currency at the time the bill of exchange is cashed.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DRAFT-DATE SET3
DRAFT_DATE
Numeric 8 (yyyymmdd)The creation date of the bill of exchange. If left blank, the system date defaults.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-MATURITY-DATE SET5
MATURITY_DATE
Numeric 8 (yyyymmdd)The date the bill of exchange is due for payment. If left blank, the system date defaults.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ACCEPT-DATE
ACCEPT_DATE
Numeric 8 (yyyymmdd)The date the bill of exchange is accepted. If left blank, the system date defaults.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-CASH-DATE
CASH_DATE
Numeric 8 (yyyymmdd)The date the bill of exchange was cashed by the bank.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DISHONOR-DATE
DISHONOR_DATE
Numeric 8 (yyyymmdd)The date the bill of exchange was dishonored by the bank.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-CANCEL-DATE
CANCEL_DATE
Numeric 8 (yyyymmdd)The date the bill of exchange was canceled.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-CASH-COMPANY
CASH_COMPANY
Numeric 4The company associated with cashing the bill of exchange payment. Must be a valid record in the Accounts Payable Company file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-REC-STATUS SET2 SET3 SET4
REC_STATUS
Numeric 1The status of the bill of exchange payment. Valid values are:
  • 0 Unreleased.
  • 1 Released.
  • 2 Accepted.
  • 3 Cashed.
  • 4 Dishonored.
  • 5 Canceled.
AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-PRINT-STATUS
PRINT_STATUS
Alpha 1Indicates whether the bill of exchange payment has been printed by AP156 (Bill of Exchange Printing). Valid values are:
  • N No.
  • Y Yes.
AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ACPT-ACCT-UNIT
ACPT_ACCT_UNIT
Alpha 15The general ledger acceptance accounting unit assigned to the bill of exchange payment. Must be a valid accounting unit in the Lawson General Ledger system.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ACPT-ACCOUNT
ACPT_ACCOUNT
Numeric 6The general ledger acceptance account number assigned to the bill of exchange payment. Must be a valid account in the Lawson General Ledger system.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-ACPT-SUB-ACCT
ACPT_SUB_ACCT
Numeric 4The general ledger acceptance subaccount number assigned to the bill of exchange payment. Must be a valid subaccount in the Lawson General Ledger system.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DRAFT-CODE
DRAFT_CODE
Alpha 4The bill of exchange accrual code assigned to the bill of exchange payment. Used to default an acceptance account to the bill of exchange. Must be a valid record in the Bill of Exchange Accrual Code file.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-GL-UPDATE-FL
GL_UPDATE_FL
Alpha 1Indicates whether the cashed or dishonored bill of exchange has been updated to the general ledger by AP185 (Bill of Exchange Distribution Posting). Valid values are:
  • N No.
  • Y Yes.
AP125, AP126, AP151, AP156, AP180, AP181, AP20.1, AP20.2 +26 more
#APT-POST-DATE
POST_DATE
Numeric 8 (yyyymmdd)The date used for posting the cashed or dishonored bill of exchange payment to the general ledger.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-PAYER-REF
PAYER_REF
Alpha 10The reference number assigned to the bill of exchange payment.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-STATEMENT-NBR SET10
STATEMENT_NBR
Numeric 8The statement number assigned to the bill of exchange payment.AP166, AP167
#APT-JRNL-BOOK-NBR
JRNL_BOOK_NBR
Alpha 12The journal book assigned to the transaction.AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +25 more
#APT-DERIVED-STATUS
DERIVED_STATUS
DerivedThe status of the bill of exchange payment.—
#APT-VGROUP
VGROUP
DerivedThe vendor group associated with the bill of exchange payment. Must be a valid record in the Vendor Group file.—
#APT-SHORT-DFT-NAME
SHORT_DFT_NAME
DerivedA short (20-character) name for the vendor associated with the bill of exchange payment.—

Indexes (9)

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
APTSET1
  1. BANK-INST-CODE
  2. TRANS-IDENT
PrimaryAP10.1, AP10.2, AP100, AP109, AP110, AP111, AP115, AP125 +22 more (list truncated in source)
APTSET10
  1. CASH-CODE
  2. PAY-GROUP
  3. STATEMENT-NBR
  4. DRAFT-NBR
  5. SUFFIX
SubsetWhere (STATEMENT-NBR != Zeroes)AP181
APTSET2
  1. CASH-CODE
  2. REC-STATUS
  3. BANK-INST-CODE
  4. DRAFT-NBR
  5. SUFFIX
  6. TRANS-IDENT
  7. COMPANY
  8. VENDOR
KeyChangeAP167, AP181
APTSET3
  1. PAY-GROUP
  2. REC-STATUS
  3. DRAFT-DATE
  4. BANK-INST-CODE
  5. DRAFT-NBR
  6. SUFFIX
  7. TRANS-IDENT
KeyChange, SubsetWhere REC-STATUS = 1 Or REC-STATUS = 2AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +22 more (list truncated in source)
APTSET4
  1. PAY-GROUP
  2. VENDOR
  3. REC-STATUS
  4. DRAFT-NBR
  5. SUFFIX
  6. BANK-INST-CODE
  7. TRANS-IDENT
KeyChangeAP266, AP28.1, AP28.2
APTSET5
  1. CASH-CODE
  2. MATURITY-DATE
  3. PAY-GROUP
  4. BANK-INST-CODE
  5. DRAFT-NBR
  6. SUFFIX
  7. TRANS-IDENT
KeyChange, SubsetWhere GL-UPDATE-FL = "N" And REC-STATUS > 1 And REC-STATUS < 5AP180, AP80.1
APTSET6
  1. BANK-INST-CODE
  2. DRAFT-NBR
  3. SUFFIX
  4. VENDOR
  5. PAY-GROUP
KeyChange, SubsetWhere REC-STATUS != 5AP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +22 more (list truncated in source)
APTSET7
  1. PAY-GROUP
  2. BANK-INST-CODE
  3. VENDOR
  4. DRAFT-NBR
  5. SUFFIX
  6. TRANS-IDENT
KeyChangeAP125, AP126, AP151, AP156, AP180, AP20.1, AP20.2, AP20.3 +22 more (list truncated in source)
APTSET8
  1. VENDOR-GROUP
  2. VENDOR
  3. COMPANY
  4. BANK-INST-CODE
  5. TRANS-IDENT
KeyChangeAP214, AP91.1

Relations

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

One to one (12) — lookups and parents

RelationTableRulesConditionField map
ApcompanyAPCOMPANYRequired
APT-COMPANY→CPY-COMPANY
AppaygroupAPPAYGROUPRequired
APT-PAY-GROUP→PAY-PAY-GROUP
ApproclevAPPROCLEVNot Required
APT-COMPANY→APR-COMPANY
APT-PROC-LEVEL→APR-PROC-LEVEL
ApvenbalAPVENBALRequired
CPY-VENDOR-GROUP→VBA-VENDOR-GROUP
APT-COMPANY→VBA-COMPANY
APT-VENDOR→VBA-VENDOR
APT-REMIT-TO-CODE→VBA-LOCATION-CODE
ApvenclassAPVENMASTNot Required
CPY-VENDOR-GROUP→VEN-VENDOR-GROUP
APT-VENDOR→VEN-VENDOR
ApvenlocAPVENLOCNot Required
CPY-VENDOR-GROUP→VLO-VENDOR-GROUP
APT-VENDOR→VLO-VENDOR
APT-REMIT-TO-CODE→VLO-LOCATION-CODE
ApvenmastAPVENMASTNot Required
CPY-VENDOR-GROUP→VEN-VENDOR-GROUP
APT-VENDOR→VEN-VENDOR
CbbankentCBBANKENTRequired
CBC-BANK-ENTITY→CBE-BANK-ENTITY
CbbankinstCBBANKINSTRequired
APT-BANK-INST-CODE→CBI-BANK-INST-CODE
CbcashcodeCBCASHCODERequired
APT-CASH-CODE→CBC-CASH-CODE
CbcpycashCBCPYCASHNot Required
APT-COMPANY→CBY-COMPANY
APT-CASH-CODE→CBY-CASH-CODE
CbtransCBTRANSNot Required
APT-BANK-INST-CODE→CBT-BANK-INST-CODE
APT-TRANS-IDENT→CBT-TRANS-IDENT

One to many (3) — child tables

RelationTableRulesConditionField map
ApapphistAPAPPHIST
APT-PAY-GROUP→AH3-PAY-GROUP
APT-BANK-INST-CODE→AH3-BANK-INST-CODE
APT-TRANS-IDENT→AH3-TRANS-IDENT
—→AH3-VENDOR
—→AH3-INVOICE
—→AH3-SUFFIX
—→AH3-CANCEL-SEQ
—→AH3-SEQ-NBR
—→AH3-VOID-SEQ
—→AH3-COMPANY
ApdrftdistAPDRFTDIST
APT-BANK-INST-CODE→DDT-BANK-INST-CODE
APT-TRANS-IDENT→DDT-TRANS-IDENT
—→DDT-SEQ-NBR
AppaymentAPPAYMENT
APT-PAY-GROUP→APP-PAY-GROUP
APT-BANK-INST-CODE→APP-BANK-INST-CODE
APT-TRANS-IDENT→APP-TRANS-IDENT
—→APP-VENDOR
—→APP-INVOICE
—→APP-SUFFIX
—→APP-CANCEL-SEQ
—→APP-SEQ-NBR
—→APP-VOID-SEQ
—→APP-COMPANY

Programs

Updated by (38)

Referenced by (62)