931: IS
932: l_status NUMBER;
933: l_err_loc PLS_INTEGER;
934: l_auth_status po_headers_all.authorization_status%type;
935: l_revision po_lines_archive_all.REVISION_NUM%type;
936: BEGIN
937: l_err_loc := 100;
938:
939: l_status := 0;
952: l_err_loc := 200;
953:
954: select max(REVISION_NUM)
955: into l_revision
956: from po_lines_archive_all
957: where po_line_id=p_po_line_id;
958:
959: SELECT 1
960: INTO l_status
957: where po_line_id=p_po_line_id;
958:
959: SELECT 1
960: INTO l_status
961: FROM po_headers_archive_all ph, po_lines_archive_all pl
962: WHERE pl.po_line_id = p_po_line_id
963: AND ph.LATEST_EXTERNAL_FLAG = 'Y'
964: AND pl.REVISION_NUM = l_revision
965: AND ph.po_header_id = pl.po_header_id