on 03-26-2015 6:37 PM
Hello, I am creating a sales report from SQL SAP Database. Does Sales Analysis Report take INMPRICE from INV1 table as sale price of every item?
INMPrice is often equal to LineTotal, in some cases INMPrice is less than LineTotal though. What determines these cases?
I want my report values has no discrepancies with Sales Analysis Report,
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please share your query here to check.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nagarajan,
This is the query retrieves the sales total, note I am using LineTotal from INV1
select FORMAT((
select sum(t1.LineTotal) from OINV t0
inner join INV1 t1 on (t0.DocEntry = t1.DocEntry)
where t0.DocDate >= '2015-02-01' AND t0.DocDate <= '2015-02-28' AND
not (Series in (112, 39, 41) and DocType = 'S')
) - (
select sum(t1.LineTotal)
from ORIN t0 inner join RIN1 t1 on (t0.DocEntry = t1.DocEntry)
where t0.DocDate >= '2015-02-01' AND t0.DocDate <= '2015-02-28' AND
t0.Series in (33,34,35) and t0.DocType = 'I'
),'C', 'es-CO') as Total
Query result: $XX.611.076.121,42
This query retrieves the sales total, note I am using INMPRICE by Quantity from INV1
select FORMAT((
select sum(t1.INMPrice*t1.Quantity) from OINV t0
inner join INV1 t1 on (t0.DocEntry = t1.DocEntry)
where t0.DocDate >= '2015-02-01' AND t0.DocDate <= '2015-02-28' AND
not (Series in (112, 39, 41) and DocType = 'S')
) - (
select sum(t1.INMPrice*t1.Quantity)
from ORIN t0 inner join RIN1 t1 on (t0.DocEntry = t1.DocEntry)
where t0.DocDate >= '2015-02-01' AND t0.DocDate <= '2015-02-28' AND
t0.Series in (33,34,35) and t0.DocType = 'I'
),'C', 'es-CO') as Total
Query result: $XX.592.348.823,97
Assuming in both queries result the XX is the same number, there is a difference.
The second query matches with Sales Analysis Report value, how is it calculated? Why is INMPrice different to LineTotal?
Thanks,
Alejandro
I am generating the Sales Analysis Report by items, using the tab Items taking only inventory transactions, so in the queries I am taking only inventory movements series 33,34,35 and doctype 'I' (inventory) for ORIN and every series except 112,39,41 whose Doctype is S (services) for OINV
Moreover, if I am not using the correct where clause in query the values should be the same cause the only thing different is the sum LineTotal and INMPrice. I don't understand the difference between LineTotal and INMPrice values and how this one is calculated.
Thanks.
INMPrice Item's Last Sales Price (OINM)
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean INMPRICE is the item sale price after apply discounts?
I want to know how INMPRICE is calculated, For my report I was taking LineTotal for every item sale but it is significant greater than Sales Analysis Report so I tried to use INMPRICE * Quantity and the values match just fine.
I must be sure Sales Analysis Report takes INMPRICE and how is it calculated, because my report will be generated every day with the same query.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.