SAP B1 - SQL服务器查询,用于从AR发票日期起90天内收到的AR发票付款

时间:2017-10-11 11:14:20

标签: sql-server sap

SAP B1 - 在AR发票日期后90天内收到针对AR发票的付款的SQL Server查询

我已经尝试过RCT2表和ITR2,但在某些情况下,未能获得准确的值

1 个答案:

答案 0 :(得分:0)

SELECT SUM(T.ReconSum)FROM GMS_Live.dbo.ITR1 T INNER JOIN GMS_LIVE.dbo.OITR X ON X.ReconNum = T.ReconNum其中T.SrcObjTyp ='13'THd T.SrcObjAbs =(SELECT DocEntry FROM OINV WHERE DocNUm = 106620)AND T.ReconNum NOT IN(从GMS_Live.dbo.OITR中选择CancelAbs)