CREATE OR REPLACE function getpoordqty(p1 in number) return number as
v_qty number;
begin
SELECT NVL(SUM(b.QUANTITY), 0)
into v_qty
FROM rcv_shipment_lines a, po_line_locations b
WHERE a.PO_LINE_LOCATION_ID = b.LINE_LOCATION_ID
AND a.SHIPMENT_LINE_ID = p1;
return v_qty;
exception
when no_data_found then
return null;
end;
/
v_qty number;
begin
SELECT NVL(SUM(b.QUANTITY), 0)
into v_qty
FROM rcv_shipment_lines a, po_line_locations b
WHERE a.PO_LINE_LOCATION_ID = b.LINE_LOCATION_ID
AND a.SHIPMENT_LINE_ID = p1;
return v_qty;
exception
when no_data_found then
return null;
end;
/
No comments:
Post a Comment