Cách truy vấn danh ...
 
Notifications
Clear all

Cách truy vấn danh sách AR Invoice và AR Credit Memo có liên kết nhau

1 Posts
1 Users
0 Reactions
557 Views
admin
Posts: 478
Admin
Topic starter
(@admin)
Noble Member
Joined: 3 years ago

Câu query áp dụng cho môi trường SAP HANA:

SELECT T0."DocNum" AS "Invoice Number", T2."DocNum" AS "Credit Memo Number"
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"
GROUP BY T0."DocNum", T2."DocNum" ORDER BY T0."DocNum";

Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security