DBA Data[Home] [Help]

APPS.PO_ARCHIVE_DOCUMENT_SV dependencies on PO_LINES

Line 12: Added 5 fields in the insert statement of PO_LINES_ARCHIVE view.

8: OWNER: Imran Ali
9:
10: CHANGE HISTORY: Created 02/17/98 Iali
11: 03/30/00 Preetam Bamb (GML-OPM)
12: Added 5 fields in the insert statement of PO_LINES_ARCHIVE view.
13: */
14:
15: -- *************************************************************************************** --
16:

Line 25: -- Archive PO Lines

21: -- Archive PO Header
22:
23: procedure archive_header(X_po_header_id IN NUMBER);
24:
25: -- Archive PO Lines
26:
27: procedure archive_lines(X_po_header_id IN NUMBER, X_revision_num IN NUMBER);
28:
29: -- Archive PO Line locations

Line 79: -- Archive PO Lines

75: -- Archive PO header
76:
77: archive_header(X_po_header_id);
78:
79: -- Archive PO Lines
80:
81: archive_lines(X_po_header_id, l_revision_num);
82:
83: -- Archive PO Line locations

Line 320: -- Archive PO Lines

316: end;
317:
318: -- * ----------------------------------------------------------------------------------- * --
319:
320: -- Archive PO Lines
321:
322: procedure archive_lines(X_po_header_id IN NUMBER, X_revision_num IN NUMBER)
323: is
324: l_first_count number := 0;

Line 329: from po_lines_archive

325: l_second_count number := 0;
326: begin
327:
328: select count(*) into l_first_count
329: from po_lines_archive
330: where po_header_id = x_po_header_id;
331:
332: /* Archive the lines.
333: This will be an exact copy of po_lines except for the

Line 333: This will be an exact copy of po_lines except for the

329: from po_lines_archive
330: where po_header_id = x_po_header_id;
331:
332: /* Archive the lines.
333: This will be an exact copy of po_lines except for the
334: latest_external_flag and the revision_num. Keep the columns
335: in alphabetical order for easy verification.
336: */
337: INSERT INTO PO_LINES_ARCHIVE

Line 337: INSERT INTO PO_LINES_ARCHIVE

333: This will be an exact copy of po_lines except for the
334: latest_external_flag and the revision_num. Keep the columns
335: in alphabetical order for easy verification.
336: */
337: INSERT INTO PO_LINES_ARCHIVE
338: (
339: allow_price_override_flag ,
340: attribute1 ,
341: attribute10 ,

Line 510: FROM PO_LINES POL,

506: POL.base_uom ,
507: POL.secondary_qty ,
508: POL.secondary_uom ,
509: POL.qc_grade
510: FROM PO_LINES POL,
511: PO_LINES_ARCHIVE POLA
512: WHERE POL.po_header_id = X_po_header_id
513: AND POL.po_line_id = POLA.po_line_id (+)
514: AND POLA.latest_external_flag (+) = 'Y'

Line 511: PO_LINES_ARCHIVE POLA

507: POL.secondary_qty ,
508: POL.secondary_uom ,
509: POL.qc_grade
510: FROM PO_LINES POL,
511: PO_LINES_ARCHIVE POLA
512: WHERE POL.po_header_id = X_po_header_id
513: AND POL.po_line_id = POLA.po_line_id (+)
514: AND POLA.latest_external_flag (+) = 'Y'
515: AND (

Line 594: from po_lines_archive

590: OR (POL.expiration_date IS NOT NULL
591: AND POLA.expiration_date IS NULL));
592:
593: select count(*) into l_second_count
594: from po_lines_archive
595: where po_header_id = x_po_header_id;
596:
597: if l_first_count = l_second_count then
598:

Line 614: UPDATE PO_LINES_ARCHIVE POL1

610: header)
611: - have no new archived row
612: */
613:
614: UPDATE PO_LINES_ARCHIVE POL1
615: SET latest_external_flag = 'N'
616: WHERE po_header_id = X_po_header_id
617: AND latest_external_flag = 'Y'
618: AND revision_num < X_revision_num

Line 621: FROM PO_LINES_ARCHIVE POL2

617: AND latest_external_flag = 'Y'
618: AND revision_num < X_revision_num
619: AND EXISTS
620: (SELECT 'A new archived row'
621: FROM PO_LINES_ARCHIVE POL2
622: WHERE POL2.po_line_id = POL1.po_line_id
623: AND POL2.latest_external_flag = 'Y'
624: AND POL2.revision_num = X_revision_num);
625: