[Home] [Help]
72: --and pass it as an external parameter
73: BEGIN
74: --This is an autocreate case with idv number populated.
75: SELECT pha.clm_document_number INTO l_idv_number
76: FROM po_headers_draft_all phda, po_headers_all pha
77: WHERE phda.po_header_id = p_doc_header_id
78: AND phda.clm_source_document_id = pha.po_header_id;
79: EXCEPTION
80: WHEN No_Data_Found THEN
5261:
5262: --If draft_id is populated then this is a modification case
5263: IF p_draft_id IS NOT NULL AND p_draft_id <> -1 THEN
5264: SELECT uda_template_id INTO l_template_id
5265: FROM po_headers_draft_all
5266: WHERE po_header_id = p_po_header_id
5267: AND draft_id = p_draft_id;
5268:
5269: l_context_usage := 'Modification';