寻找EBS 11i Mtl_Item_Categories

背景:

这两天在做客户化物料编码导入的功能,发现请求运行完毕后,竟然警告了!“Warning : Validation Errors Occured. Please check MTL_INTERFACE_ERRORS Table”,不明所以,追查接口表,报错内容如下:“无法在“组织物料”中创建/删除物料控制的类别集。”,对应英文代码:“INV_CAT_CANNOT_CREATE_DELETE”。

查找问题:

比对此版本代码与过往版本代码的区别。最后发现如下:

新版本代码中采用了insert Mtl_Item_Categories_Interface 的方式以定义料以及其类别的关系;

旧版本代码中采用的是update Mtl_Item_Categories 表的方式。

为什么旧版本运行正常无警告?肯定是标准功能已经做过了insert Mtl_Item_Categories 的操作。那么该操作在什么地方实现的?

首先想到的是物料表 mtl_system_item_b 触发器。追查了半天,在trigger MTL_SYSTEM_ITEMS_T1 中发现一段代码,用于插入至Mtl_Item_Categories,不过该段代码被注释,详情如下:

/* Bug:2948014 Already supported by INVIDIT2.Insert_Cost_Details
   So, calling the same from IOI (UPD2B), already calling form forms(VITMB)
               if :new.inventory_asset_flag = ‘Y‘ then
                     -- insert default material overhead or TL matl cost
                      --  row in CST_ITEM_COST_DETAILS depending on cost method
                     l_sql_stmt_num := 30;
-- begin bug 2103959
--mtl_item_categories has to be updated before calling CSTPIDIO
 insert into mtl_item_categories
        (inventory_item_id,
         category_set_id,
         category_id,
         last_update_date,
         last_updated_by,
         creation_date,
         created_by,
         last_update_login,
         program_application_id,
         program_id,
         program_update_date,
         request_id,
         organization_id)
    select  :new.inventory_item_id,
        s.category_set_id,
        s.default_category_id,
        sysdate,
        -1,
        sysdate,
        -1,
        -1,
        -1,
        -1,
        sysdate,
        -1,
       :new.organization_id
    from    mtl_category_sets_B s
    where   s.category_set_id in
        (select d.category_set_id
        from    mtl_default_category_sets d
        where   d.functional_area_id = 5)
    and not exists
       ( select  ‘x‘
         from    mtl_item_categories c
         where   c.inventory_item_id = :new.inventory_item_id
         and     c.organization_id = :new.organization_id
         and     c.category_set_id = s.category_set_id
       );
-- end bug 2103959
                     CSTPIDIC.CSTPIDIO(:new.inventory_item_id,
                              :new.organization_id,
                              :new.last_updated_by,
                              l_cost_type_id,
                              :new.planning_make_buy_code,
                              :new.std_lot_size,
                              l_shrinkage_rate,
                              l_return_code,
                              l_return_err);
                      if l_return_code <> 0 then
                            l_sql_stmt_num := 35;
                            raise_application_error(-20000,l_return_err);
                      end if;
               end if;
Bug:2948014 Ended*/

原来如此,oracle修复bug时将此功能移动到其他地方了。遂前往INVIDIT2.Insert_Cost_Details 查看。在Insert_Costing_Category 过程中发现了insert,代码如下:

PROCEDURE Insert_Costing_Category
(
   X_item_id        number
,  X_org_id     number
)
IS
   l_user_id     NUMBER  :=  NVL(FND_GLOBAL.User_Id, 0);
BEGIN
   insert into mtl_item_categories
        (inventory_item_id,
         category_set_id,
         category_id,
         last_update_date,
         last_updated_by,
         creation_date,
         created_by,
         last_update_login,
         program_application_id,
         program_id,
         program_update_date,
         request_id,
         organization_id)
   select
        X_item_id,
        s.category_set_id,
        s.default_category_id,
        sysdate,
        l_user_id,
        sysdate,
        l_user_id,
        -1,
        -1,
        -1,
        NULL,
        -1,
        X_org_id
    from    mtl_category_sets_B s
    where   s.category_set_id in
        (select d.category_set_id
        from    mtl_default_category_sets d
        where   d.functional_area_id = 5)
    and not exists
       ( select  ‘x‘
         from    mtl_item_categories c
         where   c.inventory_item_id = X_item_id
         and     c.organization_id = X_org_id
         and     c.category_set_id = s.category_set_id
       );
