WOR1 table in SAP Business One (Production Order (component rows))

WOR1 is the SAP Business One table that stores the rows of a production order: each component, resource or text line with its base quantity, planned quantity, issued quantity, issue method and warehouse. It has no header data of its own, so you join it to OWOR on DocEntry.

WOR1 key fields

FieldWhat it holds
DocEntryKey of the production order. Joins to OWOR.DocEntry.
LineNumRow number. DocEntry + LineNum is the primary key.
VisOrderVisual order, the row position on the screen. DocEntry + VisOrder is also unique.
ItemCode / ItemNameComponent (or resource) code and description.
ItemType4 = item, 290 = resource, -18 = text line.
BaseQtyQuantity of the component per unit of the product.
PlannedQtyPlanned quantity of the component for the whole order.
IssuedQtyQuantity issued to production so far.
IssueTypeM = manual, B = backflush.
wareHouseWarehouse the component is issued from (spelled with a lower-case w). Joins to OWHS.WhsCode.
StageIdRouting stage of the row, when stages are used.

How WOR1 relates to other tables

WOR1 is the row table of OWOR. Each row belongs to one production order through DocEntry. The product, order status and due date are on OWOR, so most WOR1 queries join OWOR to filter released orders. Rows can be items, resources or text (ItemType), so filter ItemType = 4 when you only want materials.

Common joins

  • WOR1 T1 INNER JOIN OWOR T0 ON T1.DocEntry = T0.DocEntry (header)
  • WOR1 T1 LEFT JOIN OITM T2 ON T1.ItemCode = T2.ItemCode (component master)
  • WOR1 T1 LEFT JOIN OWHS T3 ON T1.wareHouse = T3.WhsCode (issue warehouse)

When you use the WOR1 table

Use WOR1 for material requirement lists of released orders, components still to issue, shortages against OITW stock, and planned vs. issued material checks after an order is closed.

Example query: components still to issue on released production orders

SQL Server

SELECT T0.DocNum, T0.ItemCode AS Product, T1.ItemCode AS Component, T1.ItemName,
  T1.PlannedQty, T1.IssuedQty, T1.PlannedQty - T1.IssuedQty AS ToIssue,
  T1.IssueType, T1.wareHouse
FROM OWOR T0
INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.Status = 'R' AND T1.ItemType = 4 AND T1.PlannedQty > T1.IssuedQty
ORDER BY T0.DocNum, T1.VisOrder

SAP HANA (column names in double quotes)

SELECT T0."DocNum", T0."ItemCode" AS "Product", T1."ItemCode" AS "Component", T1."ItemName",
  T1."PlannedQty", T1."IssuedQty", T1."PlannedQty" - T1."IssuedQty" AS "ToIssue",
  T1."IssueType", T1."wareHouse"
FROM OWOR T0
INNER JOIN WOR1 T1 ON T0."DocEntry" = T1."DocEntry"
WHERE T0."Status" = 'R' AND T1."ItemType" = 4 AND T1."PlannedQty" > T1."IssuedQty"
ORDER BY T0."DocNum", T1."VisOrder"

Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.

Common pitfall: Resources and text rows in a material list

WOR1 also holds resource rows (ItemType 290) and text rows (ItemType -18). A material or shortage report that reads every WOR1 row mixes machine or labour time with stock items. Filter ItemType = 4 for materials, and order by VisOrder, not LineNum, when the list should follow the screen.

Questions about the WOR1 table

What is the difference between LineNum and VisOrder in WOR1?

LineNum is the row number in the primary key (DocEntry + LineNum). VisOrder is the visual order, the position of the row on the screen, and is also unique per order. Join on LineNum; sort by VisOrder when the result should match the row order users see.

What is the difference between BaseQty and PlannedQty?

BaseQty is the component quantity per unit of the product. PlannedQty is the quantity planned for the whole production order.

What do the IssueType values in WOR1 mean?

M is manual issue and B is backflush. With manual issue, components are issued to the order with an issue for production document; with backflush, SAP issues them automatically when the finished product is received.

Related tables

OWOR (Production Order (header)) · OITM (Items (item master data)) · OITW (Item stock per warehouse) · OWHS (Warehouses) · search all SAP Business One tables

Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal.

Ready to get started?

Tell us what you need. You get a clear technical answer, a fixed scope and a price, usually within 24 hours.