[Home] [Help]
43: IF (PO_LOG.d_proc) THEN
44: PO_LOG.proc_begin(d_module);
45: END IF;
46:
47: DELETE FROM po_headers_draft_all
48: WHERE draft_id = p_draft_id
49: AND po_header_id = NVL(p_po_header_id, po_header_id);
50:
51: d_position := 10;
144: PO_LOG.stmt(d_module, d_position, 'transfer records from txn to dft');
145: END IF;
146:
147: FORALL i IN 1..p_po_header_id_tbl.COUNT
148: INSERT INTO po_headers_draft_all
149: ( draft_id,
150: delete_flag,
151: change_accepted_flag,
152: po_header_id,
478: PO_LOG.stmt(d_module, d_position, 'transfer count = ' || SQL%ROWCOUNT);
479: END IF;
480:
481: FORALL i IN 1..p_po_header_id_tbl.COUNT
482: UPDATE po_headers_draft_all
483: SET delete_flag = p_delete_flag_tbl(i)
484: WHERE po_header_id = p_po_header_id_tbl(i)
485: AND draft_id = p_draft_id_tbl(i)
486: AND NVL(delete_flag, 'N') <> 'Y' -- bug5570989
627:
628: DELETE FROM po_headers_all PH
629: WHERE PH.po_header_id IN
630: ( SELECT PHD.po_header_id
631: FROM po_headers_draft_all PHD
632: WHERE PHD.draft_id = p_draft_id
633: AND PHD.delete_flag = 'Y'
634: AND NVL(PHD.change_accepted_flag, 'Y') = 'Y');
635:
824: PHD.cpa_reference,
825: PHD.style_id,
826: PHD.tax_attribute_update_code, --
827: PHD.pay_when_paid -- E and C ER
828: FROM po_headers_draft_all PHD
829: WHERE PHD.draft_id = p_draft_id
830: AND NVL(PHD.change_accepted_flag, 'Y') = 'Y'
831: ) PHDV
832: ON (PH.po_header_id = PHDV.po_header_id)
1322: END IF;
1323:
1324: SELECT 1
1325: INTO l_dummy
1326: FROM po_headers_draft_all
1327: WHERE po_header_id = p_po_header_id
1328: AND draft_id = p_draft_id
1329: FOR UPDATE NOWAIT;
1330: