APDISTHDR – Distribution Code Header

System
Accounts Payable (AP)
Prefix
HDR
Primary key
COMPANY, DIST-CODE
Fields
10
Updated by
2 programs
Referenced by
300 programs

APDISTHDR is the Distribution Code Header table in Lawson Accounts Payable (prefix HDR). It is indexed by COMPANY, DIST-CODE (HDRSET1); alternate indexes: HDRSET2 and HDRSET3. It is related 1:1 to APCOMPANY and 1:M to APDISTCODE. It is updated by AP05.3 and AP305 and referenced by AC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 and 292 more. The table has 10 fields, 3 indexes and 2 documented relations.

About APDISTHDR

The Distribution Code Header file contains distribution code header records. A distribution code header record has one or more related detail records in the Distribution Code Detail file. A detail record represents default information for one line of expense distribution. Distribution codes are used to automatically create expense distributions or expense distribution "shells" for invoices or to split invoice distributions into multiple distribution lines.

Fields (10)

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

Field / columnTypeDescription & valuesUpdated by
HDR-COMPANY PK
COMPANY
Numeric 4The company number. Must be a valid record in the Accounts Payable Company file.AP05.3
HDR-DIST-CODE PK
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.AP05.3
HDR-DESCRIPTION
DESCRIPTION
Alpha 30 (Lower Case)The distribution code description.AP05.3
HDR-ACCT-EDIT-FLAG
ACCT_EDIT_FLAG
Alpha 1Indicates whether to edit general ledger accounting units and account numbers when the distribution code is defined or during invoice entry. Valid values are: Accounting Unit and Account Number fields are required and are validated when a distribution code is defined. and Account Number fields are not required when a distribution code is defined, but will be validated if either is entered. Any account information left blank is entered and validated during invoice entry.
  • C Code and Invoice Entry. The
  • I Invoice Entry Only. Accounting Unit
  • S Service Invoice
AP05.3
HDR-ACCT-UNIT-FLAG
ACCT_UNIT_FLAG
Alpha 1Used only if Invoice Entry is selected in the Edit Accounts field. Indicates whether the Accounting Unit field in the Accounting Unit subform in AP20.1 (Basic Invoice) or AP20.2 (Taxed Invoice) is required during invoice entry. Valid values are:
  • Y Yes.
  • N No.
AP05.3
HDR-ACCOUNT-FLAG
ACCOUNT_FLAG
Alpha 1Used only if Invoice Entry is selected in the Edit Accounts field. Indicates whether the Account number fields in the Account subform in AP20.1 (Basic Invoice) or AP20.2 (Taxed Invoice) are required during invoice entry. Valid values are:
  • Y Yes.
  • N No.
AP05.3
HDR-TOTAL-PERCENT
TOTAL_PERCENT
Signed 6.3The total percent defined for the distribution code. This is a sum of all distribution code detail records associated with the distribution code header record.AP05.3
HDR-TOTAL-TRAN-AMT
TOTAL_TRAN_AMT
Signed 18.2The total distribution amount defined for the distribution code. This is the sum of all distribution code detail records associated with the distribution code header record.AP05.3
HDR-TOTAL-UNIT
TOTAL_UNIT
Signed 15.2The total units defined for the distribution code. This is the sum of all distribution code detail records defined for the distribution code header record.AP05.3
HDR-VENDOR-GROUP
VENDOR_GROUP
Alpha 4The vendor group associated with the distribution code company.AP05.3

Indexes (3)

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

IndexKeysFlagsConditionUsed in
HDRSET1COMPANY, DIST-CODEPrimaryAP00.4, AP00.5, AP05.3, AP10.5, AP20.1, AP20.2, AP20.3, AP20.4 +22 more (list truncated in source)
HDRSET2VENDOR-GROUP, DIST-CODE, COMPANYKeyChangeAC160, AM115, AM117, AM15.1, AM15.2, AM15.3, AM15.4, AM19.1 +22 more (list truncated in source)
HDRSET3DIST-CODE, COMPANYKeyChangeAP205

Relations

One to one (1) — lookups and parents

RelationTableRulesConditionField map
ApcompanyAPCOMPANYRequiredHDR-COMPANYCPY-COMPANY

One to many (1) — child tables

RelationTableRulesConditionField map
ApdistcodeAPDISTCODEDelete CascadesHDR-COMPANYDTC-COMPANY, HDR-DIST-CODEDTC-DIST-CODE, DTC-SEQ-NBR

Programs

Updated by (2)

Referenced by (300)