cancel
Showing results for 
Search instead for 
Did you mean: 

User Query - DocEntry

02-07-2017 5:24 PM
471 views 1 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello,

I made such query:

SELECT T1.[DocEntry] , T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]   FROM ORDR T0 <br>INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T0.[DocDate]  <= GETDATE()  -5 and T0.DocStatus='O'

works good, but one thing I would like to improove

Now the query returns for each article/item in RDR1 own row, so when some Order has 3 articles in result I see 3 rows for this order. Is somehow possible to I could get for one Order one just row/record.

I know that what I need do such query:

SELECT  T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]   FROM ORDR T0  
 WHERE T0.[DocDate]  <= GETDATE()  -5 and T0.DocStatus='O'

but here is a problem, that in result are not yellow arrows, so I cannot enter to the document. It was the reason why I have used the query above with the DocEntry what help me to display 'yellow arrow'.

Thank You

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

SOLVED:

SELECT T0.[DocEntry] , T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]

FROM ORDR T0

WHERE T0.[DocDate] <= GETDATE() -5 and T0.DocStatus='O'

Answers (0)