APDISCACC – Discount
- System
- Accounts Payable (AP)
- Prefix
DSK- Primary key
COMPANY,VENDOR,INVOICE,SUFFIX,CANCEL-SEQ,SEQ-NBR,VOID-SEQ,DISC-TYPE- Fields
- 19
- Updated by
- 16 programs
- Referenced by
- 3 programs
APDISCACC is the Discount table in Lawson Accounts Payable (prefix DSK). It is indexed by COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ, DISC-TYPE (DSKSET1); alternate indexes: DSKSET2 and DSKSET3. It is related 1:1 to APINVOICE and APPAYMENT. It is updated by AP115, AP176, AP177, AP180, AP181, AP190, AP195, AP198 and 8 more and referenced by AP136, AP232 and MA01.1. The table has 19 fields, 3 indexes and 2 documented relations.
About APDISCACC
The Accounts Payable Discount
Fields (19)
Column = COBOL field name without the DSK- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored.
| Field / column | Type | Description & values | Updated by |
|---|---|---|---|
DSK-COMPANY PKCOMPANY | 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. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-VENDOR PKVENDOR | Alpha 9 (Right Justified) | The vendor's identification code. | AP115, AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-INVOICE PKINVOICE | Alpha 22 | Invoice number. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-SUFFIX PKSUFFIX | Numeric 3 | The invoice suffix. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1, MA70.1 +1 more |
DSK-CANCEL-SEQ PKCANCEL_SEQ | Numeric 4 | An automatically assigned sequence number. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-SEQ-NBR PKSEQ_NBR | Numeric 4 | An automatically assigned sequence number. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-VOID-SEQ PKVOID_SEQ | Numeric 4 | The sequence number assigned to voided payments. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-POST-DATEPOST_DATE | Numeric 8 (yyyymmdd) | The date general ledger entries for the transaction will be posted to the general ledger. | AP180, AP181, AP190, AP195, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-TRAN-DISC-AMTTRAN_DISC_AMT | Signed 18.2 | The discount amount in the currency of the transaction. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-BASE-DISC-AMTBASE_DISC_AMT | Signed 18.2 | The discount amount in company base currency. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-PROCESS-LEVELPROCESS_LEVEL | Alpha 5 | This field contains the process level, which is the reporting hierarchy below company. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-DISC-TYPE PKDISC_TYPE | Alpha 1 | Indicates the discount type. Valid values are:
| AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-STATUSSTATUS | Numeric 1 | The transaction status. Valid values are:
| AP176, AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 +2 more |
DSK-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. | AP176, AP180, AP181, AP190, AP28.1, AP28.2, AP45.1, APDS.1 |
DSK-JRNL-BOOK-NBRJRNL_BOOK_NBR | Alpha 12 | The journal book assigned to the transaction. | AP180, AP181, AP190, AP28.1, AP28.2, AP45.1 |
DSK-API-OBJ-IDAPI_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. | — |
DSK-TRAN-BASE-NDTRAN_BASE_ND | Numeric 1 | The number of decimals assigned to a particular account as determined by the account currency. | — |
DSK-PROC-LEVELPROC_LEVEL | Alpha 5 | This field contains the process level, which is the reporting hierarchy below company. | — |
DSK-PULL-FOR-FR-FLPULL_FOR_FR_FL | Alpha 1 | — | AP176, AP177 |
Indexes (3)
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 |
|---|---|---|---|---|
DSKSET1 | COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ, DISC-TYPE | Primary | AP115, AP136, AP176, AP190, AP195, AP198, AP232, AP300 +4 more | |
DSKSET2 | STATUS, COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ | KeyChange | AP176, AP195, MA01.1 | |
DSKSET3 | COMPANY, VENDOR, INVOICE, SUFFIX, CANCEL-SEQ, SEQ-NBR, VOID-SEQ, DISC-TYPE | Subset | Where (PULL-FOR-FR-FL = "Y") | AP177 |
Relations
One to one (2) — lookups and parents
| Relation | Table | Rules | Condition | Field map |
|---|---|---|---|---|
| Apinvoice | APINVOICE | Required | DSK-COMPANY → API-COMPANY, DSK-VENDOR → API-VENDOR, DSK-INVOICE → API-INVOICE, DSK-SUFFIX → API-SUFFIX, DSK-CANCEL-SEQ → API-CANCEL-SEQ | |
| Appayment | APPAYMENT | Not Required | DSK-COMPANY → APP-COMPANY, DSK-VENDOR → APP-VENDOR, DSK-INVOICE → APP-INVOICE, DSK-SUFFIX → APP-SUFFIX, DSK-CANCEL-SEQ → APP-CANCEL-SEQ, DSK-SEQ-NBR → APP-SEQ-NBR, DSK-VOID-SEQ → APP-VOID-SEQ |
Programs
Updated by (16)
- AP115 Vendor Merge
- AP176 Match Discount Accrual
- AP177 Financial Reporting Update
- AP180 Bill of Exchange Cashing Update
- AP181 Bill of Exchange Statement Update
- AP190 Invoice Reinstatement
- AP195 Period Closing
- 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
- APDS.1 Call program for APDISCTKN
- MA70.1 Invoice Unmatch
- MA75.1 PO Invoice Cancel