490: SELECT po_header_id
491: INTO x_po_header_id
492: FROM po_headers
493: WHERE segment1 = x_document_num
494: AND type_lookup_code IN('STANDARD', 'BLANKET', 'PLANNED');
495: END IF;
496:
497: IF (x_po_header_id IS NOT NULL) THEN
498: SELECT COUNT(*)