Inventory Mismatch

Inventory Mismatch

Environment:

iVend 6.5 Update 6 with SAPB1 9.2


If there is a need to identify the inventory mismatch between SAPB1 and iVend Enterprise (HO) , run the below Query in the iVend Enterprise database.Make sure integration and replication is clear to have the exact result of inventory discrepancies.



1) For Non Serial and Non - Batch item

select A.AvailableQuantity , S.OnHand, s.itemcode
FROM InvInventoryItem A, InvProduct b , InvWarehouse c, (SELECT * from <SAPB1 Database Name>.dbo.oitw) S
WHERE A.ProductKey = b.ProductKey
AND A.WarehouseKey = c.WarehouseKey
AND b.IsDeleted = 'FALSE'
AND b.Id = S.ItemCode collate SQL_Latin1_General_CP1_CI_AS
and c.Id = S.WhsCode collate SQL_Latin1_General_CP1_CI_AS
and A.AvailableQuantity <> S.OnHand
and b.IsBatchTracked = 'false'
and b.IsSerialTracked = 'false'

2) For Serialized but non - Batch item

select A.AvailableQuantity , S.OnHand, s.itemcode
FROM InvInventoryItem A, InvProduct b , InvWarehouse c, (SELECT * from <SAPB1 Database Name>.dbo.oitw) S
WHERE A.ProductKey = b.ProductKey
AND A.WarehouseKey = c.WarehouseKey
AND b.IsDeleted = 'FALSE'
AND b.Id = S.ItemCode collate SQL_Latin1_General_CP1_CI_AS
and c.Id = S.WhsCode collate SQL_Latin1_General_CP1_CI_AS
and A.AvailableQuantity <> S.OnHand
and b.IsBatchTracked = 'false'
and b.IsSerialTracked = 'true'

3) For Non Serial but Batch managed item

select A.AvailableQuantity , S.OnHand, s.itemcode
FROM InvInventoryItem A, InvProduct b , InvWarehouse c, (SELECT * from <SAPB1 Database Name>.dbo.oitw) S
WHERE A.ProductKey = b.ProductKey
AND A.WarehouseKey = c.WarehouseKey
AND b.IsDeleted = 'FALSE'
AND b.Id = S.ItemCode collate SQL_Latin1_General_CP1_CI_AS
and c.Id = S.WhsCode collate SQL_Latin1_General_CP1_CI_AS
and A.AvailableQuantity <> S.OnHand
and b.IsBatchTracked = 'true'
and b.IsSerialTracked = 'false'