F4201
transactionAlso in JDE WorldSales order header — one row per order carrying customer, dates, totals, and shipping terms
The full document key is KCOO + DOCO + DCTO — order numbers are reused across companies and order types, so the rendered DOCO-only joins to F4211/F42119 are the DOCO leg only; match company and type too. See the document-key quirk.
What the badges mean
- Superseded
- Superseded — a newer table has replaced it, but older scripts still read this one.
- Also in JDE World
- Also present in JDE World A9.x on the same table name.
- master
- Data class: what the table holds — master data, transaction documents, control/setup values, history, or a workfile.
- Read/write access
- Access mode: how the paired program reads or writes this table — R (read), W (write), or R/W (both).
Fields
42 fields · 3 key
42 fields.
| Key | Field | Alias | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Primary key | SHKCOO | KCOO | Order key company - disambiguates order numbers across companies | String | 5 | |
| Primary key | SHDOCO | DOCO | Order number | Numeric | 8 | |
| Primary key | SHDCTO | DCTO | Order type code (SO, ST, CO, ...) | String | 2 | |
| SHSFXO | SFXO | Order suffix, used to split partial shipments/invoices | String | 3 | ||
| SHMCU | MCU | Business unit / branch plant (right-justified, space-padded to 12) | String | 12 | ||
| SHCO | CO | Company the transaction belongs to | String | 5 | ||
| SHOORN | OORN | Original order number when this order was generated from another | String | 8 | ||
| SHOCTO | OCTO | Original order type | String | 2 | ||
| SHAN8 | AN8 | Sold-to customer address book number | Numeric | 8 | ||
| SHSHAN | SHAN | Ship-to address book number | Numeric | 8 | ||
| SHPA8 | PA8 | Parent address book number | Numeric | 8 | ||
| SHITAN | ITAN | Invoice-to address book number | Numeric | 8 | ||
| SHDVAN | DVAN | Deliver-to address book number | Numeric | 8 | ||
| SHTRDJ | TRDJ | Order/transaction date | Numeric (DD type: Date) | 6 | ||
| SHDRQJ | DRQJ | Date the customer requested the goods | Numeric (DD type: Date) | 6 | ||
| SHRQSJ | RQSJ | Requested ship date | Numeric (DD type: Date) | 6 | ||
| SHPDDJ | PDDJ | Scheduled pick date | Numeric (DD type: Date) | 6 | ||
| SHOPDJ | OPDJ | Original promised delivery date, kept for on-time measurement | Numeric (DD type: Date) | 6 | ||
| SHPPDJ | PPDJ | Currently promised ship date | Numeric (DD type: Date) | 6 | ||
| SHADDJ | ADDJ | Actual ship date | Numeric (DD type: Date) | 6 | ||
| SHADLJ | ADLJ | Actual delivery date | Numeric (DD type: Date) | 6 | ||
| SHCNDJ | CNDJ | Date the order or line was canceled | Numeric (DD type: Date) | 6 | ||
| SHVR01 | VR01 | Reference field - commonly holds the customer PO number | String | 25 | ||
| SHVR02 | VR02 | Second reference field | String | 25 | ||
| SHPTC | PTC | Payment terms code | String | 3 | ||
| SHRYIN | RYIN | Payment instrument (check, EFT, credit card, ...) | Character | 1 | ||
| SHASN | ASN | Price and adjustment schedule applied to the order | String | 8 | ||
| SHPRGP | PRGP | Customer pricing group | String | 8 | ||
| SHTRDC | TRDC | Trade discount percent applied to the whole order | Numeric | 7 | ||
| SHTXA1 | TXA1 | Tax rate/area | String | 10 | ||
| SHHOLD | HOLD | Hold code - a value here means the order is blocked | String | 2 | ||
| SHCARS | CARS | Carrier address book number | Numeric | 8 | ||
| SHMOT | MOT | Mode of transport | String | 3 | ||
| SHROUT | ROUT | Delivery route code | String | 3 | ||
| SHFRTH | FRTH | Freight handling code (who pays/arranges freight) | String | 3 | ||
| SHOTOT | OTOT | Order total amount, domestic currency | Numeric | 15 | ||
| SHTOTC | TOTC | Order total cost, domestic currency | Numeric | 15 | ||
| SHCRCD | CRCD | Transaction (from) currency code | String | 3 | ||
| SHCRR | CRR | Currency conversion spot rate; implied decimals vary by setup | Numeric | 15 | ||
| SHFAP | FAP | Order open amount in foreign currency | Numeric | 15 | ||
| SHFCST | FCST | Order total cost in foreign currency | Numeric | 15 | ||
| SHBCRC | BCRC | Base (company) currency code | String | 3 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading F4201 on 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.
7 parameters not filled: <catalog>, <schema_data>, <KCOO>, <DOCO>, <DCTO>, <TRDJ_FROM>, <TRDJ_TO>
-- ============================================================
-- Table : F4201 Sales order header — one row per order carrying customer, dates, totals, and shipping terms
-- Purpose: Column-selected read of F4201 — auto-generated from field metadata
-- Grain : One row per SHKCOO + SHDOCO + SHDCTO
-- 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.SHKCOO AS "Order key company - disambiguates order numbers across companies",
h.SHDOCO AS "Order number",
h.SHDCTO AS "Order type code (SO, ST, CO, ...)",
h.SHSFXO AS "Order suffix, used to split partial shipments/invoices",
TRIM(h.SHMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)",
h.SHCO AS "Company the transaction belongs to",
h.SHOORN AS "Original order number when this order was generated from another",
h.SHOCTO AS "Original order type",
h.SHAN8 AS "Sold-to customer address book number",
h.SHSHAN AS "Ship-to address book number",
h.SHPA8 AS "Parent address book number",
h.SHITAN AS "Invoice-to address book number",
h.SHDVAN AS "Deliver-to address book number",
CASE WHEN h.SHTRDJ IS NULL OR h.SHTRDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHTRDJ AS INT) DIV 1000, 1, 1), CAST(h.SHTRDJ AS INT) % 1000 - 1) END AS "Order/transaction date", -- CYYDDD Julian → DATE
CASE WHEN h.SHDRQJ IS NULL OR h.SHDRQJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHDRQJ AS INT) DIV 1000, 1, 1), CAST(h.SHDRQJ AS INT) % 1000 - 1) END AS "Date the customer requested the goods", -- CYYDDD Julian → DATE
CASE WHEN h.SHRQSJ IS NULL OR h.SHRQSJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHRQSJ AS INT) DIV 1000, 1, 1), CAST(h.SHRQSJ AS INT) % 1000 - 1) END AS "Requested ship date", -- CYYDDD Julian → DATE
CASE WHEN h.SHPDDJ IS NULL OR h.SHPDDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHPDDJ AS INT) DIV 1000, 1, 1), CAST(h.SHPDDJ AS INT) % 1000 - 1) END AS "Scheduled pick date", -- CYYDDD Julian → DATE
CASE WHEN h.SHOPDJ IS NULL OR h.SHOPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHOPDJ AS INT) DIV 1000, 1, 1), CAST(h.SHOPDJ AS INT) % 1000 - 1) END AS "Original promised delivery date, kept for on-time measurement", -- CYYDDD Julian → DATE
CASE WHEN h.SHPPDJ IS NULL OR h.SHPPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHPPDJ AS INT) DIV 1000, 1, 1), CAST(h.SHPPDJ AS INT) % 1000 - 1) END AS "Currently promised ship date", -- CYYDDD Julian → DATE
CASE WHEN h.SHADDJ IS NULL OR h.SHADDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHADDJ AS INT) DIV 1000, 1, 1), CAST(h.SHADDJ AS INT) % 1000 - 1) END AS "Actual ship date", -- CYYDDD Julian → DATE
CASE WHEN h.SHADLJ IS NULL OR h.SHADLJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHADLJ AS INT) DIV 1000, 1, 1), CAST(h.SHADLJ AS INT) % 1000 - 1) END AS "Actual delivery date", -- CYYDDD Julian → DATE
CASE WHEN h.SHCNDJ IS NULL OR h.SHCNDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.SHCNDJ AS INT) DIV 1000, 1, 1), CAST(h.SHCNDJ AS INT) % 1000 - 1) END AS "Date the order or line was canceled", -- CYYDDD Julian → DATE
h.SHVR01 AS "Reference field - commonly holds the customer PO number",
h.SHVR02 AS "Second reference field",
h.SHPTC AS "Payment terms code",
h.SHRYIN AS "Payment instrument (check, EFT, credit card, ...)",
h.SHASN AS "Price and adjustment schedule applied to the order",
h.SHPRGP AS "Customer pricing group",
h.SHTRDC / POWER(10, 3) AS "Trade discount percent applied to the whole order", -- implied decimals: 3 (verify in F9210)
h.SHTXA1 AS "Tax rate/area",
h.SHHOLD AS "Hold code - a value here means the order is blocked",
h.SHCARS AS "Carrier address book number",
h.SHMOT AS "Mode of transport",
h.SHROUT AS "Delivery route code",
h.SHFRTH AS "Freight handling code (who pays/arranges freight)",
h.SHOTOT / POWER(10, 2) AS "Order total amount, domestic currency", -- implied decimals: 2 (verify in F9210)
h.SHTOTC / POWER(10, 2) AS "Order total cost, domestic currency", -- implied decimals: 2 (verify in F9210)
h.SHCRCD AS "Transaction (from) currency code",
h.SHCRR AS "Currency conversion spot rate; implied decimals vary by setup",
h.SHFAP / POWER(10, 2) AS "Order open amount in foreign currency" -- implied decimals: 2 (verify in F9210)
-- … plus 2 more columns — full list in the Fields section above
FROM <catalog>.<schema_data>.f4201 h
WHERE
h.SHKCOO = '<KCOO>'
-- AND h.SHDOCO = <DOCO>
-- AND h.SHDCTO = '<DCTO>'
-- AND h.SHTRDJ >= <TRDJ_FROM> -- Julian CYYDDD, e.g. 126001
-- AND h.SHTRDJ <= <TRDJ_TO> -- Julian CYYDDD, e.g. 126365
ORDER BY h.SHKCOO;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. UDC decode edges point coded fields at their F0005 lookup.
Programs That Use This Table
R read · W write · R/W read + write
Primary programs
- P4210Sales Order Entry — the interactive application that creates and maintains F4201/F4211 ordersWrite accessInteractive
- R47131EDI Inbound Purchase Order Change Edit/Update — the batch processor that compares staged customer order changes (X12 860) against the open sales order, prints the discrepancy report, and advances or holds the order per its processing options; the change itself is applied in Sales Order Entry (P4210)Read/write accessBatch UBE
Secondary programs
- P4205Shipment Confirmation — confirm that ordered goods have shipped, updating order lines and inventory commitmentsRead/write accessInteractive
- P42117Backorder Release — release backordered sales order lines when inventory becomes availableRead/write accessInteractive
- R42520Pick Slip Print — the batch job that produces warehouse pick documents and commits inventoryRead accessBatch UBE
- R42565Invoice Print — the batch job that generates customer invoices from sales order linesRead accessBatch UBE
- R42995Repost Active Sales Orders — rebuild inventory commitments and open order totals when sales order and item location files disagreeRead/write accessBatch UBE
- R47011EDI Inbound Purchase Order Edit/Create — the batch processor that turns customer purchase orders (X12 850) staged in the EDI interface tables into sales orders, with an audit report and Work Center errors for failed documentsWrite accessBatch UBE
More Sales Order Management tables
- F4209Held orders file - one row per order or line currently or previously on hold, including who released it and when
- F4211Sales order detail — current sales lines, including completed lines retained by the site's purge processing options
- F42119Sales order detail history — eligible lines copied from F4211 by configured sales-update/history purging; same layout as F4211
- F42199Sales order detail ledger - writes a history row every time an F4211 line changes, so each line can appear many times keyed by update date/time