118: -- Get org context for the PO
119: BEGIN
120: select org_id
121: into l_org_id
122: from po_headers_all
123: where po_header_id = p_po_header_id_t;
124: EXCEPTION
125: WHEN NO_DATA_FOUND THEN
126: raise_application_error(-20001,'Org Id not found for ' || to_char(p_po_header_id_t));
516: */
517:
518: select agent_id
519: into l_buyer_id
520: from po_headers_all
521: where po_header_id = p_po_header_id_t;
522:
523: select count(*)
524: into x_note_count
847: group by rti.header_interface_id;
848:
849: select org_id
850: into l_org_id
851: from po_headers_all
852: where po_header_id = l_po_header_id;
853:
854: fnd_client_info.set_org_context(to_char(l_org_id));
855: