成本卷积请求:供应链成本累计 - 打印报表

运行后报一下错误:

MSG-00000: Rollup ID = 236403
MSG-00000: Before CSTPSCEX.supply_chain_rollup 2014/10/23 10:35:53
MSG-00000: After CSTPSCEX.supply_chain_rollup 2014/10/23 10:35:53
MSG-00000: No loop found
MSG-00000: CSTPSCEX.explode_sc_cost_flags():40:ORA-01476: 除数为 0
REP-1825: 报表前触发器返回 FALSE。
REP-0069: 内部错误
REP-57054: In-process job terminated:Terminated with error:
REP-1825: MSG-00000: Rollup ID = 236403
MSG-00000: Before CSTPSCEX.supply_chain_rollup 2014/10/23 10:35:53
MSG-00000: After CSTPSCEX.supply_chain_rollup 2014/10/23 10:35:53
MSG-00000: No loop found
MSG-00000: CSTPSCEX.explode_sc_cost_flags():40:ORA-01476: 除数为 0
REP-1825: 报表前触发器返回 FALSE。

-----------

查找metalink 后分析,给出的解决方案:

-----------------

Supply Chain Indented Bills Of Material Cost Report Displays CSTPSCEX.explode_sc_cost_flags():40:ORA-01476 (文档 ID 1904489.1)

To implement the solution, please execute the following steps:

1. Download and review the readme and pre-requisites for Patch 18632885:R12.BOM.C

2. Ensure that you have taken a backup of your system before applying the recommended patch.

3. Apply the patch in a test environment.

4. Confirm the following file versions:
CSTSCEXB.pls 120.12.12010000.14
CSTSCEXS.pls 120.0.12010000.4

You can use the commands like the following:
strings -a $BOM_TOP/patch/115/sql/CSTSCEXS.pls |grep '$Header'

5. Retest the issue.

---------------------

目前系统的版本为:

[apptest@vis ZHS]$ strings -a $BOM_TOP/patch/115/sql/CSTSCEXS.pls |grep '$Header'
/* $Header: CSTSCEXS.pls 120.0.12010000.1 2008/07/24 17:25:17 appldev ship $ */
[apptest@vis ZHS]$ strings -a $BOM_TOP/patch/115/sql/CSTSCEXB.pls |grep '$Header'
/* $Header: CSTSCEXB.pls 120.12.12010000.6 2010/10/01 07:31:26 pbasrani ship $ */
[apptest@vis ZHS]$

显然版本过低

想到现状,打补丁麻烦,且。。。 言不多说

看看有没有其他办法,再查 metalink,有一个给出数据修复的办法:

Additional debug message in log for error: CSTPSCEX.explode_sc_cost_flags():40:ORA-01476: divisor is equal to zero (文档 ID 1602932.1)

其中一段是这么说的

@@The following datafix (Data_fix_script.sql) will address the existing phantom components that can't be manually adrressed in case the number is huge. The data fix script will only just uncheck the components having zero qty not included in cost roll up

@@ for phantom components.

下载了这个数据修复sql,内容如下:

/*
* Description :
* This script is for 2 purpose
* 1. Check phantom item used in bom with quantity =0
* 2. Set such kind of bom component as NOT included in cost rollup.
*/ --step 1 CREATE back up table
DROP TABLE BOM_COMPONENTS_B_bak;
CREATE TABLE BOM_COMPONENTS_B_bak
AS
SELECT bic.*
FROM bom_parameters bp, BOM_COMPONENTS_B bic , BOM_BILL_OF_MATERIALS bom, mtl_system_items msi
WHERE bp.organization_id = &p_org_id
AND bp.use_phantom_routings = 1
AND bp.organization_id = bom.organization_id
AND bom.common_bill_sequence_id = bic.bill_sequence_id
AND msi.organization_id = bom.organization_id
AND msi.inventory_item_id = bic.component_item_id
AND decode(nvl(BIC.wip_supply_type, nvl( MSI.wip_supply_type, 1)), 6, 1, 2) = 1
AND bic.component_quantity = 0
AND bic.include_in_cost_rollup = 1 ; --below sql is used to find out each phantom item with 0 quantity 's assembly item and phantom item
SELECT bom.organization_id, msi1.inventory_item_id, msi1.segment1 assembly_item_name, msi.inventory_item_id, msi.segment1 phantom_item_name
FROM bom_parameters bp, BOM_COMPONENTS_B bic , BOM_BILL_OF_MATERIALS bom, mtl_system_items msi, mtl_system_items msi1
WHERE bp.organization_id = &p_org_id
AND bp.use_phantom_routings = 1
AND bp.organization_id = bom.organization_id
AND bom.common_bill_sequence_id = bic.bill_sequence_id
AND msi.organization_id = bom.organization_id
AND msi.inventory_item_id = bic.component_item_id
AND msi1.organization_id = bom.organization_id
AND msi1.inventory_item_id = bom.assembly_item_id
AND decode(nvl(BIC.wip_supply_type, nvl( MSI.wip_supply_type, 1)), 6, 1, 2) = 1
AND bic.component_quantity = 0
AND bic.include_in_cost_rollup = 1 ; --step 2, update include_in_cost_rollup = 2 UPDATE BOM_COMPONENTS_B
SET include_in_cost_rollup = 2
WHERE (BILL_SEQUENCE_ID, COMPONENT_SEQUENCE_ID) IN (
SELECT BILL_SEQUENCE_ID, COMPONENT_SEQUENCE_ID FROM BOM_COMPONENTS_B_bak
) ;
COMMIT;

