OQUT table in SAP Business One (Sales Quotation (header))

OQUT is the SAP Business One table that stores the header of every sales quotation, the offer sent to a customer before an order. Its object type is 23. The rows are in QUT1, joined on DocEntry, and QUT1.TargetType shows whether a row was copied to a sales order (17), delivery or invoice.

OQUT key fields

FieldWhat it holds
DocEntryInternal key. Joins to QUT1.DocEntry.
DocNumQuotation number users see.
DocDatePosting date.
DocDueDateDue date (valid until).
CardCode / CardNameCustomer. Joins to OCRD.CardCode.
DocStatusO = open, C = closed.
CANCELEDY = cancelled, N = not cancelled, C = cancellation.
DocTotal / DocCurDocument total and currency.
DiscPrcntDiscount % for the whole document.
SlpCodeSales employee. Joins to OSLP.SlpCode.
OwnerCodeDocument owner. Joins to OHEM.
ObjTypeObject type, 23 = sales quotation.

How OQUT relates to other tables

OQUT is the header and QUT1 holds one row per item or service quoted. When a row is copied to a sales order, QUT1.TargetType is 17 and QUT1.TrgetEntry is the order DocEntry in ORDR; the order rows point back through RDR1.BaseType and BaseEntry.

Common joins

  • OQUT T0 INNER JOIN QUT1 T1 ON T1.DocEntry = T0.DocEntry (rows)
  • QUT1 T1 LEFT JOIN ORDR T2 ON T2.DocEntry = T1.TrgetEntry AND T1.TargetType = 17 (sales order made from the row)
  • OQUT T0 LEFT JOIN OSLP T3 ON T3.SlpCode = T0.SlpCode (sales employee)

When you use the OQUT table

Use OQUT to list open quotations by customer and sales employee, to find quotations that expire soon, and with QUT1 to measure how many quotations turn into sales orders.

Example query: open sales quotations with days until the due date

SQL Server

SELECT T0.DocNum, T0.DocDate, T0.DocDueDate, T0.CardCode, T0.CardName, T0.DocTotal,
  T0.DocCur, DATEDIFF(day, GETDATE(), T0.DocDueDate) AS DaysLeft
FROM OQUT T0
WHERE T0.DocStatus = 'O' AND T0.CANCELED = 'N'
ORDER BY T0.DocDueDate

SAP HANA (column names in double quotes)

SELECT T0."DocNum", T0."DocDate", T0."DocDueDate", T0."CardCode", T0."CardName", T0."DocTotal",
  T0."DocCur", DAYS_BETWEEN(CURRENT_TIMESTAMP, T0."DocDueDate") AS "DaysLeft"
FROM OQUT T0
WHERE T0."DocStatus" = 'O' AND T0."CANCELED" = 'N'
ORDER BY T0."DocDueDate"

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

Common pitfall: Counting quotations as sales

A quotation is an offer, not a sale. Report revenue from invoices (OINV) and use OQUT only for the pipeline. When you compare quotations with orders, filter CANCELED = 'N' and follow QUT1.TargetType = 17 to the order instead of matching on customer and date. See ORDR table (sales order).

Ready-made queries that use OQUT

Questions about the OQUT table

What is the object type of a sales quotation in SAP B1?

23. It is the default of OQUT.ObjType and QUT1.ObjType.

How do I find the sales order made from a quotation?

QUT1.TargetType = 17 and QUT1.TrgetEntry = ORDR.DocEntry.

Is the quotation discount in OQUT or QUT1?

The document discount is OQUT.DiscPrcnt; each row also has QUT1.DiscPrcnt.

Related tables

QUT1 (Sales Quotation (rows)) · ORDR (Sales Order (header)) · OCRD (Business Partners) · 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.