Skip to Content
0

QUERY ORDR ODLN OINV

Jul 19, 2017 at 01:49 PM

415

avatar image

I need to create a query that one of the Sales order, delivery and invoice. But do not double the lines. This duplicates me. Try other conditions but it does not work.

FROM OINV T0 JOIN INV1 T1 ON T0."DocEntry" = T1."DocEntry" INNER JOIN DLN1 T2 ON T1."BaseEntry" = T2."DocEntry" INNER JOIN ODLN T3 ON T2."DocEntry" = T3."DocEntry" INNER JOIN RDR1 T4 ON T2."BaseEntry" = T4."DocEntry" INNER JOIN ORDR T5 ON T4."DocEntry" = T5."DocEntry"

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nagarajan K Jul 19, 2017 at 01:59 PM
0

Hi,

Convert query from below thread to HANA,

https://archive.sap.com/discussions/thread/3583628

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 25, 2017 at 01:24 PM
0

Hi Cristian,

Try this:

FROM [dbo].[OINV]

T0 INNER JOIN [dbo].[INV1] T1 ON T0.DocEntry = T1.DocEntry

LEFT JOIN [dbo].[DLN1] T2 ON T1.BaseEntry = T2.DocEntry AND T1.BaseLine = T2.LineNum

LEFT JOIN [dbo].[RDR1] T3 ON T2.BaseEntry = T3.DocEntry AND T2.BaseLine = T3.LineNum

LEFT JOIN [dbo].[ORDR] T4 ON T4.DocEntry = T3.DocEntry

Regards,

Roxana

Share
10 |10000 characters needed characters left characters exceeded