• 在制品和成本故障排除常用脚本


    1. 待定在制品物料事务处理?

    这些脚本只是Oracle支持服务提供以故障排除为目的。  这些脚本已经过测试且照预计方式运作。然而,在依靠任何脚本之前,你应该始终先进行测试。 请运行这些脚本之前之前先进行校对! 

    由于不同方式的文件编辑器,电子邮件软件包和操作系统处理文本格式(空格,制表符和回车符),当你第一次收到他们时,这些脚本可能在一个无法执行状态。 

    检查一下这个脚本,以确保这种类型的错误得到纠正。 


    首先检查库存事务处理管理器是否运行,如果有任何待定或错误记录在列表中的事务处理界面。  这些都可以通过查询库存事务处理接口查询画面。 导航 库存/事务处理/事务处理开放接口。 
    记录可以被删除和/或重新提交于此表中。 

    检查待定的事务处理之前,导航 库存/事务处理/待定的事务处理。 
    记录只能通过此表单重新提交。 
    如果有待定的事务处理是停留在MTL_MATERIAL_TRANSACTIONS_TEMP表格,而transaction_type_id = 5,(反冲/在制品事务处理)与proces_flag = E,它们需要被提交。 
    为了调查为何事务处理失败了,运行下面的SQL脚本:

     

    select transaction_source_id , inventory_item_id, process_flag,
    error_code, error_explanation,
    transaction_source_type_id, organization_id
    from mtl_material_transactions_temp
    where process_flag = ?E?
    and transaction_source_id= ; 

    使用该脚本重新提交事务处理:

    update mtl_material_transactions_temp
    set process_flag = 'Y',
    lock_flag = 'N',
    transaction_mode= 3,
    error_code = NULL,
    error_explaination = NULL
    where process_flag = 'E'
    and transaction_source_id= ; 

    2. 待定在制品完成事务处理.

    有2种方法执行完成事务处理。 

    在制品移动移转事务处理表单:(导航“ - >在制品/移动事务处理/移动事务,设置事务类型为完成)。 

    在在制品原物料事务处理表单:(导航“ - >在制品/原物料事务处理/完成事务处理) 

    记录是创建一个完成装配制品。 
    他们被困在MTL_MATERIAL_TRANSACTIONS_TEMP表格。  (导航“ - >库存/事务处理/待定事务处理)的错误信息:或运行以下SQL脚本: 

    为了找到ORGANIZATION_ID运行这个脚本:

    select organization_id, organization_code
    from org_organization_definitions
    where organization_name like 'xxx%'; ( xxx is organization name ) 

    为了找到WIP_Entity_Id运行这个脚本:

    select wip_entity_id
    from wip_entities
    where wip_entity_name = < Wip job or repetitive assembly>
    and organization_id= 'xxx'; ( xxx is organization id ) 
    select error_code, error_explanation,lock_flag,
    inventory_item_id, transaction_action_id,
    transaction_source_type_id, process_flag,
    organization_id
    from mtl_material_transactions_temp
    where organization_id =
    and transaction_source_id = ;
    ( wip_entity_id is obtained from above SQL statement ) 

    3. 待定在制品移转事务处理

    WIP_MOVE_TXN_INTERFACE: 
    包含有关需要处理的车间移动事务。 

    要查看待定的移动事务处理(导航“ - >在制品/移动事务处理/待定的移动事务处理)。 
    记录可以被更新,删除和通过表单重新提交。 

    事务处理模式应设置为在线处理。 
    如果有任何出错的移动事务处理在wip_move_txn_interface,那么这些事务处理必须重新提交。 

    运行以下脚本: 

    要了解有多少行是错误的:

    select count(*)
    from wip_move_txn_interface
    where process_status = 3 ; 

    要了解有多少行的待处理:

    select transaction_id, wip_entity_id, process_phase, process_status, wip_entity_name
    from wip_move_txn_interface
    where process_status in (1,3) 

    (进程状态= 1表示待定,3表示“错误”)

    要了解有多少行是错误的和它的讯息是什么:

    select error_message, error_column
    from wip_txn_interface_errors
    where request_id= 
    
    ( for the two that have a request id ) 

    使用此脚本来更新错误记录:

    update wip_move_txn_interface
    set group_id=null,
    request_Id = null,
    process_status=1,
    transaction_id=null
    where transaction_id=; 

    重新启动接口管理程序(移动和成本管理器)。 
    启动移动事务处理管理器,即使TP:在制品移动事务处理配置文件选项=在线处理。  (导航“ - >库存/设定/事务处理/接口管理器)。工具栏上的特殊选择按下”启动管理器“按钮。


    4. 待定在制品资源事务处理?

    执行下列操作以重新提交错误资源成本记录; 

    1. 确保没有(资源)的成本工作程序正在运行。
    2. 停止(资源)成本管理器。. 
    3. 备份该表WIP_COST_TXN_INTERFACE 
    4. 要检查待处理的事务处理,运行下面的SQL;

    select transaction_id, request_id, group_id,
    process_status , wip_entity_name
    from wip_cost_txn_interface
    where process_status in ( 1,3); ( process_status= 1 indicates 'Pending', 3 indicates 'Error' ) 

    5. 更新表格.

    update wip_cost_txn_interface
    set group_id=NULL,
    transaction_id = NULL,
    process_status= 1 ( set it to Pending )
    where process_status = 3; ( error records ) 

    6. 重新启动(资源)成本管理器.

    5. 待关闭离散式工单 ?

    用apps用户进入SQL * Plus/并运行下面的SQL脚本:

    wipcljob.sql

    使用这个脚本来汇报某个组织某范围的离散工单,因为待定事务处理不能关闭。  这是一个SQL脚本,查询数据库,并生成输出,显示哪些事务处理造成问题。  这个脚本只会识别数据,它不会更新或修正任何数据。

    这个脚本也可以在这里下载;暂挂工单SQL脚本 Note 106242.1

    要注意没有程序正在运行和当运行更新脚本时成本管理器已被撤下。 

    为了使工作得以顺利结束,必须没有任何属于该工单的事务处理在WIP_MOVE_TXN_INTERFACE这个表格。 If there are, then run the following script: 如果有,然后运行以下脚本: 

    使用这个脚本来查找待定行:

    select transaction_id, wip_entity_id, process_phase,
    process_status, wip_entity_name
    from wip_move_txn_interface
    where process_status in (1,3); (process status = 1 indicates Pending, 3 indicates "Error" )
    
    update wip_move_txn_interface
    set group_id=null,
    process_status=1,
    transaction_id=null
    where transaction_id=; 

    必须没有任何属于该工单的事务处理在WIP_COST_TXN_INTERFACE这个表格。  
    WIP_COST_TXN_INTERFACE包含的信息为在制品成本需要处理。

    select transaction_id, wip_entity_id,
    process_phase, process _status
    from wip_cost_txn_interface
    where process_status in (1, 3); 

    如果有该工单的事务处理,然后运行以下脚本:

    update wip_cost_txn_interface
    set group_id=null,
    process_status=1,
    transaction_id=null
    where transaction_id=; 

    必须没有任何属于该工单的事务处理在MTL_MATERIAL_TRANSACTIONS_TEMP这个表格。

    该mtl_material_transactions_temp表是所有原物料事务处理的关键。

    首先确保库存事务管理器正在运行。

    select transaction_source_id , inventory_item_id, process_flag,
    error_code, error_explanation,
    transaction_source_type_id, organization_id
    from mtl_material_transactions_temp
    where process_flag = ?E?
    and transaction_source_type_id=5; ( 5 = Job/schedule ) 

    若有任何该工单的事务处理在MTL_MATERIAL_TRANSACTIONS_TEMP则执行以下脚本:

    update mtl_material_transactions_temp
    set process_flag = 'Y',
    lock_flag = 'N',
    transaction_mode = 3,
    error_code = NULL,
    error_explanation = NULL
    where organization_id =
    and transaction_source_id = ; 

    必须没有任何属于该工单的未计算成本的事务处理在MTL_MATERIAL_TRANSACTIONS这个表格 (WHERE COSTED_FLAG IN ('N', 'E'))

    select request_id, costed_flag, transaction_id,
    transaction_group_id, inventory_item_id, transaction_source_id
    from mtl_material_transactions
    where costed_flag in ('N', 'E')
    and transaction_source_type_id=5
    and organization_id = < org. id > ; 

    更新记录以重新提交给成本管理器。.

    update mtl_material_transactions
    set costed_flag = 'N',
    request_id = NULL,
    transaction_group_id = NULL,
    error_code = NULL,
    error_explanation = NULL
    where costed_flag in ('N', 'E'); 

    重新启动成本管理器。

    如果上述条件都满意,但问题仍然存在 

    更改WIP_DISCRETE_JOBS的状态和从WIP_DJ_CLOSE_TEMP删除。

    1. 你需要用sqlplus的来更新。
    2. 你需要确保Status_type = 5 表示WIP_DISCRETE_JOBS表格中的状态为完成,不收费允许 
    3. 你需要删除在WIP_DJ_CLOSE_TEMP表格中所有相应的记录。

    为了找到此工单的任何行:

    select count (*) from wip_dj_close_temp
    where wip_entity_id = < job's wip entity id>
    and wip_entity_name = < job number > ; 

    1. 在WIP_entities表格检查Entity_type(3 =关闭的离散工作)。
    2. 在Wip_discrete_jobs检查status_type(12 =关闭)。

    注意: 
    文件: wiprsjob.sql 

    这个脚本是用来重置离散任务因为待定事务处理而不能关闭。

    此脚本可以在这里下载;

    重置待关闭离散式工单SQL脚本 Note 106245.1

    6. 未计算成本的事务处理?

    当关闭库存期间结束时,您可能会收到一条讯息,说你不能关闭,因为指定的期间的有未计算成本的事务处理存在。  这可以发生在成本管理工作归结或在运行时撤下,留下一些事务处理在'之间的'状态,存在request_id 但costed_flag设置为'N'。 

    在标准成本的错误信息列在该成本工作程序的日志文件中。  然而,在平均成本的错误是在MMT本身的表格中(error_code,error_explanation)。 

    不得有未计算成本的事务处理在MTL_MATERIAL_TRANSACTIONS(其中COSTED_FLAG在('N’ ,‘E’))

    select request_id, costed_flag, transaction_id,
    transaction_group_id, inventory_item_id, transaction_source_id
    from mtl_material_transactions
    where costed_flag in ('N', 'E')
    and transaction_source_type_id=5
    and organization_id = < org. id > ; 

    (如果这返回任何纪录-未计算成本的事务处理存在)。 

    如果这个表有未计算成本的事务处理的误码出来就可以用此提供的脚本。 

    重要信息:确保您对此纲要没有运行成本管理器。 

    创建一个备份表为您要更新的记录(总是一个很好的做法);

    create table mtl_material_txn_bkup as
    (select * from mtl_material_transactions
    where costed_flag in ('N', 'E'); 

    更新记录重新提交给成本管理器.

    update mtl_material_transactions
    set costed_flag = 'N',
    request_id = NULL,
    transaction_group_id = NULL,
    error_code = NULL,
    error_explanation = NULL
    where costed_flag in ('N','E');

    重新启动管理器来对这种纲要运行成本. 

    要解决任何制品事务处理:

    select transaction_id, request_id, group_id,
    process_status , wip_entity_name
    from wip_cost_txn_interface
    where process_status in ( 1,3) ;
    
    (Process_status = 1表示'待定'3表示“错误”)(即只存在于未计算成本的事务处理于此表)
    

    更新表 :

    update wip_cost_txn_interface
    set request_id = null,
    group_id = null,
    process_status = 1
    where process_status = 3;
    
    (Process_status= ? ( 1表示'待定'  , 3表示“错误”)
    

    接下来的成本管理器运行应该选择他们的事务处理,并重新处理。  如果事务处理失败的原因,即一个错误条件。  costed_flag ='E'。  再就是WIP_COST_TXN_INTERFACE的待定事务处理中process_status = 1。  成本管理是运行的,但从来没有选择这些行进行处理。

    如果您使用的是平均成本,然后验证是否有事务处理在MTL_MATERIAL_TRANSACTIONS报错。  如果一个事务误码在那里,其他在WIP_COST_TXN_INTERFACE的事务处理将不会计算成本。


    如果使用平均成本计算,那么所有事务处理的按照顺序处理。如果一个事务处理错误出来,然后其他事务处理将无法继续处理。

    要确定是否有一个出错的事务处理在MTL_MATERIAL_TRANSACTIONS使用下列脚本:

    select request_id, costed_flag, transaction_id,
    transaction_group_id, inventory_item_id, transaction_source_id
    from mtl_material_transactions
    where costed_flag in ('N', 'E')
    and transaction_source_type_id=5
    and organization_id = < org. id > ; 

    要确定错误发生在本次事务处理,重新处理,并期待它在成本管理日志文件的错误信息. 

    重新处理这个事务处理:

    update mtl_material_transactions
    set costed_flag = 'N',
    request_id = NULL,
    transaction_group_id = NULL,
    error_code = NULL,
    error_explanation = NULL
    where costed_flag in ('N', 'E');
    COMMIT;

    要查看最新运行成本管理器的日志文件,使用系统管理员的职责和查询以‘成本管理器%’开始的请求名称。纠正发生的错误,一旦错误得到妥善处理,成本管理器会开始处理在WIP_COST_TXN_INTERFACE的事物。

    检查是否有需要增加表空间的,并重新提交。一个脚本来检查最大程度的,无效的对象,和表空间如下;

    select owner,object_name, object_type
    from all_objects
    where status = 'INVALID';
    
    select segment_name,tablespace_name,extents,max_extents
    from dba_segments
    where max_extents >5; 

    1. 检查mtl_transaction_accounts所用的表空间。
    2. 检查原物料成本事务处理工作程序(CMCMCW)是否正在运行。.

  • 相关阅读:
    关于不重启Tomcat自动加载改变的class文件
    Oracle数据库查询优化方案
    NavBarControl
    Spring Boot 热部署
    JSR303定义的校验类型
    C# JSON的序列化与反序列化
    常用正则表达式大全——包括校验数字、字符、一些特殊的需求等等
    什么是窗口句柄
    luffy前台配置
    luffy后台相关设置
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299212.html
Copyright © 2020-2023  润新知