OWOR table in SAP Business One (Production Order (header))

OWOR is the SAP Business One table that stores the header of every production order: the product to make, planned, completed and rejected quantities, dates, warehouse, status and origin. Its component rows are in WOR1, joined on DocEntry, and its object type is 202.

OWOR key fields

FieldWhat it holds
DocEntryInternal key. Joins to WOR1.DocEntry.
DocNumProduction order number users see.
ItemCodeProduct to make (Product No.). Related to the bill of materials in OITT.
ProdNameProduct description.
StatusP = planned, R = released, L = closed, C = canceled.
TypeS = standard, P = special, D = disassembly.
PlannedQtyPlanned quantity of the product.
CmpltQtyCompleted quantity received from production.
RjctQtyRejected quantity.
PostDate / StartDate / DueDateOrder date, start date and due date.
WarehouseWarehouse that receives the product. Joins to OWHS.WhsCode.
OriginTypeOrigin of the order: M = manual, R = MRP, S = sales order, P = production order, U = upgrade.
OriginAbs / OriginNumOrigin entry and origin number, for example the sales order the order was created from.
CardCodeCustomer code. Joins to OCRD.CardCode.

How OWOR relates to other tables

OWOR is the header and WOR1 holds the component rows (items, resources and text lines), both sharing DocEntry. The product in OWOR.ItemCode normally has a bill of materials in OITT and ITT1, which SAP copies into WOR1 when you create a standard production order. OriginType, OriginAbs and OriginNum show where the order came from, for example a sales order (S) or an MRP run (R).

Common joins

  • OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry (component rows)
  • OWOR T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode (product master)
  • OWOR T0 LEFT JOIN OWHS T3 ON T0.Warehouse = T3.WhsCode (receiving warehouse)
  • OWOR T0 LEFT JOIN ORDR T4 ON T0.OriginType = 'S' AND T0.OriginAbs = T4.DocEntry (source sales order)

When you use the OWOR table

Use OWOR for open production lists, planned vs. completed reports, late orders (due date passed, not closed) and yield checks with RjctQty. Join WOR1 when you need the materials and how much of each was issued.

To create production orders from code, use the DI API ProductionOrders object (source table OWOR) or the Service Layer, never an INSERT into OWOR. The SDK lists ItemNo (OWOR.ItemCode) and DueDate as the mandatory properties for a new production order. When Add() fails, GetLastError tells you why. See DI API error codes (-5002, -1029, -2028 and more).

Example query: open production orders with remaining quantity

SQL Server

SELECT T0.DocNum, T0.ItemCode, T0.ProdName, T0.Status, T0.Type,
  T0.PlannedQty, T0.CmpltQty, T0.RjctQty, T0.PlannedQty - T0.CmpltQty AS Remaining,
  T0.DueDate, T0.Warehouse
FROM OWOR T0
WHERE T0.Status IN ('P', 'R')
ORDER BY T0.DueDate, T0.DocNum

SAP HANA (column names in double quotes)

SELECT T0."DocNum", T0."ItemCode", T0."ProdName", T0."Status", T0."Type",
  T0."PlannedQty", T0."CmpltQty", T0."RjctQty", T0."PlannedQty" - T0."CmpltQty" AS "Remaining",
  T0."DueDate", T0."Warehouse"
FROM OWOR T0
WHERE T0."Status" IN ('P', 'R')
ORDER BY T0."DueDate", T0."DocNum"

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

Common pitfall: Status L means closed, not "late"

OWOR.Status uses P (planned), R (released), L (closed) and C (canceled). A filter on Status = 'C' to find closed orders returns the canceled ones instead. Use Status = 'L' for closed orders and Status IN ('P', 'R') for open ones, and exclude C from production history so canceled orders do not count.

Questions about the OWOR table

What are the production order status codes in OWOR?

OWOR.Status is P = planned, R = released, L = closed and C = canceled. Open orders are P and R; L is the closed status, not C.

Where are the components of a production order stored?

In WOR1, one row per component, resource or text line, joined to OWOR on DocEntry. WOR1.PlannedQty is the planned quantity of each component and IssuedQty what has been issued so far.

Which fields are mandatory to add a production order with the DI API?

The SAP B1 SDK lists ItemNo (the product, stored in OWOR.ItemCode) and DueDate as the mandatory properties for a new production order in the ProductionOrders object.

Related tables

WOR1 (Production Order (component rows)) · OITM (Items (item master data)) · OWHS (Warehouses) · ORDR (Sales Order (header)) · 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.