Skip to content
JDE Reference

F4211

transactionAlso in JDE World

Sales order detail — one row per order line; the core sales transaction table

Open + closed sales

At sales update, finished lines move out of F4211 into its history table F42119. To see all sales — open and closed — query F4211 UNION F42119. See the sales-history pattern →

Fields

47 fields · 4 key

KeyFieldAliasDescriptionTypeLengthFlags
Primary keySDKCOOKCOOOrder key company - disambiguates order numbers across companiesString5
Primary keySDDOCODOCOOrder numberNumeric8
Primary keySDDCTODCTOOrder type code (SO, ST, CO, ...)String2
Primary keySDLNIDLNIDOrder line number, stored x1000 (3 implied decimals)Numeric6
SDSFXOSFXOOrder suffix, used to split partial shipments/invoicesString3
SDMCUMCUBusiness unit / branch plant (right-justified, space-padded to 12)String12
SDCOCOCompany the transaction belongs toString5
SDEMCUEMCUHeader branch plant of the order (right-justified, space-padded)String12
SDOORNOORNOriginal order number when this order was generated from anotherString8
SDOCTOOCTOOriginal order typeString2
SDRORNRORNRelated order number (e.g. transfer or work order)String8
SDAN8AN8Sold-to customer address book numberNumeric8
SDSHANSHANShip-to address book numberNumeric8
SDITMITMShort item number - the internal numeric item keyNumeric8
SDLITMLITMSecond item number - the primary user-facing item codeString25
SDAITMAITMThird item number - catalog or cross-reference item codeString25
SDLOCNLOCNStorage location within the branch plantString20
SDLOTNLOTNLot or serial numberString30
SDDSC1DSC1Description line 1String30
SDLNTYLNTYLine type controlling inventory/GL/AR interfaces (S, N, F, ...)String2
SDLTTRLTTRLast status the line has reached in the order activity flowString3
SDNXTRNXTRNext expected status in the order activity flowString3
SDTRDJTRDJOrder/transaction dateNumeric6
SDDRQJDRQJDate the customer requested the goodsNumeric6
SDPDDJPDDJScheduled pick dateNumeric6
SDOPDJOPDJOriginal promised delivery date, kept for on-time measurementNumeric6
SDPPDJPPDJCurrently promised ship dateNumeric6
SDADDJADDJActual ship dateNumeric6
SDIVDIVDInvoice dateNumeric6
SDCNDJCNDJDate the order or line was canceledNumeric6
SDDGLDGLGeneral ledger date the transaction posts toNumeric6
SDUOMUOMUnit of measure the transaction was entered inString2
SDUORGUORGQuantity ordered, in transaction UOMNumeric15
SDSOQSSOQSQuantity shippedNumeric15
SDSOBKSOBKQuantity backordered or on holdNumeric15
SDSOCNSOCNQuantity canceledNumeric15
SDAOPNAOPNOpen amount not yet shipped/invoicedNumeric15
SDUPRCUPRCUnit price in domestic currency (4 implied decimals)Numeric15
SDAEXPAEXPExtended price in domestic currencyNumeric15
SDUNCSUNCSUnit cost (4 implied decimals)Numeric15
SDECSTECSTExtended cost in domestic currencyNumeric15
SDCRCDCRCDTransaction (from) currency codeString3
SDCRRCRRCurrency conversion spot rate; implied decimals vary by setupNumeric15
SDFUPFUPUnit price in foreign (transaction) currencyNumeric15
SDFEAFEAExtended price in foreign currencyNumeric15
SDVR01VR01Reference field - commonly holds the customer PO numberString25
SDGLCGLCG/L offset class the AAIs use to derive revenue/COGS accountsString4

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading F4211on 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  : F4211 Sales order detail — one row per order line; the core sales transaction table
-- Purpose: Column-selected read of F4211 — auto-generated from field metadata
-- Grain  : One row per SDKCOO + SDDOCO + SDDCTO + SDLNID
-- 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
  d.SDKCOO AS "Order key company - disambiguates order numbers across companies",
  d.SDDOCO AS "Order number",
  d.SDDCTO AS "Order type code (SO, ST, CO, ...)",
  d.SDLNID / POWER(10, 3) AS "Order line number, stored x1000 (3 implied decimals)",  -- implied decimals: 3 (verify in F9210)
  d.SDSFXO AS "Order suffix, used to split partial shipments/invoices",
  TRIM(d.SDMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)",
  d.SDCO AS "Company the transaction belongs to",
  TRIM(d.SDEMCU) AS "Header branch plant of the order (right-justified, space-padded)",
  d.SDOORN AS "Original order number when this order was generated from another",
  d.SDOCTO AS "Original order type",
  d.SDRORN AS "Related order number (e.g. transfer or work order)",
  d.SDAN8 AS "Sold-to customer address book number",
  d.SDSHAN AS "Ship-to address book number",
  d.SDITM AS "Short item number - the internal numeric item key",
  d.SDLITM AS "Second item number - the primary user-facing item code",
  d.SDAITM AS "Third item number - catalog or cross-reference item code",
  d.SDLOCN AS "Storage location within the branch plant",
  d.SDLOTN AS "Lot or serial number",
  d.SDDSC1 AS "Description line 1",
  d.SDLNTY AS "Line type controlling inventory/GL/AR interfaces (S, N, F, ...)",
  d.SDLTTR AS "Last status the line has reached in the order activity flow",
  d.SDNXTR AS "Next expected status in the order activity flow",
  CASE WHEN d.SDTRDJ IS NULL OR d.SDTRDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDTRDJ AS INT) DIV 1000, 1, 1), CAST(d.SDTRDJ AS INT) % 1000 - 1) END AS "Order/transaction date",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDDRQJ IS NULL OR d.SDDRQJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDDRQJ AS INT) DIV 1000, 1, 1), CAST(d.SDDRQJ AS INT) % 1000 - 1) END AS "Date the customer requested the goods",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDPDDJ IS NULL OR d.SDPDDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDPDDJ AS INT) DIV 1000, 1, 1), CAST(d.SDPDDJ AS INT) % 1000 - 1) END AS "Scheduled pick date",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDOPDJ IS NULL OR d.SDOPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDOPDJ AS INT) DIV 1000, 1, 1), CAST(d.SDOPDJ AS INT) % 1000 - 1) END AS "Original promised delivery date, kept for on-time measurement",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDPPDJ IS NULL OR d.SDPPDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDPPDJ AS INT) DIV 1000, 1, 1), CAST(d.SDPPDJ AS INT) % 1000 - 1) END AS "Currently promised ship date",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDADDJ IS NULL OR d.SDADDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDADDJ AS INT) DIV 1000, 1, 1), CAST(d.SDADDJ AS INT) % 1000 - 1) END AS "Actual ship date",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDIVD IS NULL OR d.SDIVD = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDIVD AS INT) DIV 1000, 1, 1), CAST(d.SDIVD AS INT) % 1000 - 1) END AS "Invoice date",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDCNDJ IS NULL OR d.SDCNDJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDCNDJ AS INT) DIV 1000, 1, 1), CAST(d.SDCNDJ AS INT) % 1000 - 1) END AS "Date the order or line was canceled",  -- CYYDDD Julian → DATE
  CASE WHEN d.SDDGL IS NULL OR d.SDDGL = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(d.SDDGL AS INT) DIV 1000, 1, 1), CAST(d.SDDGL AS INT) % 1000 - 1) END AS "General ledger date the transaction posts to",  -- CYYDDD Julian → DATE
  d.SDUOM AS "Unit of measure the transaction was entered in",
  d.SDUORG AS "Quantity ordered, in transaction UOM",
  d.SDSOQS AS "Quantity shipped",
  d.SDSOBK AS "Quantity backordered or on hold",
  d.SDSOCN AS "Quantity canceled",
  d.SDAOPN / POWER(10, 2) AS "Open amount not yet shipped/invoiced",  -- implied decimals: 2 (verify in F9210)
  d.SDUPRC / POWER(10, 4) AS "Unit price in domestic currency (4 implied decimals)",  -- implied decimals: 4 (verify in F9210)
  d.SDAEXP / POWER(10, 2) AS "Extended price in domestic currency",  -- implied decimals: 2 (verify in F9210)
  d.SDUNCS / POWER(10, 4) AS "Unit cost (4 implied decimals)"  -- implied decimals: 4 (verify in F9210)
  -- … plus 7 more columns — full list in the Fields section above
