CREATE OR REPLACE FUNCTION Getitempodesc(p1 IN NUMBER, p2 IN NUMBER) RETURN VARCHAR2 AS
v_tax VARCHAR2(240);
BEGIN
SELECT B.ITEM_DESCRIPTION INTO v_tax FROM Po_headers_all A,
Po_lines_all B
WHERE A.PO_HEADER_ID=B.PO_HEADER_ID
AND A.PO_HEADER_ID=P1
AND B.PO_LINE_ID=P2;
RETURN(v_tax);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN (NULL);
END;
/
v_tax VARCHAR2(240);
BEGIN
SELECT B.ITEM_DESCRIPTION INTO v_tax FROM Po_headers_all A,
Po_lines_all B
WHERE A.PO_HEADER_ID=B.PO_HEADER_ID
AND A.PO_HEADER_ID=P1
AND B.PO_LINE_ID=P2;
RETURN(v_tax);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN (NULL);
END;
/
No comments:
Post a Comment