on 06-03-2011 4:21 PM
Hi,
I'm trying to develop a report similar to the sales analysis report of SAP.
I want to know how does SAP calculate the the Sales Amount column. I was using LineTotal column of Invoices + A/R credit memos, but it's not correct. I know i'm getting all the records because my total quantity and Gross Profit is correct.
Hi Vj Chris,
Try This
SELECT T0.[DocNum] as 'INV NO', T0.[DocDate] as 'INV DT', T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[GrosProfit], T1.[DocNum] as 'AR CR MEMO', T1.[DocDate] as' AR CR DT' , T1.[CardCode], T1.[CardName], T1.[DocTotal], T1.[GrosProfit], (T0.[DocTotal]-T1.[DocTotal]) as 'Final Amount', (T0.[GrosProfit]-T1.[GrosProfit]) as' Final GR Profit' FROM OINV T0 , ORIN T1 WHERE T0.[DocDate] >=[%0] and T0.[DocDate] <=[%1]
But this query better run when you are using in Crystal Report.
Thanks,
Srujal Patel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
Thanks for your help. But sorry that was not the issue. I figured it out. I had not taken Tax only situation into consideration.
the sales amount is calculated by (line total of each item - (line total * discount of document if any)) For each line
And you consider invoices and credit notes.
If there's tax only then you should consider line total as zero.
The overall total of records will be invoices - credit notes.
Hi,
You should try OJDT and JDT1 table instead. Filtered by TransType in ('13','14').
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.