cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order containing Zero item price

kedalenechong
Participant
0 Kudos

Hi All

Is it possible to have a Sales Query to filter Zero item price but to show all other items that is not zero as well in the same Sales Order?

If we Filter Sales Order Item Price equal Zero and Document Total >0, there is no Data.

Kedalene Chong

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Kedalene Chong,

It may be better to adjust the query. If your goal is to show all order rows of only orders that contain zero price lines, please try this:

SELECT T0.DocNum, T0.DocStatus, T1.ItemCode, T1.Quantity, T1.Currency, T1.Price, T0.DocTotal, T0.DocDate
FROM ORDR T0
     INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.DocDate between [%0] and [%1]
  AND T0.DocEntry IN (select r.DocEntry 
                      from RDR1 r
                           inner join ORDR h on r.DocEntry = h.DocEntry 
                      where h.DocDate between [%0] and [%1]
                        and r.Price = 0)

Regards,

Johan

Answers (2)

Answers (2)

narayanis
Active Contributor
0 Kudos

Hi,

When You apply SAP Filter, it will retrieve the records where all the conditions are met. By default "And" operator is considered.

Regards

kedalenechong
Participant
0 Kudos

Hi All

Sorry, If we Filter Sales Order Item Price equal Zero and Document Total >0, there is Data containing only item price Zero but not the other items that is not Zero item price.