DBA Data[Home] [Help]

APPS.PO_ARCHIVE_DOCUMENT_SV dependencies on PO_LINE_LOCATIONS

Line 29: -- Archive PO Line locations

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
30:
31: procedure archive_line_locations(X_po_header_id IN NUMBER, X_revision_num IN NUMBER);
32:
33:

Line 83: -- Archive PO Line locations

79: -- Archive PO Lines
80:
81: archive_lines(X_po_header_id, l_revision_num);
82:
83: -- Archive PO Line locations
84:
85: archive_line_locations(X_po_header_id, l_revision_num);
86:
87: exception

Line 635: -- Archive PO Line locations

631: end;
632:
633: -- * ----------------------------------------------------------------------------------- * --
634:
635: -- Archive PO Line locations
636:
637: procedure archive_line_locations(X_po_header_id IN NUMBER, X_revision_num IN NUMBER)
638: is
639: l_first_count number := 0;

Line 644: from po_line_locations_archive

640: l_second_count number := 0;
641: begin
642:
643: select count(*) into l_first_count
644: from po_line_locations_archive
645: where po_header_id = x_po_header_id;
646:
647: /* Archive the line locations.
648: This will be an exact copy of po_line_locations except for the

Line 648: This will be an exact copy of po_line_locations except for the

644: from po_line_locations_archive
645: where po_header_id = x_po_header_id;
646:
647: /* Archive the line locations.
648: This will be an exact copy of po_line_locations except for the
649: latest_external_flag and the revision_num. Keep the columns
650: in alphabetical order for easy verification.
651: */
652: /* Bug 2704039. As part of time phased FPI project, we added the

Line 658: INSERT INTO PO_LINE_LOCATIONS_ARCHIVE

654: * the where clause below so that if there are any changes to these
655: * dates, the record will be archived.
656: */
657:
658: INSERT INTO PO_LINE_LOCATIONS_ARCHIVE
659: (
660: accrue_on_receipt_flag ,
661: allow_substitute_receipts_flag ,
662: approved_date ,

Line 851: FROM PO_LINE_LOCATIONS POL,

847: POL.unit_meas_lookup_code ,
848: POL.unit_of_measure_class ,
849: POL.ussgl_transaction_code ,
850: POL.consigned_flag -- FPI Consigned Inventory
851: FROM PO_LINE_LOCATIONS POL,
852: PO_LINE_LOCATIONS_ARCHIVE POLA
853: WHERE POL.po_header_id = X_po_header_id
854: AND POL.line_location_id = POLA.line_location_id (+)
855: AND POLA.latest_external_flag (+) = 'Y'

Line 852: PO_LINE_LOCATIONS_ARCHIVE POLA

848: POL.unit_of_measure_class ,
849: POL.ussgl_transaction_code ,
850: POL.consigned_flag -- FPI Consigned Inventory
851: FROM PO_LINE_LOCATIONS POL,
852: PO_LINE_LOCATIONS_ARCHIVE POLA
853: WHERE POL.po_header_id = X_po_header_id
854: AND POL.line_location_id = POLA.line_location_id (+)
855: AND POLA.latest_external_flag (+) = 'Y'
856: AND POL.po_release_id is null

Line 911: from po_line_locations_archive

907: AND POLA.end_date IS NOT NULL)
908: OR (POL.end_date <> POLA.end_date));
909:
910: select count(*) into l_second_count
911: from po_line_locations_archive
912: where po_header_id = x_po_header_id;
913:
914: if l_first_count = l_second_count then
915:

Line 931: UPDATE PO_LINE_LOCATIONS_ARCHIVE POL1

927: header)
928: - have no new archived row
929: */
930:
931: UPDATE PO_LINE_LOCATIONS_ARCHIVE POL1
932: SET latest_external_flag = 'N'
933: WHERE po_header_id = X_po_header_id
934: AND latest_external_flag = 'Y'
935: AND revision_num < X_revision_num;

Line 945: FROM PO_LINE_LOCATIONS_ARCHIVE POL2

941: revision flag for older price breaks.
942:
943: AND EXISTS
944: (SELECT 'A new archived row'
945: FROM PO_LINE_LOCATIONS_ARCHIVE POL2
946: WHERE POL2.line_location_id = POL1.line_location_id
947: AND POL2.latest_external_flag = 'Y'
948: AND POL2.revision_num = X_revision_num);
949: */