SalesLine
worksheet lineSales order line — one row per order line; the core sell-side transaction, joined to its header by SalesId
What the badges mean
- main
- Table group: how F&O categorizes the table's role — main entity, group/header, transaction, worksheet header, worksheet line, reference, parameter, or framework.
- Shared across companies
- The table carries no
DataAreaId— rows aren’t partitioned per company, so a query never needs (and can’t use) a company filter here (see the quirks guide). - Date-effective
- The table carries a
ValidFrom/ValidToeffectivity window — a join without a date filter multiplies every key by its history (see the quirks guide).
Header & line
SalesLine lines join back to their header SalesTable — and the DataAreaId — so a line never fans out across companies.
Fields
31 fields · 2 key
31 fields.
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | SalesId | SalesId | The sales order this line belongs to | string | 20 | |
| Key | LineNum | LineNum | Line number within the order | real | ||
| ItemId | ItemId | Item ordered on the line | string | 20 | ||
| InventDimId | InventDimId | Inventory-dimension combination the line ships from; join to InventDim to resolve site / warehouse | string | 25 | ||
| SalesStatus | Line status across its life cycle | enum | ||||
| SalesQty | Quantity ordered on the line in the sales unit | real | ||||
| LineAmount | Net line amount in the order currency | real | ||||
| Name | Line description | string | 60 | |||
| ConfirmedDlv | Confirmed delivery date; unset rows carry the 1900-01-01 sentinel | date | ||||
| SalesUnit | Sales unit of measure for the ordered quantity | string | 10 | |||
| SalesPrice | Unit sales price in the order currency | real | ||||
| CurrencyCode | CurrencyCode | Transaction currency of the line (matches the header) | string | 3 | ||
| LineDisc | Line discount amount per price unit | real | ||||
| LinePercent | Line discount percentage | real | ||||
| QtyOrdered | Quantity ordered in the inventory unit | real | ||||
| RemainSalesPhysical | Open (not yet delivered) quantity in the sales unit — the backlog measure | real | ||||
| RemainInventPhysical | Open (not yet delivered) quantity in the inventory unit | real | ||||
| ShippingDateRequested | Requested ship date for the line — the line's primary analysis date | date | ||||
| ShippingDateConfirmed | Confirmed ship date; unset until confirmation, so rows carry the 1900-01-01 sentinel | date | ||||
| ReceiptDateRequested | Requested receipt date for the line; unset rows carry the 1900-01-01 sentinel | date | ||||
| CustAccount | CustAccount | Customer account on the line (copied from the header) | string | 20 | ||
| CustGroup | CustGroupId | Customer group on the line | string | 10 | ||
| TaxGroup | TaxGroup | Sales tax group applied to the line | string | 10 | ||
| TaxItemGroup | Item sales tax group applied to the line | string | 10 | |||
| InventTransId | InventTransId | Inventory transaction reference linking the line to its stock movements via InventTransOrigin | string | 40 | ||
| SalesType | Type of the order the line belongs to (journal, subscription, sales order, returned order…) | enum | ||||
| ItemBOMId | BOM version used when the line explodes into components | string | 20 | |||
| ProjId | Project the line is attached to, for project-invoiced sales | string | 10 | |||
| Blocked | Whether further processing of the line is blocked | enum | ||||
| Complete | Whether the line must be delivered complete (no partial deliveries) | enum | ||||
| DeliveryPostalAddress | RecId | RecId of the line-level ship-to address in LogisticsPostalAddress, when it differs from the header | int64 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading SalesLine on Databricks — enums are decoded, 1900-01-01 dates are wrapped to NULL, and the DataAreaId anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.
6 parameters not filled: <catalog>, <schema>, <company>, <SalesId>, <DATE_FROM>, <DATE_TO>
-- ============================================================
-- Table : SalesLine Sales order line — one row per order line; the core sell-side transaction, joined to its header by SalesId
-- Purpose: Column-selected read of SalesLine — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + SalesId + LineNum
-- Notes : Auto-generated skeleton for Synapse Link / Fabric Link-landed F&O data (lowercase column names). Enums decoded inline where verified; datetimes stored in UTC; 1900-01-01 dates are sentinels mapped to NULL. System/audit columns omitted — see the quirks guide.
-- ============================================================
SELECT
sl.salesid AS "The sales order this line belongs to",
sl.linenum AS "Line number within the order",
sl.itemid AS "Item ordered on the line",
sl.inventdimid AS "Inventory-dimension combination the line ships from; join to InventDim to resolve site / warehouse",
CASE sl.salesstatus WHEN 0 THEN 'None' WHEN 1 THEN 'Backorder' WHEN 2 THEN 'Delivered' WHEN 3 THEN 'Invoiced' WHEN 4 THEN 'Canceled' ELSE CAST(sl.salesstatus AS STRING) END AS "Line status across its life cycle", -- enum: SalesStatus
sl.salesqty AS "Quantity ordered on the line in the sales unit",
sl.lineamount AS "Net line amount in the order currency",
sl.name AS "Line description",
CASE WHEN CAST(sl.confirmeddlv AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(sl.confirmeddlv AS DATE) END AS "Confirmed delivery date; unset rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
sl.salesunit AS "Sales unit of measure for the ordered quantity",
sl.salesprice AS "Unit sales price in the order currency",
sl.currencycode AS "Transaction currency of the line (matches the header)",
sl.linedisc AS "Line discount amount per price unit",
sl.linepercent AS "Line discount percentage",
sl.qtyordered AS "Quantity ordered in the inventory unit",
sl.remainsalesphysical AS "Open (not yet delivered) quantity in the sales unit — the backlog measure",
sl.remaininventphysical AS "Open (not yet delivered) quantity in the inventory unit",
sl.shippingdaterequested AS "Requested ship date for the line — the line's primary analysis date",
CASE WHEN CAST(sl.shippingdateconfirmed AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(sl.shippingdateconfirmed AS DATE) END AS "Confirmed ship date; unset until confirmation, so rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
CASE WHEN CAST(sl.receiptdaterequested AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(sl.receiptdaterequested AS DATE) END AS "Requested receipt date for the line; unset rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
sl.custaccount AS "Customer account on the line (copied from the header)",
sl.custgroup AS "Customer group on the line",
sl.taxgroup AS "Sales tax group applied to the line",
sl.taxitemgroup AS "Item sales tax group applied to the line",
sl.inventtransid AS "Inventory transaction reference linking the line to its stock movements via InventTransOrigin",
sl.salestype AS "Type of the order the line belongs to (journal, subscription, sales order, returned order…)", -- enum: decode sl.salestype via GlobalOptionsetMetadata join — see quirks guide #enums
sl.itembomid AS "BOM version used when the line explodes into components",
sl.projid AS "Project the line is attached to, for project-invoiced sales",
sl.blocked AS "Whether further processing of the line is blocked", -- enum: decode sl.blocked via GlobalOptionsetMetadata join — see quirks guide #enums
sl.complete AS "Whether the line must be delivered complete (no partial deliveries)", -- enum: decode sl.complete via GlobalOptionsetMetadata join — see quirks guide #enums
sl.deliverypostaladdress AS "RecId of the line-level ship-to address in LogisticsPostalAddress, when it differs from the header"
FROM <catalog>.<schema>.salesline sl
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = sl.inventdimid AND id.dataareaid = sl.dataareaid
-- Resolve LogisticsPostalAddress (via DeliveryPostalAddress): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.logisticspostaladdress log ON log.recid = sl.deliverypostaladdress
WHERE
sl.dataareaid = '<company>'
-- AND sl.salesid = '<SalesId>'
-- AND sl.shippingdaterequested >= '<DATE_FROM>' -- yyyy-MM-dd (UTC)
-- AND sl.shippingdaterequested <= '<DATE_TO>' -- yyyy-MM-dd (UTC)
ORDER BY sl.salesid;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. RecId and InventDim edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON salestable.salesid = salesline.salesid AND salestable.dataareaid = salesline.dataareaidON salesline.itemid = inventtable.itemid AND salesline.dataareaid = inventtable.dataareaidON salesline.inventdimid = inventdim.inventdimid AND salesline.dataareaid = inventdim.dataareaidON salesline.deliverypostaladdress = logisticspostaladdress.recid
Data Entities That Expose This Table
More Sales & Marketing tables
- SalesTableSales order header — one row per order carrying customer, status, site, and requested dates
- CustGroupCustomer group master — one row per posting/reporting group of customers, carrying default payment terms and the settle-period used to derive due dates
- CustInvoiceJourPosted customer invoice header — one row per invoice issued from a sales order (or free-text posting), with totals, currency, due date, and the ledger voucher it posted under
- CustInvoiceTransPosted customer invoice line — one row per invoiced line with item, quantity, price, and amounts; the revenue-by-item grain of order-to-cash analytics
- CustPackingSlipJourPosted packing-slip header — one row per shipment document posted against a sales order, with delivery date, ship-to address reference, and carrier details
- CustTableCustomer master — one row per customer account, with the RecId links to its global-address-book party and its default financial dimensions