查看了以上代码,分析了一下,无非就是修复清单中组件数量是0,且组件也是有清单的物料(子装配件),需要把“包括在累计成本中”的勾去掉即可。这个也完全可以通过界面来操作完成,无需通过这段代码也可以完成。

再次提交卷积请求,成功!

成本卷积报错:CSTPSCEX.explode_sc_cost_flags():40:ORA-01476: 除数为 0的更多相关文章

  1. 运行 puppeteer 报错 chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory

    运行 puppeteer 报错 chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open sh ...

  2. CDH5.16.1的kafka集群报错: No broker in ISR for partition [getngo_collect_apm_test,0]

    1 详细错误 kafka.common.NoReplicaOnlineException: No broker in ISR for partition [getngo_collect_apm_tes ...

  3. 报错:library not found for -lstdc++.6.0.9

    在Xcode 10开发中, 报错:library not found for -lstdc++.6.0.9 解决方案:将Xcode9的libstdc++6.0.9.tbd拷贝到Xcode10中使用 X ...

  4. 报错:[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'

    报错内容:如下 分析: 遇到这种情况,说明超出了数组的范围 如要插入某组数据,但是这组数据只有10条:但是这里设置为20条.当第11个cell填充数据时就会报错, [__NSArrayI object ...

  5. window下安装redis报错: creating server tcp listening socket 127.0.0.1:6379: bind No error

    window下安装redis报错: creating server tcp listening socket 127.0.0.1:6379: bind No error 解决: 如果没有配置环境,在安 ...

  6. 【Mac + Appium】之运行报错:[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null

    产生下面的原因是因为:与uiautomator2的weditor冲突,两者不能同时使用. 有时打开appium时会报错: [UiAutomator] UiAutomator exited unexpe ...

  7. Xcode10更新报错:library not found for -lstdc++.6.0.9

    转载链接!:https://blog.csdn.net/timtian008/article/details/82792629 由于iPhone X Max 及iOS12系统的到来,必须升级xcode ...

  8. java程序报错:Unable to open debugger port (127.0.0.1:63959): java.net.SocketException "socket closed",编译过来就是无法打开调试器端口,套接字已关闭

    报错:Unable to open debugger port (127.0.0.1:63959): java.net.SocketException "socket closed" ...

  9. C# Excel导出超出65536行报错 Invalid row number (65536) outside allowable range (0..65535)

    C# Excel导出超出65536行报错 Invalid row number (65536) outside allowable range (0..65535) 一:报错 Invalid row ...

随机推荐

  1. nginx日志格式

    日志格式 log_format main '$remote_addr - $remote_user [$time_local] $request '                    '" ...

  2. JAX-RS开发 hello world

    1.建立maven webapp工程aty-rest. 2. 在pom文件增加spring框架.jax-rs接口.CXF实现 <dependency> <groupId>jav ...

  3. Andrord问题小结

    问题描述:Gradle version 2.10 is required. Current version is 2.8.Gradle版本由2.8升为2.10后,发现所有依赖play-services ...

  4. PHP学习笔记五【方法】

    <?php $num1=34; $num2=90; $oper="+"; $res=0; switch($oper) { case "+": $res=$ ...

  5. JQ each

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. <转>maven发布第三方jar的一些问题

    在创建maven中私有仓库过程中,需要发布一些第三方jar到nexus仓库,使用命令的是 deploy:deploy-file 有许多参数,具体可查看 http://maven.apache.org/ ...

  7. Java集合框架:Set、List、Map等介绍

    目录 1.Java集合类基本概念 2.Java集合类架构层次关系 1.Java集合类基本概念 在编程中,常常需要集中存放多个数据.从传统意义上来讲,数组是我们一个很好的选择,前提是我们事先已经明确知道 ...

  8. php 函数之 )_each()list()implode()explode()in_array()

    <?php /* implode() 把数组组合成字符串 explode() 把字符串分割成数组 in_array() 检测内容是否在数组中 each()把数组元素拆分成新的数组 list() ...

  9. 当each遇上list 的一些困惑

    在看手册函数的时候,看到each,如下: array each ( array &$array ) 返回数组中当前的键/值对并将数组指针向前移动一步 在执行 each() 之后,数组指针将停留 ...

  10. apache AH01630: client denied by server configuration错误解决方法

    今天本来是想要在自己本地搭建一个wamp环境用来做一些代码的测试和框架的学习. 鉴于目前工作的时候用到了php5.5,所以就用了wamp-server V2.5版本,安装完成之后配置虚拟主机一直出现4 ...