JDE Reference
F4301
transactionAlso in JDE WorldPurchase order header - one row per procurement document carrying supplier, order-level dates, totals, terms, and currency
Module: 43 · ProcurementColumn prefix: PH
Fields
39 fields · 4 key
| Key | Field | Alias | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Primary key | PHKCOO | KCOO | Company that owns the order-number sequence; part of the composite order key | String | 5 | |
| Primary key | PHDOCO | DOCO | Order number | Numeric | 8 | |
| Primary key | PHDCTO | DCTO | Order document type (e.g. OP purchase order, SO sales order) | String | 2 | |
| Primary key | PHSFXO | SFXO | Order suffix distinguishing multiple documents under one order number | String | 3 | |
| PHMCU | MCU | Business unit that owns the order header; right-justified, space-padded to 12 | String | 12 | ||
| PHOKCO | OKCO | Company key of the originating order | String | 5 | ||
| PHOORN | OORN | Order number of the originating document this record came from | String | 8 | ||
| PHOCTO | OCTO | Document type of the originating order | String | 2 | ||
| PHRKCO | RKCO | Company key of the related order | String | 5 | ||
| PHRORN | RORN | Cross-referenced related order number (PO, SO, or work order) | String | 8 | ||
| PHRCTO | RCTO | Document type of the related order | String | 2 | ||
| PHAN8 | AN8 | Supplier address book number | Numeric | 8 | ||
| PHSHAN | SHAN | Ship-to address book number | Numeric | 8 | ||
| PHTRDJ | TRDJ | Order date | Numeric | 6 | ||
| PHDRQJ | DRQJ | Requested date | Numeric | 6 | ||
| PHPDDJ | PDDJ | Scheduled/promised delivery date | Numeric | 6 | ||
| PHOPDJ | OPDJ | Original promised delivery date | Numeric | 6 | ||
| PHADDJ | ADDJ | Actual ship date recorded on the header | Numeric | 6 | ||
| PHCNDJ | CNDJ | Cancel date | Numeric | 6 | ||
| PHPEFJ | PEFJ | Price effective date used for supplier price selection | Numeric | 6 | ||
| PHPPDJ | PPDJ | Promised ship date | Numeric | 6 | ||
| PHHOLD | HOLD | Order hold code | String | 2 | ||
| PHPTC | PTC | Payment terms code | String | 3 | ||
| PHTXA1 | TXA1 | Tax rate/area | String | 10 | ||
| PHEXR1 | EXR1 | Tax explanation code | String | 2 | ||
| PHFRTH | FRTH | Freight handling code | String | 3 | ||
| PHANBY | ANBY | Buyer address book number | Numeric | 8 | ||
| PHANCR | ANCR | Carrier address book number | Numeric | 8 | ||
| PHMOT | MOT | Mode of transport | String | 3 | ||
| PHOTOT | OTOT | Gross total amount of the whole order | Numeric | 15 | ||
| PHCRRM | CRRM | Currency entry mode - order entered in foreign or domestic currency | Character | 1 | ||
| PHCRCD | CRCD | Transaction currency code | String | 3 | ||
| PHCRR | CRR | Currency conversion spot rate; implied decimals vary by setup | Numeric | 15 | ||
| PHFAP | FAP | Open amount in foreign currency | Numeric | 15 | ||
| PHBCRC | BCRC | Base (domestic) currency of the company | String | 3 | ||
| PHORBY | ORBY | User recorded as having placed the order | String | 10 | ||
| PHTKBY | TKBY | User who entered the order | String | 10 | ||
| PHCORD | CORD | Change order sequence number | Numeric | 3 | ||
| PHMATY | MATY | Match type controlling two-way vs three-way voucher match | Character | 1 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading F4301on Databricks — Julian dates, implied decimals, and padded strings are already converted. Set your Unity Catalog location and filter values below; they’re substituted into the SQL and the copy button.
Query parameters
-- ============================================================
-- Table : F4301 Purchase order header - one row per procurement document carrying supplier, order-level dates, totals, terms, and currency
-- Purpose: Column-selected read of F4301 — auto-generated from field metadata
-- Grain : One row per PHKCOO + PHDOCO + PHDCTO + PHSFXO
-- Notes : Auto-generated skeleton. Julian dates (CYYDDD) are converted to DATE and implied-decimal amounts are scaled (verify decimals in F9210); padded business-unit/UDC keys are TRIMmed. Audit columns (…USER/…PID/…UPMJ) are omitted — see the quirks guide. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
h.PHKCOO AS "Company that owns the order-number sequence; part of the composite order key",
h.PHDOCO AS "Order number",
h.PHDCTO AS "Order document type (e.g. OP purchase order, SO sales order)",
h.PHSFXO AS "Order suffix distinguishing multiple documents under one order number",
TRIM(h.PHMCU) AS "Business unit that owns the order header; right-justified, space-padded to 12",
h.PHOKCO AS "Company key of the originating order",
h.PHOORN AS "Order number of the originating document this record came from",
h.PHOCTO AS "Document type of the originating order",
h.PHRKCO AS "Company key of the related order",
h.PHRORN AS "Cross-referenced related order number (PO, SO, or work order)",
h.PHRCTO AS "Document type of the related order",
h.PHAN8 AS "Supplier address book number",
h.PHSHAN AS "Ship-to address book number",
CASE WHEN h.PHTRDJ IS NULL OR h.PHTRDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHTRDJ AS INT) DIV 1000, 1, 1), CAST(h.PHTRDJ AS INT) % 1000 - 1) END AS "Order date", -- CYYDDD Julian → DATE
CASE WHEN h.PHDRQJ IS NULL OR h.PHDRQJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHDRQJ AS INT) DIV 1000, 1, 1), CAST(h.PHDRQJ AS INT) % 1000 - 1) END AS "Requested date", -- CYYDDD Julian → DATE
CASE WHEN h.PHPDDJ IS NULL OR h.PHPDDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHPDDJ AS INT) DIV 1000, 1, 1), CAST(h.PHPDDJ AS INT) % 1000 - 1) END AS "Scheduled/promised delivery date", -- CYYDDD Julian → DATE
CASE WHEN h.PHOPDJ IS NULL OR h.PHOPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHOPDJ AS INT) DIV 1000, 1, 1), CAST(h.PHOPDJ AS INT) % 1000 - 1) END AS "Original promised delivery date", -- CYYDDD Julian → DATE
CASE WHEN h.PHADDJ IS NULL OR h.PHADDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHADDJ AS INT) DIV 1000, 1, 1), CAST(h.PHADDJ AS INT) % 1000 - 1) END AS "Actual ship date recorded on the header", -- CYYDDD Julian → DATE
CASE WHEN h.PHCNDJ IS NULL OR h.PHCNDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHCNDJ AS INT) DIV 1000, 1, 1), CAST(h.PHCNDJ AS INT) % 1000 - 1) END AS "Cancel date", -- CYYDDD Julian → DATE
CASE WHEN h.PHPEFJ IS NULL OR h.PHPEFJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHPEFJ AS INT) DIV 1000, 1, 1), CAST(h.PHPEFJ AS INT) % 1000 - 1) END AS "Price effective date used for supplier price selection", -- CYYDDD Julian → DATE
CASE WHEN h.PHPPDJ IS NULL OR h.PHPPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.PHPPDJ AS INT) DIV 1000, 1, 1), CAST(h.PHPPDJ AS INT) % 1000 - 1) END AS "Promised ship date", -- CYYDDD Julian → DATE
h.PHHOLD AS "Order hold code",
h.PHPTC AS "Payment terms code",
h.PHTXA1 AS "Tax rate/area",
h.PHEXR1 AS "Tax explanation code",
h.PHFRTH AS "Freight handling code",
h.PHANBY AS "Buyer address book number",
h.PHANCR AS "Carrier address book number",
h.PHMOT AS "Mode of transport",
h.PHOTOT / POWER(10, 2) AS "Gross total amount of the whole order", -- implied decimals: 2 (verify in F9210)
h.PHCRRM AS "Currency entry mode - order entered in foreign or domestic currency",
h.PHCRCD AS "Transaction currency code",
h.PHCRR AS "Currency conversion spot rate; implied decimals vary by setup",
h.PHFAP / POWER(10, 2) AS "Open amount in foreign currency", -- implied decimals: 2 (verify in F9210)
h.PHBCRC AS "Base (domestic) currency of the company",
h.PHORBY AS "User recorded as having placed the order",
h.PHTKBY AS "User who entered the order",
h.PHCORD AS "Change order sequence number",
h.PHMATY AS "Match type controlling two-way vs three-way voucher match"
FROM <catalog>.<schema_data>.f4301 h
WHERE
h.PHKCOO = '<KCOO>'
-- AND h.PHDOCO = <DOCO>
-- AND h.PHDCTO = '<DCTO>'
-- AND h.PHTRDJ >= <TRDJ_FROM> -- Julian CYYDDD, e.g. 126001
-- AND h.PHTRDJ <= <TRDJ_TO> -- Julian CYYDDD, e.g. 126365
ORDER BY h.PHKCOO;7 parameters not filled: <catalog>, <schema_data>, <KCOO>, <DOCO>, <DCTO>, <TRDJ_FROM>, <TRDJ_TO>
Relationships
1-hop neighbors — click a table to navigate there. UDC decode edges point coded fields at their F0005 lookup.