OWTR table in SAP Business One (Inventory Transfer (header))
OWTR is the SAP Business One table that stores the header of every inventory transfer, the document that moves stock between warehouses. Its object type is 67. The rows, with item, quantity, from warehouse (FromWhsCod) and to warehouse (WhsCode), are in WTR1, joined on DocEntry.
OWTR key fields
| Field | What it holds |
|---|---|
DocEntry | Internal key. Joins to WTR1.DocEntry. |
DocNum | Transfer number users see. |
DocDate | Posting date. |
ToWhsCode | To warehouse code (header default). Joins to OWHS.WhsCode. |
CANCELED | Y = cancelled, N = not cancelled. |
DocStatus | O = open, C = closed. |
CardCode / CardName | Business partner, if one is entered. Joins to OCRD.CardCode. |
Comments / JrnlMemo | Remarks and journal remarks. |
TransId | Journal entry created by the transfer. Joins to OJDT.TransId. |
UserSign | User who created it. Joins to OUSR. |
ObjType | Object type, 67 = inventory transfer. |
How OWTR relates to other tables
OWTR is the header and WTR1 holds one row per item moved. Each row has its own FromWhsCod and WhsCode, so the warehouses can differ by row. When a transfer is copied from a transfer request, WTR1.BaseType is 1250000001 and WTR1.BaseEntry points to OWTQ.DocEntry.
Common joins
OWTR T0 INNER JOIN WTR1 T1 ON T1.DocEntry = T0.DocEntry (rows)WTR1 T1 INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode (item master)WTR1 T1 LEFT JOIN OWTQ T3 ON T3.DocEntry = T1.BaseEntry AND T1.BaseType = 1250000001 (source transfer request)OWTR T0 LEFT JOIN OJDT T4 ON T4.TransId = T0.TransId (journal entry)
When you use the OWTR table
Use OWTR with WTR1 to list stock moved between warehouses in a period, to audit transfers per user, to check which transfer requests were fulfilled and to explain warehouse stock differences together with OINM.
Example query: inventory transfers of the last 30 days, per row
SQL Server
SELECT T0.DocNum, T0.DocDate, T1.ItemCode, T1.Dscription, T1.FromWhsCod, T1.WhsCode AS ToWhs, T1.Quantity FROM OWTR T0 INNER JOIN WTR1 T1 ON T1.DocEntry = T0.DocEntry WHERE T0.CANCELED = 'N' AND DATEDIFF(day, T0.DocDate, GETDATE()) <= 30 ORDER BY T0.DocDate DESC, T0.DocNum
SAP HANA (column names in double quotes)
SELECT T0."DocNum", T0."DocDate", T1."ItemCode", T1."Dscription", T1."FromWhsCod", T1."WhsCode" AS "ToWhs", T1."Quantity" FROM OWTR T0 INNER JOIN WTR1 T1 ON T1."DocEntry" = T0."DocEntry" WHERE T0."CANCELED" = 'N' AND DAYS_BETWEEN(T0."DocDate", CURRENT_TIMESTAMP) <= 30 ORDER BY T0."DocDate" DESC, 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: Taking the warehouses from the header only
The header has ToWhsCode, but every WTR1 row carries its own FromWhsCod and WhsCode, and they can differ from the header. Report warehouses from WTR1. Also filter CANCELED = 'N', or cancelled transfers count twice. See OINM table (warehouse journal).
Ready-made queries that use OWTR
- Stock by warehouse: On hand, committed, ordered and available quantity per item and warehouse.
Questions about the OWTR table
What is the object type of an inventory transfer in SAP B1?
67. OWTR.ObjType and WTR1.ObjType default to 67.
Where are the from and to warehouses of a transfer?
On the rows: WTR1.FromWhsCod is the from warehouse and WTR1.WhsCode the to warehouse. OWTR.ToWhsCode is the header to warehouse.
How do I find the transfer request a transfer came from?
WTR1.BaseType = 1250000001 and WTR1.BaseEntry = OWTQ.DocEntry.
Related tables
WTR1 (Inventory Transfer (rows)) · OWTQ (Inventory Transfer Request (header)) · OINM (Warehouse Journal (inventory audit)) · 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.
