Skip to Content

QUERY ORDR ODLN OINV

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"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 19, 2017 at 01:59 PM

    Hi,

    Convert query from below thread to HANA,

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

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 25, 2017 at 01:24 PM

    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

    Add comment
    10|10000 characters needed characters exceeded