WIP cost inquiry - finding version of standard costs used?

SUGGESTED

Here is my situation:

- I am looking at the Costing > Production costs > WIP cost inquiry screen

- For a particular work order, I want to know what version of standard costs for the product is used to calculate the standard cost numbers given on the WIP cost inquiry screen

- When I look at the details of the ITMCOST table, there are different versions denoted by the fields CSTTYP and ITCSEQ.

- I can manually look at the start dates of the versions in the ITMCOST table and compare it to the date of the work order to manually figure out what version was used.

- But is there a table and/or field where what version number (corresponding to the CSTTYP and ITCSEQ in ITMCOST table) is used for a work order? I'm going to be doing SQL queries on a large number of orders, and find that I can't just rely on dates. I need an accurate way to find what ITMCOST version was used for each work order.

Hopefully that explains my issue!

Thanks