Data for query
I need to write a query that shows the average cost of an item before a landed costs document is posted, and then after the landed costs document is posted.
I know I can get the after by just retrieving avgprice from OITM, but how can I get the before cost?
I'm guessing something using OINM, perhaps distinguishing between document types and dates to pick up the last entry's average costs before the latest landed costs document was posted?
Any tips would be greatly appreciated.