M3 Reference
APS200
InteractiveAccounts payable display — the inquiry over the FPLEDG supplier transactions
Tables vs APIs
This program works over the tables below. For analytics at scale, land the raw tables — the SQL further down reads them directly, joined on their keys and CONO. When to land tables vs call MI APIs
Boilerplate SQL
Databricks SQLStarting point for reading the tables behind APS200 from landed data — the backing tables joined on their keys and CONO. Set your Unity Catalog location, company, and filter values below.
Query parameters
3 parameters not filled: <catalog>, <schema>, <company>
-- ============================================================
-- Program: APS200 — Accounts payable display — the inquiry over the FPLEDG supplier transactions
-- Purpose: Read the tables behind program APS200 — auto-generated from program-table-map
-- Grain : One row per FPLEDG record
-- Tables : FPLEDG
-- Notes : Auto-generated skeleton for a prefixed physical M3 schema or a landing schema normalized to the prefixed names in this catalog. Raw Data Lake property names vary with the published object: map them through Data Catalog before running this SQL. Dates are numeric YYYYMMDD (0 = none, mapped to NULL); all curated status values are decoded inline; company-partitioned tables are joined on CONO to prevent cross-company fan-out. Audit columns (RGDT/RGTM/LMDT/CHNO/CHID) omitted — see the quirks guide.
-- ============================================================
SELECT
h.EPCONO AS "Company",
h.EPDIVI AS "Division",
h.EPYEA4 AS "Fiscal year",
h.EPVSER AS "Voucher number series",
h.EPVONO AS "Voucher number — the join back to the general ledger",
h.EPSUNO AS "Supplier the transaction belongs to",
h.EPCUAM AS "Amount in transaction currency, signed"
FROM <catalog>.<schema>.FPLEDG h
WHERE
h.EPCONO = <company>
ORDER BY h.EPYEA4;