Skip to Content
Former Member
Dec 18, 2013 at 08:36 AM

query about inventory posting


Hi experts,

How can i link the OIQR and IQR1 table with OJDT,JDT1,OINM table?

Since I want to get the cal price at OINM table.

What do i need to add to get the calcprice of the item according to their Doc Date (stock posting) in OIQR

select OIGR.Docdate,IGR1.WhsCode,WhsName,IQR1.ItemCode,ItemName,

OnHandBef as Instock,Quantity as different, OINM.Calcpric*quantity as COGS


INNER JOIN dbo.IQR1 ON dbo.OIQR.DocEntry = dbo.IQR1.DocEntry

inner join dbo.OWHS on dbo.OWHS.whscode = dbo.IQR1.WhsCode

inner join dbo.OINM on dbo.OINM.TransType= dbo.OIQR.ObjType

and dbo.OINM.DocDate= dbo.OIQR.DocDate

and dbo.OINM.CreateDate = dbo.OIQR.CreateDate

order by WhsCode, DocDate,IQR1.ItemCode