END Insert_Costing_Category;

哈, 至此,原因找到!

方案:

将新版本中的insert interface代码修改为源版本中的update即可。

寻找EBS 11i Mtl_Item_Categories

时间: 2024-10-13 18:39:16

寻找EBS 11i Mtl_Item_Categories的相关文章

ORACLE EBS 11i安装(后)常见问题

ORACLE EBS 11i安装(后)常见问题 问题一:ERP系统安装过程中出错RW-50004: Error code received when running external process.Check log file for details.Running Database Install Driver for VIS instance处理方法:检查日志发现错误发生于以下阶段的错误ALTER DATABASE RENAME GLOBAL_NAME TO VIS.ec-sichuan.

EBS 11i ojspCompile.pl 编译jsp乱码 encoding

11i环境,一般来说jsp是重启apache后自动编译的,但是因为某些环境设置,需要手动编译jsp. 11i的编译路径:$JTF_TOP/admin/scripts/ojspCompile.pl 编译命令:perl $JTF_TOP/admin/scripts/ojspCompile.pl --compile -p 16 -s xxx.jsp 一个简单的jsp文件test1.jsp,文件编码格式GB2312,代码如下: <%@page language="java" conten

EBS 11i 日志 log

1.默认网络端口: 1).EBS11i 用到的所有端口 s_dbport=1521 s_webport=8000 s_webport_pls=8200 s_oprocmgr_port=8100 s_formsport=9000 s_metdataport=9100 s_metreqport=9200 s_forms_servlet_portrange=18000-18009 s_rpcport=1626 s_repsport=7000 s_servletport=8800 s_jtfuf_por

EBS 11i 判断库存组织是否为工程类

代码如下: SELECT COUNT(1) -- INTO v_Count   FROM Org_Organization_Definitions Ood, Hr_All_Organization_Units Haou  WHERE 1 = 1    AND Ood.Organization_Code = '&Organization_Code'    AND Ood.Organization_Id = Haou.Organization_Id    AND Haou.Internal_Exte

Oracle EBS 11i x86-64 的预安装

1.EBS11i的软件组成,28个zip包 Oracle ApplicationsOracle Application with NLSOracle Database technology stack (RDBMS)Oracle Application database (Databases)Oracle Application technolgy stack (Tools)APPL_TOP 2.第一个要安装的软件 Install Start Here ,B34554-01.zip mkdir

EBS initialization parameters - Healthcheck

APPLIES TO: Oracle EBS Applications Performance - Version 11.5.10.2 to 12.2 [Release 11.5.10 to 12.2] Oracle Shipping Execution - Version 11.5.10.2 to 11.5.10.2 [Release 11.5.10] Information in this document applies to any platform. EBS 11i and R12 P

Oracle EBS R12文件系统结构(学习汇总网上资料)

Oracle EBS R12在服务器端文件结构如下: 顶层目录下面分为 1)inst --–跟ebs整个实例(instance)相关的配置信息以及其他信息 2)  db   ---主要存储DB层的信息 3)  apps ---主要是应用层的信息 1)首先来看 INST_TOP的情况 2) 再来看 数据库的内容的情况 3) 最后是apps的内容 上图文件夹的说明如下: apps_st/appl ----按照product分开(hr,pay,gl等),每个product都有一个单独的文件夹.比方说a

Understanding Item Import and Debugging Problems with Item Import (Doc ID 268968.1)

In this Document Purpose Details   Scenario 1: Testing the basic item import with minimum columns populated   Scenario 2: To import items and use item templates   Scenario 3: To import items and material cost associated to it.   Scenario 4: To import

oajinit下载路径

ebs 11i版本用到oajinit,通常版本是1.3.1.18~1.3.1.26之间. 服务器文件路径:$OAD_TOP/../*ora/iAS/Apache/Apache/htdocs/discwb4/jinit/oajinit.exe 另外1.3.1.18版本貌似用IE8访问总是类加载失败,得用IE6,很奇怪,不知是系统问题还是别的原因. 附件:jvm,适用于闪退.页面崩溃等问题.