The target costs are typically calculated based on the itemization of the used cost estimate. The calculation then is:
Target costs = planned costs / planned output quantity or lot size * actual output quantity
Target quantity = planned quantity / planned output quantity or lot size * actual output quantity.
If there are lot size independent items in the itemization, the calculation is:
Target costs = planned costs
Target quantity = planned quantity
This also depends on the target costs version. The above relates to target cost version 0 (most commonly used).
In case of Valuated Sales Order Stock the cost estimate is used which was used to valuate the sales order stock. See Note 520000 – FAQ: Valuated special stock.
A little bit different to the above is the case in which the production order cost estimate is used. Quite common in the Valuated Sales Order Stock. In this case the itemization needs to be created on-the-fly within the variance calculation which is then standardized to the output quantity. First the input quantities are valuated with the according prices and after that the itemization is standardized to the output quantity as described above.
Please also refer to the online documentation below: