APVENBAL – Vendor Balance

System
Accounts Payable (AP)
Prefix
VBA
Primary key
VENDOR-GROUP, COMPANY, VENDOR, LOCATION-CODE
Fields
77
Updated by
308 programs
Referenced by
29 programs

APVENBAL is the Vendor Balance table in Lawson Accounts Payable (prefix VBA). It is indexed by VENDOR-GROUP, COMPANY, VENDOR, LOCATION-CODE (VBASET1); alternate indexes: VBASET2, VBASET3, VBASET4 and VBASET5. It is related 1:1 to APCOMPANY, APVENLOC, APVENMAST and VBABOD and 1:M to APAPPHIST, APDRAFTS and APPAYMENT. It is updated by AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 and 300 more and referenced by AP10.1, AP10.2, AP100, AP109, AP111, AP14.1, AP14.2, AP14.5 and 21 more. The table has 77 fields, 5 indexes and 7 documented relations.

About APVENBAL

The Vendor Balance file contains records of all vendor purchase and payment balances for each period of the current and last vendor group years.

Fields (77)

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

Field / columnTypeDescription & valuesUpdated by
VBA-VENDOR-GROUP PK
VENDOR_GROUP
Alpha 4The vendor group. Must be a valid record in the Vendor Group file.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +24 more
VBA-COMPANY PK
COMPANY
Numeric 4The company number. Must be a valid company in the Accounts Payable Company file.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +24 more
VBA-VENDOR PK
VENDOR
Alpha 9 (Right Justified)The vendor number. Must be a valid record in the Vendor file.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +24 more
VBA-LOCATION-CODE PK
LOCATION_CODE
Alpha 4The alternate vendor location code. Represents an alternate remittance or purchasing location for the vendor. Must be a valid record in the Vendor Location file.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +24 more
VBA-BAL-CURRENCY
BAL_CURRENCY
Alpha 5The balance currency defined for the vendor. Represents the currency in which balances for the vendor or location are stored and displayed. If left blank, the company base currency is used. Must be a valid record in the Currency Code file.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +24 more
VBA-TRAN-ND
TRAN_ND
Numeric 1The number of decimal places defined for the balance currency.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP191 +21 more
VBA-LAST-PMT-DATE
LAST_PMT_DATE
Numeric 8 (yyyymmdd)The last date a payment was made to the vendor or alternate vendor location.AP170, AP197, AP510, AP520
VBA-LAST-PUR-DATE
LAST_PUR_DATE
Numeric 8 (yyyymmdd)The last date a purchase was made for the vendor or alternate vendor location.AP115, AP125, AP126, AP170, AP193, AP197, AP25.1, AP25.2 +16 more
VBA-HIGHEST-BAL
HIGHEST_BAL
Signed 18.2The highest open balance ever reached for the vendor or alternate vendor location. This balance applies only to vendor activity not yet deleted from the Lawson Accounts Payable system by AP300 (History Purge).AP115, AP125, AP126, AP170, AP190, AP193, AP197, AP25.1 +17 more
VBA-CURRENT-BAL
CURRENT_BAL
Signed 18.2The current open balance for the vendor or alternate vendor location.AP115, AP125, AP126, AP151, AP170, AP180, AP181, AP190 +23 more
VBA-DRAFT-BAL
DRAFT_BAL
Signed 18.2The current open bill of exchange balance for the vendor or alternate vendor location.AP151, AP180, AP181, AP197
VBA-CY-INC-WH
CY_INC_WH
Signed 18.2The amount of reportable income withholding for the vendor or alternate vendor location for the current year.AP170, AP190, AP197, AP199, AP510, AP520
VBA-LY-INC-WH
LY_INC_WH
Signed 18.2The amount of reportable income withholding for the vendor or alternate vendor location for last year.AP197, AP199, AP510
VBA-CP-PURCH
CP_PURCH
Signed 18.2 Occurs 14 Times ×14The purchase balance for the vendor or alternate vendor location for each period of the current vendor group year. Note: The 14th period is used to store purchase activity dated after the end of the current vendor group year. When you run AP199 (Vendor Balance Year End), any balance in the 14th period will be transferred to period one of the new vendor group year.AP115, AP125, AP126, AP170, AP193, AP197, AP199, AP25.1 +16 more
VBA-LY-PURCH
LY_PURCH
Signed 18.2 Occurs 13 Times ×13The purchase balance for the vendor or alternate vendor location for each period of the last vendor group year.AP197, AP199, AP510
VBA-CP-PAYMENT
CP_PAYMENT
Signed 18.2 Occurs 14 Times ×14The payment balance for the vendor or alternate vendor location for each period of the current vendor group year. Note: The 14th period is used to store payment activity dated after the end of the current vendor group year. When you run AP199 (Vendor Balance Year End), any balance in the 14th period will be transferred to the first period of the new vendor group year.AP115, AP125, AP126, AP170, AP180, AP181, AP190, AP193 +19 more
VBA-LY-PAYMENT
LY_PAYMENT
Signed 18.2 Occurs 13 Times ×13The payment balance for the vendor or alternate vendor location for each period of the last vendor group year.AP197, AP199, AP510
VBA-CP-DSCTAKE
CP_DSCTAKE
Signed 18.2 Occurs 14 Times ×14The amount of discounts taken for the vendor or alternate vendor location for each period of the current vendor group year. Note: The 14th period is used to store discounts taken activity dated after the end of the current vendor group year. When you run AP199 (Vendor Balance Year End), any balance in the 14th period will be transferred to the first period of the new vendor group year.AP170, AP190, AP197, AP199, AP510, AP520
VBA-LY-DSCTAKE
LY_DSCTAKE
Signed 18.2 Occurs 13 Times ×13The amount of discounts taken for the vendor or alternate vendor location for each period of the last vendor group year.AP197, AP199, AP510
VBA-CP-DSCLOST
CP_DSCLOST
Signed 18.2 Occurs 14 Times ×14The amount of discounts lost for the vendor or alternate vendor location for each period of the current vendor group year. Note: The 14th period is used to store discounts lost activity dated after the end of the current vendor group year. When you run AP199 (Vendor Balance Year End), any balance in the 14th period will be transferred to the first period of the new vendor group year.AP170, AP190, AP197, AP199, AP510, AP520
VBA-LY-DSCLOST
LY_DSCLOST
Signed 18.2 Occurs 13 Times ×13The amount of discounts lost for the vendor or alternate vendor location for each period of the last vendor group year.AP197, AP199, AP510
VBA-CP-GAINLOS
CP_GAINLOS
Signed 18.2 Occurs 14 Times ×14The net amount of currency gain or loss activity for the vendor or alternate vendor location for each period of the current vendor group year. Note: The 14th period is used to store currency gain/loss activity dated after the end of the current vendor group year. When you run AP199 (Vendor Balance Year End), any balance in the 14th period will be transferred to the first period of the new vendor group year.AP170, AP190, AP197, AP199, AP510
VBA-LY-GAINLOS
LY_GAINLOS
Signed 18.2 Occurs 13 Times ×13The net amount of currency gain or loss activity for the vendor or alternate vendor location for each period of the last vendor group year.AP197, AP199, AP510
VBA-CP-PMT-01
CP_PMT_01
DerivedThe payment balance for the vendor or alternate vendor location for the first period of the current vendor group year.
VBA-CP-PMT-02
CP_PMT_02
DerivedThe payment balance for the vendor or alternate vendor location for the second period of the current vendor group year.
VBA-CP-PMT-03
CP_PMT_03
DerivedThe payment balance for the vendor or alternate vendor location for the third period of the current vendor group year.
VBA-CP-PMT-04
CP_PMT_04
DerivedThe payment balance for the vendor or alternate vendor location for the fourth period of the current vendor group year.
VBA-CP-PMT-05
CP_PMT_05
DerivedThe payment balance for the vendor or alternate vendor location for the fifth period of the current vendor group year.
VBA-CP-PMT-06
CP_PMT_06
DerivedThe payment balance for the vendor or alternate vendor location for the sixth period of the current vendor group year.
VBA-CP-PMT-07
CP_PMT_07
DerivedThe payment balance for the vendor or alternate vendor location for the seventh period of the current vendor group year.
VBA-CP-PMT-08
CP_PMT_08
DerivedThe payment balance for the vendor or alternate vendor location for the eighth period of the current vendor group year.
VBA-CP-PMT-09
CP_PMT_09
DerivedThe payment balance for the vendor or alternate vendor location for the ninth period of the current vendor group year.
VBA-CP-PMT-10
CP_PMT_10
DerivedThe payment balance for the vendor or alternate vendor location for the tenth period of the current vendor group year.
VBA-CP-PMT-11
CP_PMT_11
DerivedThe payment balance for the vendor or alternate vendor location for the eleventh period of the current vendor group year.
VBA-CP-PMT-12
CP_PMT_12
DerivedThe payment balance for the vendor or alternate vendor location for the twelfth period of the current vendor group year.
VBA-CP-PMT-13
CP_PMT_13
DerivedThe payment balance for the vendor or alternate vendor location for the thirteenth period of the current vendor group year.
VBA-CP-DISC-TK-01
CP_DISC_TK_01
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the first period of the current vendor group year.
VBA-CP-DISC-TK-02
CP_DISC_TK_02
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the second period of the current vendor group year.
VBA-CP-DISC-TK-03
CP_DISC_TK_03
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the third period of the current vendor group year.
VBA-CP-DISC-TK-04
CP_DISC_TK_04
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the fourth period of the current vendor group year.
VBA-CP-DISC-TK-05
CP_DISC_TK_05
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the fifth period of the current vendor group year.
VBA-CP-DISC-TK-06
CP_DISC_TK_06
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the sixth period of the current vendor group year.
VBA-CP-DISC-TK-07
CP_DISC_TK_07
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the seventh period of the current vendor group year.
VBA-CP-DISC-TK-08
CP_DISC_TK_08
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the eighth period of the current vendor group year.
VBA-CP-DISC-TK-09
CP_DISC_TK_09
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the ninth period of the current vendor group year.
VBA-CP-DISC-TK-10
CP_DISC_TK_10
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the tenth period of the current vendor group year.
VBA-CP-DISC-TK-11
CP_DISC_TK_11
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the eleventh period of the current vendor group year.
VBA-CP-DISC-TK-12
CP_DISC_TK_12
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the twelfth period of the current vendor group year.
VBA-CP-DISC-TK-13
CP_DISC_TK_13
DerivedThe amount of discounts taken for the vendor or alternate vendor location for the thirteenth period of the current vendor group year.
VBA-CP-DISC-LST-01
CP_DISC_LST_01
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the first period of the current vendor group year.
VBA-CP-DISC-LST-02
CP_DISC_LST_02
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the second period of the current vendor group year.
VBA-CP-DISC-LST-03
CP_DISC_LST_03
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the third period of the current vendor group year.
VBA-CP-DISC-LST-04
CP_DISC_LST_04
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the fourth period of the current vendor group year.
VBA-CP-DISC-LST-05
CP_DISC_LST_05
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the fifth period of the current vendor group year.
VBA-CP-DISC-LST-06
CP_DISC_LST_06
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the sixth period of the current vendor group year.
VBA-CP-DISC-LST-07
CP_DISC_LST_07
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the seventh period of the current vendor group year.
VBA-CP-DISC-LST-08
CP_DISC_LST_08
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the eighth period of the current vendor group year.
VBA-CP-DISC-LST-09
CP_DISC_LST_09
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the ninth period of the current vendor group year.
VBA-CP-DISC-LST-10
CP_DISC_LST_10
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the tenth period of the current vendor group year.
VBA-CP-DISC-LST-11
CP_DISC_LST_11
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the eleventh period of the current vendor group year.
VBA-CP-DISC-LST-12
CP_DISC_LST_12
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the twelfth period of the current vendor group year.
VBA-CP-DISC-LST-13
CP_DISC_LST_13
DerivedThe amount of discounts lost for the vendor or alternate vendor location for the thirteenth period of the current vendor group year.
VBA-CP-NBR-PMTS
CP_NBR_PMTS
Signed 6.0 Occurs 14 Times ×14AP115, AP170, AP180, AP181, AP190, AP197, AP199, AP510 +1 more
VBA-CP-NBR-PMTS-01
CP_NBR_PMTS_01
Derived
VBA-CP-NBR-PMTS-02
CP_NBR_PMTS_02
Derived
VBA-CP-NBR-PMTS-03
CP_NBR_PMTS_03
Derived
VBA-CP-NBR-PMTS-04
CP_NBR_PMTS_04
Derived
VBA-CP-NBR-PMTS-05
CP_NBR_PMTS_05
Derived
VBA-CP-NBR-PMTS-06
CP_NBR_PMTS_06
Derived
VBA-CP-NBR-PMTS-07
CP_NBR_PMTS_07
Derived
VBA-CP-NBR-PMTS-08
CP_NBR_PMTS_08
Derived
VBA-CP-NBR-PMTS-09
CP_NBR_PMTS_09
Derived
VBA-CP-NBR-PMTS-10
CP_NBR_PMTS_10
Derived
VBA-CP-NBR-PMTS-11
CP_NBR_PMTS_11
Derived
VBA-CP-NBR-PMTS-12
CP_NBR_PMTS_12
Derived
VBA-CP-NBR-PMTS-13
CP_NBR_PMTS_13
Derived
VBA-LY-NBR-PMTS
LY_NBR_PMTS
Signed 6.0 Occurs 13 Times ×13AP197, AP199, AP510

