Hi All,
I am facing the below error while executing a procedure.
Below is the error:
*
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "APPS.BULK_ITEM_INTERFACE_INSERT", line 266
ORA-06512: at line 1
Below is my Procedure:
CREATE OR REPLACE PROCEDURE bulk_item_interface_insert
IS
CURSOR cur_item_assgn
IS
SELECT BLA BLA BLA,
1 inventory_item_id, stg.organization_id organization_id,
FROM my_staging_table stg
WHERE request_id = 697776 AND status = 'P';
TYPE t_item_intf_tbl IS TABLE OF mtl_system_items_interface%ROWTYPE;
g_login_id NUMBER := 1227;
g_user_id NUMBER := 1227;
l_item_intf_tbl t_item_intf_tbl;
BEGIN
OPEN cur_item_assgn;
FETCH cur_item_assgn
BULK COLLECT INTO l_item_intf_tbl;
FORALL i IN l_item_intf_tbl.FIRST .. l_item_intf_tbl.LAST SAVE EXCEPTIONS
INSERT INTO mtl_system_items_interface
(inventory_item_id
)
VALUES ((l_item_intf_tbl (i).inventory_item_id)
);
EXCEPTION
WHEN OTHERS
THEN
RAISE;
END;
/
The strange thing is when I am using FOR LOOP I dont get any error.