I'm trying to use valuated sales order stock where the valuation comes from the preliminary cost estimate of the production order (I'm also using the assemble to order process). This works fine. My problem occurs when I try to post the COGS amount to COPA using valuation with cost components. I can't figure out how I can do that. Has anyone come across a similar situation?
The problem of course comes from the fact that the preliminary cost component split is not saved in the production order, but is calculated dynamically. I'm marching done a couple of paths, but not having much luck with any of them. One approach would be to calculate a sales order cost estimate that is based on the preliminary cost estimate of the production order. In theory, this should be possible because the sales order condition type EK02 is getting updated by production order cost estimate, so it should be possible to create a sales order cost estimate as well. The other approach I'm thinking of pursuing is using the valuation enhancement in COPA and try to duplicate what's going on in the prelimainry cost estimate. That seems like a lot of work unless I can find an existing function module for this.
Any help would be greatly appreciated.