You are on page 1of 1

CREATE OR REPLACE function APPS.

get_contract_po(p_po_line_id in number)
return varchar2
is
cursor c1 is
select segment1
from po_headers_all
where po_header_id in (select contract_id
from po_lines_all
where contract_id is not null
and po_line_id = p_po_line_id);

lc_po_no varchar2(240);
begin

open c1;
fetch c1 into lc_po_no;
close c1;

return lc_po_no;

exception when others then return


null;
end get_contract_po;
/

You might also like