Skip to Content

Sales Order,DN,A/R No Query Report

May 02 at 07:56 AM


avatar image

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]'

sample.png (20.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers