cancel
Showing results for 
Search instead for 
Did you mean: 

Data for query

Former Member
0 Kudos

Hi guys,

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.

Thanks,

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michael,

This query is not that simple because it will be difficult to find the right time to calculate that cost and match all system calculations for item histories till that date.

What kind of time frame you are looking for this particular query? I mean: Do you want it on any dates no matter how long times ago?

Thanks,

Gordon

Former Member
0 Kudos

Hi,

It would be run every time a landed costs document is posted.

Thanks,

Michael

Former Member
0 Kudos

Just for those items included in the latest landed cost document?

Former Member
0 Kudos

Correct. The purpose being to analyse the change in average cost and subsequent change in markup, so we can investigate any large changes.