165: select poh.segment1 || '-' || poh.revision_num, polc.displayed_field, poh.agent_id,
166: poh.acceptance_required_flag, poh.acceptance_due_date, poh.org_id
167: into x_document_num, x_document_type, x_agent_id, x_acceptance_required_flag,
168: x_acceptance_due_date, x_org_id
169: from po_headers_all poh,
170: po_lookup_codes polc
171: where poh.po_header_id = x_document_id
172: and poh.type_lookup_code = polc.lookup_code
173: and polc.lookup_type = 'PO TYPE';
182: por.acceptance_required_flag, por.acceptance_due_date, por.agent_id
183: into x_release_num, x_agent_id, x_document_num, x_document_type, x_acceptance_required_flag,
184: x_acceptance_due_date, x_agent_id
185: from po_releases_all por,
186: po_headers_all poh,
187: po_lookup_codes polc
188: where por.po_release_id = x_document_id
189: and por.po_header_id = poh.po_header_id
190: and polc.lookup_type = 'DOCUMENT TYPE'
305: x_Po_Header_Id := x_document_id;
306:
307: select revision_num
308: into x_revision_num
309: from po_headers
310: where po_header_id = x_document_id;
311: else
312: x_Po_Release_Id := x_document_id;
313:
412: where po_release_id = document_id;
413: else
414: select nvl(acceptance_required_flag, 'N')
415: into x_acceptance_required
416: from po_headers
417: where po_header_id = document_id;
418: end if;
419: exception
420: when others then
482: poh.org_id
483: into x_document_num, x_document_type, x_agent_id,
484: x_acceptance_required_flag,
485: x_acceptance_due_date, x_org_id
486: from po_headers_all poh,
487: po_lookup_codes polc
488: where poh.po_header_id = x_document_id
489: and poh.type_lookup_code = polc.lookup_code
490: and polc.lookup_type = 'PO TYPE';
501: into x_release_num, x_agent_id, x_document_num, x_document_type,
502: x_acceptance_required_flag,
503: x_acceptance_due_date, x_agent_id
504: from po_releases_all por,
505: po_headers_all poh,
506: po_lookup_codes polc
507: where por.po_release_id = x_document_id
508: and por.po_header_id = poh.po_header_id
509: and polc.lookup_type = 'DOCUMENT TYPE'