JDE Reference
F4201
transactionAlso in JDE WorldSales order header — one row per order carrying customer, dates, totals, and shipping terms
Module: 42 · Sales Order ManagementColumn prefix: SH
Fields
42 fields · 3 key
| 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 | 6 | ||
| SHDRQJ | DRQJ | Date the customer requested the goods | Numeric | 6 | ||
| SHRQSJ | RQSJ | Requested ship date | Numeric | 6 | ||
| SHPDDJ | PDDJ | Scheduled pick date | Numeric | 6 | ||
| SHOPDJ | OPDJ | Original promised delivery date, kept for on-time measurement | Numeric | 6 | ||
| SHPPDJ | PPDJ | Currently promised ship date | Numeric | 6 | ||
| SHADDJ | ADDJ | Actual ship date | Numeric | 6 | ||
| SHADLJ | ADLJ | Actual delivery date | Numeric | 6 | ||
| SHCNDJ | CNDJ | Date the order or line was canceled | Numeric | 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 F4201on 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 : 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;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.
Programs That Use This Table
Primary programs
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