cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Analysis Report INMPRICE, Why?

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member284923
Discoverer
0 Kudos

INMPrice will always be recalculate using Total / Qty, therefore some case it won't same as Line Price.

This happen when Price decimal point is more than your total.

Example:

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please share your query here to check.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

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

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Why doctype is not same for ORIN table?

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

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.

frank_wang6
Active Contributor
0 Kudos

The INMPrice will take into header level discount into consideration, where LineTotal does NOT do that. That's why INMPrice will give you the same result as sales analysis report.

Frank

frank_wang6
Active Contributor
0 Kudos

INMPrice Item's Last Sales Price (OINM)

Frank

Former Member
0 Kudos

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.