FROM <catalog>.<schema_data>.f4211 d
WHERE
  d.SDKCOO = '<KCOO>'
  -- AND d.SDDOCO = <DOCO>
  -- AND d.SDDCTO = '<DCTO>'
  -- AND d.SDTRDJ >= <TRDJ_FROM>  -- Julian CYYDDD, e.g. 126001
  -- AND d.SDTRDJ <= <TRDJ_TO>  -- Julian CYYDDD, e.g. 126365
ORDER BY d.SDKCOO;

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.

Join details

  • F4201F4211header detail · 1:N
    ON f4201.SHDOCO = f4211.SDDOCO
  • F4211F42119history · 1:1
    ON f4211.SDDOCO = f42119.SDDOCO
  • F4211F0101foreign key · N:1
    ON f4211.SDAN8 = f0101.ABAN8
  • F4211F4101foreign key · N:1
    ON f4211.SDITM = f4101.IMITM
  • F4211F0006foreign key · N:1
    ON f4211.SDMCU = f0006.MCMCU
  • F4211F0005UDC decode · N:1
    ON f4211.SDDCTO = f0005.DRKY
  • F4211F0005UDC decode · N:1
    ON f4211.SDLTTR = f0005.DRKY
  • F4211F0005UDC decode · N:1
    ON f4211.SDNXTR = f0005.DRKY
  • F4211F42199history · 1:N
    ON f4211.SDDOCO = f42199.SLDOCO
  • F4074F4211foreign key · N:1
    ON f4074.ALDOCO = f4211.SDDOCO

Programs That Use This Table