Indexes (5)

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

IndexKeysFlagsConditionUsed in
VBASET1VENDOR-GROUP, COMPANY, VENDOR, LOCATION-CODEPrimaryAP10.1, AP10.2, AP100, AP109, AP110, AP111, AP115, AP125 +22 more (list truncated in source)
VBASET2VENDOR-GROUP, VENDOR, COMPANY, LOCATION-CODEAP240, PO10.1, PO10.2
VBASET3VENDOR-GROUP, VENDOR, BAL-CURRENCY, LOCATION-CODE, COMPANYKeyChangeAP10.1, AP90.7, AR09.1, AR09.8
VBASET4VENDOR-GROUP, VENDOR, LOCATION-CODE, COMPANYAC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +22 more (list truncated in source)
VBASET5COMPANY, VENDOR, LOCATION-CODE, BAL-CURRENCY, VENDOR-GROUPKeyChangeAP190, AP305

Relations

One to one (4) — lookups and parents

RelationTableRulesConditionField map
ApcompanyAPCOMPANYRequiredVBA-COMPANYCPY-COMPANY
ApvenlocAPVENLOCRequiredWhen VBA-LOCATION-CODE != SpacesVBA-VENDOR-GROUPVLO-VENDOR-GROUP, VBA-VENDORVLO-VENDOR, VBA-LOCATION-CODEVLO-LOCATION-CODE
ApvenmastAPVENMASTRequiredVBA-VENDOR-GROUPVEN-VENDOR-GROUP, VBA-VENDORVEN-VENDOR
VbabodVBABODNot Required, Delete CascadesVBA-VENDOR-GROUPYVB-VENDOR-GROUP, VBA-COMPANYYVB-COMPANY, VBA-VENDORYVB-VENDOR, VBA-LOCATION-CODEYVB-LOCATION-CODE

One to many (3) — child tables

RelationTableRulesConditionField map
ApapphistAPAPPHISTVBA-COMPANYAH3-COMPANY, VBA-VENDORAH3-VENDOR, AH3-INVOICE, AH3-SUFFIX, AH3-CANCEL-SEQ, AH3-SEQ-NBR, AH3-VOID-SEQ
ApdraftsAPDRAFTSVBA-VENDOR-GROUPAPT-VENDOR-GROUP, VBA-VENDORAPT-VENDOR, VBA-COMPANYAPT-COMPANY, APT-BANK-INST-CODE, APT-TRANS-IDENT
AppaymentAPPAYMENTVBA-COMPANYAPP-COMPANY, VBA-VENDORAPP-VENDOR, APP-INVOICE, APP-SUFFIX, APP-CANCEL-SEQ, APP-SEQ-NBR, APP-VOID-SEQ

Programs

Updated by (308)

Referenced by (29)