cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query OQUT ORDR

vhzl123
Explorer
0 Kudos
517

Hello experts!

I'm looking for a query that returns the offers that have been closed but have no order. i.e. they have been closed manually.

The query I'm using is not working and is returning all closed offers, no matter if there is an order or not. I just want those that have no offer. 

Can anyone help me? Thank you!

View Entire Topic
LoHa
Active Contributor

Hi

the query shows lines in closed Quotations which were not copied to a sales order

SELECT
QUT1.*
FROM
OQUT
INNER JOIN QUT1 ON QUT1.DocEntry = OQUT.DocEntry
LEFT JOIN RDR1 ON RDR1.BaseEntry = QUT1.DocEntry AND RDR1.BaseLine = QUT1.LineNum AND RDR1.BaseType = QUT1.ObjType

WHERE
OQUT.DocStatus = 'C'
AND
RDR1.BaseEntry IS NULL

regards Lothar 

vhzl123
Explorer
0 Kudos
Thank you very much, it works!