cancel
Showing results for 
Search instead for 
Did you mean: 

total sales amount

Former Member
0 Kudos

hi SAP Kings

sales analysis report total amount is differ from sum of line total in query.what is the problem and where i did mistake please refer this query please give suggestion....i need the sum of linttotal calculated in not include tax....

SELECT count(T0.[DocNum]),T0.[CardCode], T0.[CardName], T0.[Address], sum( T0.[DocTotal]-T0.[VatSum]) FROM OINV T0 WHERE (T0.[DocDate] >=[%0] or [%0]='') and (T0.[DocDate] <=[%1] or [%1]='') GROUP BY T0.[CardCode], T0.[CardName], T0.[Address]

Thanks & Best Regards

B.Laskhmi Narayanan

Edited by: lakshmi narayanan on Sep 19, 2008 12:12 PM

Edited by: lakshmi narayanan on Sep 19, 2008 12:13 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please check this thread to have a reference:

Thanks,

Gordon

Answers (2)

Answers (2)

former_member187989
Active Contributor
0 Kudos

Is there is any discount in ar invoice ?

Jeyakanthan

Former Member
0 Kudos

some documets contain in discsum

former_member187989
Active Contributor
0 Kudos
SELECT T0.DocNum,T0.CardCode, T0.CardName, T0.Address, sum( T1.LineTotal) FROM OINV T0 
INNER JOIN INV1 T1 ON T0.DocEntry=T1.DocEntry
WHERE (T0.DocDate >=%0 or %0='') and (T0.DocDate <=%1 or %1='') GROUP BY T0.DocNum,T0.CardCode, T0.CardName, T0.Address
Former Member
0 Kudos

hi

thanks for ur fast replied......sorry this query also vary the total in sales analysis and line total

Former Member
0 Kudos

When you say Sales Analysis Report do you mean the system report? That one considers the Credit Notes as well, isn't it the reason?