Skip to Content
0
Aug 05, 2016 at 09:33 AM

Query on OIVL returns negative stockvalue

264 Views

Hi Experts,

I need stockvalues for warehouse and inventory-account at a particular date.

A simple query on OIVL grouped by inventory-account returns the correct amounts:

select InvntAct,sum(SumStock)

from OIVL

where DocDate <='20151231'

and InvntAct in ('7101','7102','7103')

group by InvntAct

Same query grouped by warehouse ([LocCode]) returns negative amounts for some warehouses, although we do not allow negative stock.

Using OINM as source did not help.

Thanks in advance for any hint!