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

Query OQUT ORDR

vhzl123
Explorer
0 Kudos
470

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!

Accepted Solutions (1)

Accepted Solutions (1)

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!

Answers (1)

Answers (1)

jitin_chawla
Product and Topic Expert
Product and Topic Expert

Hi,

There is a field in the OQUT table which is 'DocManClsd'. The description of it is Document Was Closed Manually.

Check if you can incorporate the same in your query and get the desired result.

Kr,

Jitin