APAPDHIST – No description in the Lawson data dictionary
- System
- Accounts Payable (AP)
- Prefix
AH2- Primary key
API-OBJ-ID,DIST-SEQ-NBR- Fields
- 65
- Updated by
- 10 programs
- Referenced by
- 3 programs
APAPDHIST is a Lawson Accounts Payable table (prefix AH2); no description in the lawson data dictionary. It is indexed by API-OBJ-ID, DIST-SEQ-NBR (AH2SET1); alternate indexes: AH2SET2, AH2SET4, AH2SET5, AH2SET6 and AH2SET9. It is related 1:1 to ACTRANS, APAPIHIST, APCOMPANY, APUAVHIST, APVENMAST, APAPSHIST, APDFLHIST, GLMASTER and 1 more and 1:M to APDISTPAY. It is updated by AP115, AP180, AP181, AP190, AP198, AP28.1, AP28.2, AP300 and 2 more and referenced by AP136, AP232 and AP275. The table has 65 fields, 6 indexes and 11 documented relations.
About APAPDHIST
No description in the Lawson data dictionary.
Fields (65)
Column = COBOL field name without the AH2- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored.
| Field / column | Type | Description & values | Updated by |
|---|---|---|---|
AH2-COMPANYCOMPANY | Numeric 4 | Identifies 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 |
AH2-API-OBJ-ID PKAPI_OBJ_ID | Numeric 12 | This is the object identifier. It is used to relate commitments or posted transactions back to the originating subsystems. Each subsystem record that is updated as a commitment or posted transaction is assigned an object identifier. The object identifier is maintained in the subsystem files and in the Activity Commitments Detail and Activity Transaction files. The object identifier is a unique key used to drill back from Activity Management to the subsystems. | AP198 |
AH2-VENDORVENDOR | Alpha 9 (Right Justified) | The vendor's identification code. | AP115, AP198 |
AH2-INVOICEINVOICE | Alpha 22 | Used to identify the invoice. | AP115, AP198 |
AH2-SUFFIXSUFFIX | Numeric 3 | This is the suffix for the invoice. | AP198 |
AH2-CANCEL-SEQCANCEL_SEQ | Numeric 4 | An automatically assigned sequence number. | AP198 |
AH2-DIST-SEQ-NBR PKDIST_SEQ_NBR | Numeric 6 | A unique sequence number. | AP198 |
AH2-ORIG-DIST-SEQORIG_DIST_SEQ | Numeric 6 | A unique sequence number. | AP198 |
AH2-DIST-TYPEDIST_TYPE | Alpha 1 | The distribution type. "D" = Distribution "I" = Inter-company "G" = Gain/Loss | AP198 |
AH2-PROC-LEVELPROC_LEVEL | Alpha 5 | This field contains the process level, which is the reporting hierarchy below company. | AP198 |
AH2-POST-OPTIONPOST_OPTION | Alpha 1 | General Ledger posting option. | AP198 |
AH2-INVOICE-TYPEINVOICE_TYPE | Alpha 1 | THis field will be filled in from the Invoice based on PO number. This is a carrier for the field. The PORECEIVE file will have to be updated with this field. | AP198 |
AH2-REC-STATUSREC_STATUS | Numeric 1 | The record status. | AP198 |
AH2-INV-CURRENCYINV_CURRENCY | Alpha 5 | — | AP198 |
AH2-TAX-RATETAX_RATE | Percent 7.5 (Percent) | Charge rate by month. | AP198 |
AH2-CURR-RATECURR_RATE | Signed 14.7 | The currency rate. | AP198 |
AH2-ORIG-BASE-AMTORIG_BASE_AMT | Signed 18.2 | — | AP198 |
AH2-BASE-NDBASE_ND | Numeric 1 | The number of decimal positions defined for the company base currency. | AP198 |
AH2-ORIG-TRAN-AMTORIG_TRAN_AMT | Signed 18.2 | — | AP198 |
AH2-TRAN-NDTRAN_ND | Numeric 1 | The number of decimals assigned to a particular account as determined by the account currency. | AP198 |
AH2-TO-BASE-AMTTO_BASE_AMT | Signed 18.2 | — | AP198 |
AH2-TO-BASE-NDTO_BASE_ND | Numeric 1 | The number of decimals assigned to a particular account as determined by the account currency. | AP198 |
AH2-TAXABLE-AMTTAXABLE_AMT | Signed 18.2 | — | AP198 |
AH2-UNT-AMOUNTUNT_AMOUNT | Signed 18.2 | — | AP198 |
AH2-DIST-COMPANYDIST_COMPANY | Numeric 4 | Identifies 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 |
AH2-DIS-ACCT-UNITDIS_ACCT_UNIT | Alpha 15 | The 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 |
AH2-DIS-ACCOUNTDIS_ACCOUNT | Numeric 6 | This field along with the accounting unit and subaccount make up the location (account) where amounts and other account information is stored. | AP198 |
AH2-DIS-SUB-ACCTDIS_SUB_ACCT | Numeric 4 | This field contains the subaccount from your general ledger chart of accounts that was charged with the amount carried on this record. | AP198 |
AH2-DISTRIB-DATEDISTRIB_DATE | Numeric 8 (yyyymmdd) | This field displays the system date when this was created. | AP198 |
AH2-TAX-SEQ-NBRTAX_SEQ_NBR | Numeric 4 | — | AP198 |
AH2-TAX-INDICATORTAX_INDICATOR | Numeric 1 | —
| AP198 |
AH2-TAX-CODETAX_CODE | Alpha 10 | This field contains a code representing specific tax information. This must be valid Tax Code. | AP198 |
AH2-TAX-TYPETAX_TYPE | Alpha 1 | The type of tax. | AP198 |
AH2-DESCRIPTIONDESCRIPTION | Alpha 30 (Lower Case) | This field displays the description. | AP198 |
AH2-DST-REFERENCEDST_REFERENCE | Alpha 10 | A user-defined field that can be used to cross reference expenses to advances or cash payments. | AP198 |
AH2-ACTIVITYACTIVITY | Alpha 15 | Activities are the processes or procedures that produce work. Cost objects (products, services, customers, and so on) are the reasons for performing the activity. | AP198 |
AH2-ACCT-CATEGORYACCT_CATEGORY | Alpha 5 | Account categories are groupings of costs, revenues, or a combination of both used for reporting and inquiries for activities in the Activity Management system. All transactions are posted to an account category within an activity. You can assign a specific General Ledger account or range of accounts (company, accounting unit, account, and subaccount) that make up the transactions posted to an account category using AC07.1 (Account Assignment). Period-to-date, year-to-date, and life-to-date balances are maintained by account category for activities. Account categories must be assigned to activities before you do any budgeting or transaction processing. Valid account category types are: cost revenue accrual pass thru | AP198 |
AH2-BILL-CATEGORYBILL_CATEGORY | Alpha 32 | — | AP198 |
AH2-ACCR-CODEACCR_CODE | Alpha 4 | A user-defined code representing a general ledger accrual account. | AP198 |
AH2-PO-NUMBERPO_NUMBER | Alpha 14 (Right Justified) | This field contains the number representing the purchase order. | AP198 |
AH2-PO-RELEASEPO_RELEASE | Numeric 4 | Used to identify a purchase order release (created from a Blanket or Standing order). | AP198 |
AH2-PO-CODEPO_CODE | Alpha 4 | This is the purchase order code. | AP198 |
AH2-PO-LINE-NBRPO_LINE_NBR | Numeric 6 | This field contains the line number. | AP198 |
AH2-PO-AOC-CODEPO_AOC_CODE | Alpha 2 | This field contains the identifier for the add on cost associated with this line item. | AP198 |
AH2-GLT-OBJ-IDGLT_OBJ_ID | Numeric 12 | This is the object identifier. It is used to relate commitments or posted transactions back to the originating subsystems. Each subsystem record that is updated as a commitment or posted transaction is assigned an object identifier. The object identifier is maintained in the subsystem files and in the Activity Commitments Detail and Activity Transaction files. The object identifier is a unique key used to drill back from Activity Management to the subsystems. | AP198 |
AH2-ATN-OBJ-IDATN_OBJ_ID | Numeric 12 | This is the object identifier. It is used to relate commitments or posted transactions back to the originating subsystems. Each subsystem record that is updated as a commitment or posted transaction is assigned an object identifier. The object identifier is maintained in the subsystem files and in the Activity Commitments Detail and Activity Transaction files. The object identifier is a unique key used to drill back from Activity Management to the subsystems. | AP198 |
AH2-ASSET-FLAGASSET_FLAG | Alpha 1 | — | AP198 |
AH2-DIST-CODEDIST_CODE | Alpha 9 | A user-defined code used to automatically create expense distributions or expense distribution "shells" for invoices or to split an invoice distribution into multiple distributions. | AP198 |
AH2-TAX-POINTTAX_POINT | Alpha 1 | — | AP198 |
AH2-VAT-REVERSE-FLVAT_REVERSE_FL | Alpha 1 | — | AP198 |
AH2-DST-OBJ-IDDST_OBJ_ID | Numeric 12 | This is the object identifier. It is used to relate commitments or posted transactions back to the originating subsystems. Each subsystem record that is updated as a commitment or posted transaction is assigned an object identifier. The object identifier is maintained in the subsystem files and in the Activity Commitments Detail and Activity Transaction files. The object identifier is a unique key used to drill back from Activity Management to the subsystems. | AP198 |
AH2-MA-CREATE-FLMA_CREATE_FL | Alpha 1 | — | AP198 |
AH2-TAX-USAGE-CDTAX_USAGE_CD | Alpha 10 | The tax usage coe for the vendor. This filed is required if the AP Company inidcates that VAT reporting required. | AP198 |
AH2-TRAN-DIST-FLAGTRAN_DIST_FLAG | Alpha 1 | — | AP198 |
AH2-AC-UPD-STATUSAC_UPD_STATUS | Numeric 1 | AC provides status that the activity reflects "cash basis" billing. Status change will reflect AP invoice for distibution has been paid and message of payment has been sent to AC.
| AP198 |
AH2-AC-UPD-DATEAC_UPD_DATE | Numeric 8 (yyyymmdd) | Last Ac distribtion record status change date. | AP198 |
AH2-AC-UPD-TIMEAC_UPD_TIME | Numeric 6 (hhmmss) | Last AC distribution record change time. | AP198 |
AH2-DIST-STATUSDIST_STATUS | Derived | — | — |
AH2-DIVERSE-CODEDIVERSE_CODE | Alpha 5 | Diversity Code for Account Payable Vendors | AP198 |
AH2-DISTRIB-ADJDISTRIB_ADJ | Numeric 1 | Identifies distribution as one that was created from AP30.2 Distribution Adjustments. If created in AP30.2 form value equal to '1'. Used to determine source code to send to GLTRANS and ACTRANS. | AP198 |
AH2-PULL-FOR-FR-FLPULL_FOR_FR_FL | Alpha 1 | — | — |
AH2-STATEMENTSTATEMENT | Alpha 22 | Used to identify the invoice. | — |
AH2-TXN-NBRTXN_NBR | Alpha 22 | — | — |
AH2-RETAINAGERETAINAGE | Numeric 1 | —
| AP198 |
AH2-PROD-TAX-CATPROD_TAX_CAT | Alpha 15 | — | AP198 |
Indexes (6)
Keys marked * are descending. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.
| Index | Keys | Flags | Condition | Used in |
|---|---|---|---|---|
AH2SET1 | API-OBJ-ID, DIST-SEQ-NBR | Primary | AP115, AP136, AP180, AP181, AP190, AP232, AP28.1, AP28.2 +3 more | |
AH2SET2 | COMPANY, STATEMENT, TXN-NBR, API-OBJ-ID, DIST-SEQ-NBR | Subset | Where (PO-NUMBER = Spaces) | — |
AH2SET4 | DIST-COMPANY, DIS-ACCT-UNIT, DIS-ACCOUNT, DIS-SUB-ACCT, DISTRIB-DATE, API-OBJ-ID, DIST-SEQ-NBR | KeyChange | AP275 | |
AH2SET5 | GLT-OBJ-ID, API-OBJ-ID, DIST-SEQ-NBR | KeyChange, Subset | Where GLT-OBJ-ID != Zeroes | — |
AH2SET6 | DST-OBJ-ID | KeyChange, Subset | Where DST-OBJ-ID != Zeroes | — |
AH2SET9 | ATN-OBJ-ID, COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, DIST-SEQ-NBR | KeyChange, Subset | Where ATN-OBJ-ID != Zeroes | — |
Relations
One to one (10) — lookups and parents
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Actrans | ACTRANS | Not Required | AH2-ATN-OBJ-ID → ATN-OBJ-ID (ATNSET12) | |
| Apapihist | APAPIHIST | Required | AH2-COMPANY → AH1-COMPANY, AH2-VENDOR → AH1-VENDOR, AH2-INVOICE → AH1-INVOICE, AH2-SUFFIX → AH1-SUFFIX, AH2-CANCEL-SEQ → AH1-CANCEL-SEQ | |
| Apcompany | APCOMPANY | Required | AH2-COMPANY → CPY-COMPANY | |
| Apuavhist | APUAVHIST | Not Required | "D" → AH5-SEG-TYPE, AH2-API-OBJ-ID → AH5-API-OBJ-ID, AH2-DIST-SEQ-NBR → AH5-DIST-SEQ-NBR | |
| Apvenmast | APVENMAST | Required | CPY-VENDOR-GROUP → VEN-VENDOR-GROUP, AH2-VENDOR → VEN-VENDOR | |
| Asset | APAPSHIST | Not Required | AH2-API-OBJ-ID → AH4-API-OBJ-ID, AH2-DIST-SEQ-NBR → AH4-DIST-SEQ-NBR | |
| Dstusrfld | APDFLHIST | Not Required | AH2-API-OBJ-ID → AH7-API-OBJ-ID, AH2-DIST-SEQ-NBR → AH7-DIST-SEQ-NBR | |
| Glmaster | GLMASTER | Required | AH2-DIST-COMPANY → GLM-COMPANY, AH2-DIS-ACCT-UNIT → GLM-ACCT-UNIT, AH2-DIS-ACCOUNT → GLM-ACCOUNT, AH2-DIS-SUB-ACCT → GLM-SUB-ACCOUNT | |
| Glsystem Orig | GLSYSTEM | Required | AH2-COMPANY → GLS-COMPANY | |
| Glsystem To | GLSYSTEM | Required | AH2-DIST-COMPANY → GLS-COMPANY |
One to many (1) — child tables
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Apdistpay | APDISTPAY | AH2-COMPANY → DTY-COMPANY, AH2-VENDOR → DTY-VENDOR, AH2-INVOICE → DTY-INVOICE, AH2-SUFFIX → DTY-SUFFIX, AH2-DIST-SEQ-NBR → DTY-DIST-SEQ-NBR, → DTY-LINE-NBR, → DTY-MAD-SEQ-NBR, → DTY-PMT-SEQ-NBR |
Programs
Updated by (10)
- AP115 Vendor Merge
- AP180 Bill of Exchange Cashing Update
- AP181 Bill of Exchange Statement Update
- AP190 Invoice Reinstatement
- AP198 Invoice Data Archival
- AP28.1 Bill of Exchange Acceptance by Vendor
- AP28.2 Bill of Exchange Acceptance by Date
- AP300 Invoice and Vendor History Purge
- AP305 Accounts Payable Company Purge
- AP45.1 Reportable Income Adjustment