Retriving Latest Cost set code

mosfin

Member
you don't mention the version of MFG/PRO you are using
(assuming you are using eB2.1 version)
cost method (per site) is defined in menu 30.9 Cost Set to Site Assignment

for Inventory valuation, GL cost set is used
in this example, replace mysite & mypart with your values
Code:
assign costset="" cost=0.
find first si_mstr where si_domain = global_domain and si_site = mysite 
  no-lock no-error.
if si_gl_set<>"" then costset=si_gl_set.
else do:
  find first icc_ctrl  where icc_domain = global_domain no-lock no-error.
  costset=icc_gl_set.
end.
find sct_det where sct_dom = global_domain 
  and sct_site = mysite 
  and sct_sim=costset
  and sct_part = mypart 
  no-lock no-error.
if available sct_det  then assign cost=sct_cst_tot.
 
Top