You can define automatic account determination on a material-dependent or material type dependent basis.
If you have, for example, raw materials and trading goods as material types, you can post their materials to different stock accounts at the time of goods receipt. Another option is to post materials of the same material type to different stock accounts, based on whether the materials are manufactured or purchased.