Skip to Content
0
Jan 18, 2023 at 05:05 AM

Query not getting multiple payment details SAP Business One HANA

50 Views

Dear all,

Below query is not getting multiple invoices details into output. There are 2 payment done against the single invoice but query is reply on single records.

SELECT T0."DocNum" AS "Invoice Number", T2."DocNum" AS "Credit Memo Number" ,

--T9."DocDate", T9."DocTotal"

T5."DocDate", T5."DocTotal"

FROM OINV T0

INNER JOIN INV1 T1 ON T1."DocEntry" = T0."DocEntry"

INNER JOIN ORIN t2 ON t2."ObjType" = T1."TargetType"

INNER JOIN RIN1 t3 ON T3."DocEntry" = T2."DocEntry" AND T3."BaseEntry" = T0."DocEntry"

left join ORCT T5 on T0."ReceiptNum"=T5."DocEntry"

--inner JOIN "RCT2" T8 ON T8."DocEntry" = T0."DocEntry"

--left JOIN "ORCT" T9 ON T9."DocNum" = T8."DocNum"

--where T0."DocNum" = '221013252'

where T0."DocNum" = '180000005'

GROUP BY T0."DocNum", T2."DocNum",

--T9."DocDate", T9."DocTotal"

T5."DocDate", T5."DocTotal"

ORDER BY T0."DocNum";

SAP Business One HANA

Regards,

Nikunj