成本阶问题:财务模块axcr004合计金额检核表第18行合计金额与明细差异过大问题处理?

财务模块axcr004合计金额检核表第18行合计金额与明细差异过大问题处理?

可能原因:生产开立工单时元件未建在生产料件BOM明细中,导致成本阶没有算到,需要手动更改成本阶。

  

公式:

处理办法:修改成本阶

---1.运行程序查看有差异的料件
select ccc01,ccc32,a from (select ccc01,ccc32,(ccc31*ccc23a+ccc31*ccc23b+ccc31*ccc23c+ccc31*ccc23d+ccc31*ccc23e) a from ccc_file where ccc02=2021 and ccc03=8)
where ccc32<>a and a=0
----2.创建临时表贴入需要处理的料号
create table tmp210915 as select ima01 ha from ima_file where 1=0
select ha from tmp210915 for update
drop table tmp210915
-----3.检查成本阶上下阶成本阶情况,对应程序名axct410
select ccg01,ccg04,a.ima57 zj,cch02,cch03,cch04,b.ima57 yj,case cch05 when 'P' then 'P:采购' when 'M' THEN 'M:自制' when 'R' THEN 'R:返工' when 'S' then 'S:委外' end from ccg_file
join ima_file a on ccg04=a.ima01
join cch_file on ccg01=cch01
join ima_file b on b.ima01=cch04
where cch02='2021' and cch03='8' and cch04 in (select ha from tmp210915)

----4.更新成本阶,注意检查更新行数正确再提交
update ima_file
set ima57=3
where ima01 in (select ha from tmp210915)
----5.再次执行1直到结果为空

最后执行axcp500库存及在制成本计算作业后再看axcr004差异,最后执行axcr370成本勾稽作业。 

原文地址:https://www.cnblogs.com/mylive/p/15319230.html