607: select distinct POH.po_header_id,
608: POH.closed_date
609: into l_header_id,
610: l_header_close_date
611: from po_headers_all POH,
612: po_line_locations_all PLL
613: where POH.po_header_id = PLL.po_header_id
614: and PLL.line_location_id = l_line_loc_id;
615:
614: and PLL.line_location_id = l_line_loc_id;
615:
616: if (l_header_close_date is not null and
617: l_header_close_date < c_sweep_to_date) then
618: update po_headers
619: set closed_date = c_sweep_to_date
620: where po_header_id = l_header_id;
621: end if;
622: end if;