Post on 26-Oct-2014
transcript
K e n n y / C r e c y k e n @ g m a i l . c o m | 1
Package for concurrent program
CREATE OR REPLACE PACKAGE APPS.xx_con_prog_pkg IS
PROCEDURE Process_Order( p_errbuf OUT VARCHAR2
, p_retcode OUT VARCHAR2
, p_order_number IN NUMBER);
END xx_con_prog_pkg;
---------------------------
CREATE OR REPLACE PACKAGE body APPS.xx_con_prog_pkg
AS
procedure Process_Order( p_errbuf OUT VARCHAR2
, p_retcode OUT VARCHAR2
, p_order_number IN NUMBER)
IS
CURSOR order_cur IS
SELECT order_number, header_id
FROM oe_order_headers_all
where order_number = p_order_number;
CURSOR line_cur(p_header_id number) IS
SELECT line_id
, ordered_item
FROM oe_order_lines_all
where header_id = p_header_id;
order_rec order_cur%rowtype;
line_rec line_cur%rowtype;
BEGIN
FOR order_rec in order_cur -- order
LOOP
dbms_output.put_line(order_rec.order_number);
Fnd_File.put_line(Fnd_File.LOG, 'Order Number :-'||order_rec.order_number);
Fnd_File.put_line(Fnd_File.OUTPUT, 'Order Number :-'||order_rec.order_number);
for line_rec in line_cur(order_rec.header_ID) -- line
loop
dbms_output.put_line(line_rec.ordered_item);
Fnd_File.put_line(Fnd_File.LOG, 'line Number :-'||line_rec.ordered_item);
Fnd_File.put_line(Fnd_File.OUTPUT, 'line Number :-'||line_rec.ordered_item);
end loop;
END LOOP;
END;
K e n n y / C r e c y k e n @ g m a i l . c o m | 2
END xx_con_prog_pkg;
/
Executable of the concurrent program
Definition of the concurrent program
Parameters of the concurrent program
K e n n y / C r e c y k e n @ g m a i l . c o m | 4
Request group to which concurrent program to be attached
Request submission from responsibility