OWTQ table in SAP Business One (Inventory Transfer Request (header))

OWTQ is the SAP Business One table that stores the header of every inventory transfer request, the document that asks for stock to be moved before the transfer is posted. Its object type is 1250000001. The rows are in WTQ1, joined on DocEntry, and the transfers made from it are in OWTR.

OWTQ key fields

FieldWhat it holds
DocEntryInternal key. Joins to WTQ1.DocEntry.
DocNumRequest number users see.
DocDate / DocDueDatePosting date and due date.
ReqDateRequired date.
ToWhsCodeTo warehouse code. Joins to OWHS.WhsCode.
DocStatusO = open, C = closed.
CANCELEDY = cancelled, N = not cancelled.
Requester / ReqNameUser requesting the goods and their name.
ReqType12 = user, 171 = employee.
WTQ1.OpenQtyRemaining open quantity on the request row.
ObjTypeObject type, 1250000001 = inventory transfer request.

How OWTQ relates to other tables

OWTQ is the header and WTQ1 holds the rows, with FromWhsCod, WhsCode and OpenQty. When a row is copied to an inventory transfer, WTQ1.TargetType is 67, and the transfer row points back with WTR1.BaseType = 1250000001 and WTR1.BaseEntry = OWTQ.DocEntry.

Common joins

  • OWTQ T0 INNER JOIN WTQ1 T1 ON T1.DocEntry = T0.DocEntry (rows)
  • OWTR T2 INNER JOIN WTR1 T3 ON T3.DocEntry = T2.DocEntry AND T3.BaseType = 1250000001 AND T3.BaseEntry = T0.DocEntry (transfers made from the request)
  • OWTQ T0 LEFT JOIN OWHS T4 ON T4.WhsCode = T0.ToWhsCode (to warehouse)

When you use the OWTQ table

Use OWTQ with WTQ1 to list open transfer requests per warehouse, to show what is still waiting to be moved (OpenQty) and to measure how long requests stay open before the transfer is posted.

Example query: open transfer request rows with remaining quantity

SQL Server

SELECT T0.DocNum, T0.DocDate, T0.ReqDate, T1.ItemCode, T1.FromWhsCod,
  T1.WhsCode AS ToWhs, T1.OpenQty, DATEDIFF(day, T0.DocDate, GETDATE()) AS DaysOpen
FROM OWTQ T0
INNER JOIN WTQ1 T1 ON T1.DocEntry = T0.DocEntry
WHERE T0.DocStatus = 'O' AND T0.CANCELED = 'N' AND T1.OpenQty > 0
ORDER BY T0.DocDate

SAP HANA (column names in double quotes)

SELECT T0."DocNum", T0."DocDate", T0."ReqDate", T1."ItemCode", T1."FromWhsCod",
  T1."WhsCode" AS "ToWhs", T1."OpenQty", DAYS_BETWEEN(T0."DocDate", CURRENT_TIMESTAMP) AS "DaysOpen"
FROM OWTQ T0
INNER JOIN WTQ1 T1 ON T1."DocEntry" = T0."DocEntry"
WHERE T0."DocStatus" = 'O' AND T0."CANCELED" = 'N' AND T1."OpenQty" > 0
ORDER BY T0."DocDate"

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

Common pitfall: Expecting a transfer request to move stock

A transfer request does not change warehouse stock; only the inventory transfer (OWTR) does. Report stock from OITW and use OWTQ only to see what is requested and still open (WTQ1.OpenQty). See OWTR table (inventory transfer).

Ready-made queries that use OWTQ

  • Stock by warehouse: On hand, committed, ordered and available quantity per item and warehouse.

Questions about the OWTQ table

What is the object type of an inventory transfer request?

1250000001. It is the default of OWTQ.ObjType.

Where are the rows of a transfer request?

In WTQ1, joined on WTQ1.DocEntry = OWTQ.DocEntry. OpenQty is what is still to be transferred.

How do I see which transfers were made from a request?

Find WTR1 rows with BaseType = 1250000001 and BaseEntry = OWTQ.DocEntry.

Related tables

OWTR (Inventory Transfer (header)) · WTR1 (Inventory Transfer (rows)) · 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.