0

我正在尝试在 APPS 中运行并发请求,但我不断收到此错误

(Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
PLS-00221: 'XXINV_ITEM_ORACLE_E5B0' is not a procedure or is undefined
ORA-06550: line 1, column 7:  
PL/SQL: Statement ignored)

这是我的包裹体,它只是一个简单的插入。

CREATE OR REPLACE PACKAGE BODY  APPS.XXINV_ITEM_ORACLE_E5B0 IS
PROCEDURE  inv_com_proc (
      o_chr_errbuf     OUT      VARCHAR2,
      o_num_retcode    OUT      NUMBER
  )
AS
  begin
  EXECUTE IMMEDIATE 'TRUNCATE TABLE  XXINV.XXINV_ITEM_ORACLE_E5B0';
  Insert into XXINV.XXINV_ITEM_ORACLE_E5B0(ORGANIZATION_CODE ,
  ITEM_NUM, 
  ON_HAND_QUANTITY ,
  ITEM_TYPE ,
  STATUS ,
  MATERIAL_COST ,
  MATERIAL_OVERHEAD_COST,
  RESOURCE_COST,
  OVERHEAD_COST,
  OUTSIDE_PROCESSING_COST,
  SUBINVENTORY_CODE ,
  LOCATORS )
  select OWNING_ORG_CODE, ITEM_NUMBER, ON_HAND_QUANTITY, ITEM_TYPE, STATUS, MATERIAL_COST ,
  MATERIAL_OVERHEAD_COST,
  RESOURCE_COST,
  OVERHEAD_COST,
  OUTSIDE_PROCESSING_COST,
  SUBINVENTORY_CODE ,
  LOCATOR
  from apps.XXRPT_INV_VALUATION_D535_V
  where apps.XXRPT_INV_VALUATION_D535_V.SUBINVENTORY_CODE = 'FG' AND apps.XXRPT_INV_VALUATION_D535_V.STATUS = 'ONHAND';
  COMMIT;
  END;

end XXINV_ITEM_ORACLE_E5B0;
4

2 回答 2

2

当您在系统管理中定义并发程序可执行文件时,请确保您的执行文件名包含schema.package.procedure,如APPS.XXINV_ITEM_ORACLE_E5B0.inv_com_proc(无括号)。

于 2012-08-03T22:49:33.320 回答
1

看来您正在尝试执行包本身 - 那是行不通的。您必须在包中执行一个过程/函数:

DECLARE
  o_chr_errbuf  VARCHAR2(256);
  o_num_retcode NUMBER;
BEGIN 
  APPS.XXINV_ITEM_ORACLE_E5B0.inv_com_proc ( o_chr_errbuf, o_num_retcode);
END;
/

一个简单的测试:

DECLARE
  err VARCHAR2(256);
  CODE NUMBER;
BEGIN xx(err, CODE); END;

ORA-06550: line 5, column 7:
PLS-00221: 'XX' is not a procedure or is undefined
ORA-06550: line 5, column 7:
PL/SQL: Statement ignored
SQL> SELECT * FROM a;

                                     ID
---------------------------------------
SQL> DECLARE
  2    err VARCHAR2(256);
  3    CODE NUMBER;
  4  BEGIN
  5    xx.tst(err, CODE);
  6  END;
  7  /

PL/SQL procedure successfully completed
SQL> SELECT * FROM a;

                                     ID
---------------------------------------
                                      1
于 2012-08-03T20:22:26.973 回答