|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
在FORM的WHEN-BOUTTON-PRESSED下的代码如下:
DECLARE
CURSOR QUE_ITEMS_CUR IS
select D.SEGMENT1 ITEM,
a.transfer_subinventory WAREHOUSE,
abs(A.transaction_quantity) QUANTITY,
A.shipment_number RECEIPT_NUM,
c.iqc_cd IQC_CD
from MTL_MATERIAL_TRANSACTIONS a
,xpr.xxw_item_temp c
,MTL_SYSTEM_ITEMS_B D
where not exists(select 1 from MTL_MATERIAL_TRANSACTIONS b
where a.shipment_number = b.shipment_number
-- and b.organization_id = c.organization_id
and b.inventory_item_id = c.inventory_item_id
and b.transaction_date >= to_date('2007/08/01','yyyy/mm/dd')
and b.transaction_type_id = '12' )
--and a.organization_id = c.organization_id
AND A.inventory_item_id = D.inventory_item_id
AND A.ORGANIZATION_ID = D.ORGANIZATION_ID
and a.inventory_item_id = c.inventory_item_id
and a.transaction_date >= to_date('2007/08/01','yyyy/mm/dd')
and a.transaction_type_id = '21'
order by receipt_num, item ;
BEGIN
GO_BLOCK('ITEM_MAP');
CLEAR_BLOCK;
FIRST_RECORD;
FOR QUE_RCE IN QUE_ITEMS_CUR LOOP
:ITEM_MAP.ITEM_CODE := QUE_RCE.ITEM;
:ITEM_MAP.WAREHOUSE := QUE_RCE.WAREHOUSE;
:ITEM_MAP.QTY := QUE_RCE.QUANTITY;
:ITEM_MAP.ASN_ID := NULL;
:ITEM_MAP.PO_NUM := NULL;
:ITEM_MAP.LINE := NULL;
:ITEM_MAP.SHIPMENT_ID := NULL;
:ITEM_MAP.PACKING_SLIP := NULL;
:ITEM_MAP.RECEIPT_NUM := QUE_RCE.RECEIPT_NUM;
:ITEM_MAP.IQC := QUE_RCE.IQC_CD;
NEXT_RECORD;
END LOOP;
FIRST_RECORD;
END ;
编译可以正常通过,但RUN时,点BUTTON就会出现如题所示的ERROR"FRM-40735:WHEN-BOUTTON-PRESSED trigger raised unhandled exception ORA-00904",我检查过,列名应该没问题,请各位帮忙看一下问题出在哪?谢谢!! |
|