Skip to Content
0
May 02, 2018 at 07:56 AM

Sales Order,DN,A/R No Query Report

102 Views

Hi Experts,

I want to achieve a report that will same output in attached picture below. But the problem was when i put a Subquery to get the document no of DN even if my SO has no DN or still Open S.O. I got error returned more than 1 value. This is not permitted when the subquery follows...

Here's my code.

Select T0.DocNUm,T0.DocStatus,(Select S0.DocNum from ODLN S0 inner join DLN1 S1 on S0.DocEntry=S1.DocEntry Where S1.BaseRef IN (T0.DocNum) Group by S0.DocNum)as DN from ORDR T0 inner join RDR1 T1 on T0.DocEntry=T1.DocEntry where T0.Docdate>='[%0]'

Attachments

sample.png (20.0 kB)