calculate Raw Material cost in BOM

Dear All.

we would like to make calculation cost just for Raw Material cost in BOM. which in our BOM consist of :

a few of Raw Material and sub assembly . I made e new field in BOM header tabel as COGS - numeric.

i want NAV to calculate all cost material & Sub assembly and put that cost in COGS BOM Header field.

does any one have experience with this calculation cost ?.

best regards .