DBA Data[Home] [Help]

APPS.PO_DOCUMENT_ARCHIVE_PVT dependencies on PO_DISTRIBUTIONS

Line 2169: -- PO_DISTRIBUTIONS_ARCHIVE

2165: --Name: ARCHIVE_DISTRIBUTIONS
2166: --Pre-reqs:
2167: -- None.
2168: --Modifies:
2169: -- PO_DISTRIBUTIONS_ARCHIVE
2170: --Locks:
2171: -- None.
2172: --Function:
2173: -- Arcives the po document distributions.

Line 2220: 'INSERT PO_DISTRIBUTIONS_ARCHIVE');

2216:
2217: l_module := G_MODULE_PREFIX||l_api_name||'.'||l_progress||'.';
2218: IF G_FND_DEBUG = 'Y' AND G_FND_DEBUG_LEVEL <= FND_LOG.LEVEL_STATEMENT THEN
2219: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
2220: 'INSERT PO_DISTRIBUTIONS_ARCHIVE');
2221: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
2222: 'CLM Flag : ' || l_clm_flag);
2223: END IF;
2224:

Line 2225: INSERT INTO PO_DISTRIBUTIONS_ARCHIVE_ALL

2221: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
2222: 'CLM Flag : ' || l_clm_flag);
2223: END IF;
2224:
2225: INSERT INTO PO_DISTRIBUTIONS_ARCHIVE_ALL
2226: (accrual_account_id,
2227: accrue_on_receipt_flag,
2228: accrued_flag,
2229: amount_billed,

Line 2492: FROM PO_DISTRIBUTIONS_ALL POD,

2488: ,POD.CHANGE_IN_FUNDED_VALUE
2489: ,POD.USSGL_TRANSACTION_CODE
2490: --
2491: ,POD.clm_payment_sequence_num --
2492: FROM PO_DISTRIBUTIONS_ALL POD,
2493: PO_DISTRIBUTIONS_ARCHIVE_ALL PODA
2494: WHERE ((p_document_type = 'RELEASE' AND
2495: POD.po_release_id = p_document_id) OR
2496: (p_document_type <> 'RELEASE' AND -- Bug 3210749

Line 2493: PO_DISTRIBUTIONS_ARCHIVE_ALL PODA

2489: ,POD.USSGL_TRANSACTION_CODE
2490: --
2491: ,POD.clm_payment_sequence_num --
2492: FROM PO_DISTRIBUTIONS_ALL POD,
2493: PO_DISTRIBUTIONS_ARCHIVE_ALL PODA
2494: WHERE ((p_document_type = 'RELEASE' AND
2495: POD.po_release_id = p_document_id) OR
2496: (p_document_type <> 'RELEASE' AND -- Bug 3210749
2497: POD.po_header_id = p_document_id AND

Line 2569: 'Update PO_DISTRIBUTIONS_ARCHIVE to reset latest_external_flag');

2565: l_progress := '020';
2566: l_module := G_MODULE_PREFIX||l_api_name||'.'||l_progress||'.';
2567: IF G_FND_DEBUG = 'Y' AND G_FND_DEBUG_LEVEL <= FND_LOG.LEVEL_STATEMENT THEN
2568: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
2569: 'Update PO_DISTRIBUTIONS_ARCHIVE to reset latest_external_flag');
2570: END IF;
2571:
2572: -- Bug 3648552 START
2573: -- Get PO_HEADER_ID for Release since there is no index on

Line 2574: -- PO_DISTRIBUTIONS_ARCHIVE_ALL.po_release_id

2570: END IF;
2571:
2572: -- Bug 3648552 START
2573: -- Get PO_HEADER_ID for Release since there is no index on
2574: -- PO_DISTRIBUTIONS_ARCHIVE_ALL.po_release_id
2575: IF (p_document_type = 'RELEASE') THEN
2576: SELECT po_header_id
2577: INTO l_po_header_id
2578: FROM po_releases_all

Line 2587: -- If a row was inserted into PO_DISTRIBUTIONS_ARCHIVE, then set the appropriate flags

2583: l_po_release_id := NULL;
2584: END IF;
2585: -- Bug 3648552 END
2586:
2587: -- If a row was inserted into PO_DISTRIBUTIONS_ARCHIVE, then set the appropriate flags
2588: UPDATE PO_DISTRIBUTIONS_ARCHIVE_ALL POD1
2589: SET latest_external_flag = 'N'
2590: -- Bug 3648552 START
2591: WHERE po_header_id = l_po_header_id

Line 2588: UPDATE PO_DISTRIBUTIONS_ARCHIVE_ALL POD1

2584: END IF;
2585: -- Bug 3648552 END
2586:
2587: -- If a row was inserted into PO_DISTRIBUTIONS_ARCHIVE, then set the appropriate flags
2588: UPDATE PO_DISTRIBUTIONS_ARCHIVE_ALL POD1
2589: SET latest_external_flag = 'N'
2590: -- Bug 3648552 START
2591: WHERE po_header_id = l_po_header_id
2592: -- Bug 3713788: fixed regression caused by bug 3648552

Line 2599: FROM PO_DISTRIBUTIONS_ARCHIVE_ALL POD2

2595: AND latest_external_flag = 'Y'
2596: AND revision_num < p_revision_num
2597: AND EXISTS
2598: (SELECT 'A new archived row'
2599: FROM PO_DISTRIBUTIONS_ARCHIVE_ALL POD2
2600: WHERE POD2.po_distribution_id = POD1.po_distribution_id
2601: AND POD2.latest_external_flag = 'Y'
2602: AND POD2.revision_num = p_revision_num);
2603: ELSE

Line 3148: * PO_PRICE_DIFFERENTIALS and PO_DISTRIBUTIONS.

3144: * Case entity.document_subtype is
3145: * When STANDARD or PLANNED
3146: * archive PO_HEADERS
3147: * when modified archive PO_LINES, PO_LINE_LOCATIONS,
3148: * PO_PRICE_DIFFERENTIALS and PO_DISTRIBUTIONS.
3149: * End Case
3150: * When PA
3151: * Case entity.document_subtype is
3152: * When BLANKET

Line 3163: * when modified archive PO_LINE_LOCATIONS and PO_DISTRIBUTIONS.

3159: * If global_agreement_flag = Y (i.e. global blanket or global contract) --
3160: * When modified, archive PO_GA_ORG_ASSIGNMENT
3161: * When RELEASE
3162: * archive PO_RELEASES
3163: * when modified archive PO_LINE_LOCATIONS and PO_DISTRIBUTIONS.
3164: * End Case
3165: *
3166: * IF error happens, rollback to the savepoint;
3167: *

Line 6845: l_from_po_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;

6841: l_from_po_line_id PO_LINES_ALL.po_line_id%TYPE;
6842: l_to_po_line_id FND_ATTACHED_DOCUMENTS.pk2_value%TYPE;
6843: l_from_line_location_id PO_LINE_LOCATIONS_ALL.line_location_id%TYPE;
6844: l_to_line_location_id FND_ATTACHED_DOCUMENTS.pk2_value%TYPE;
6845: l_from_po_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
6846: l_to_po_distribution_id FND_ATTACHED_DOCUMENTS.pk2_value%TYPE;
6847:
6848: -- Cursor definitions:
6849:

Line 6862: CURSOR po_distribution_cursor(p_line_location_id po_distributions.line_location_id%TYPE) IS

6858: FROM PO_LINE_LOCATIONS_ALL
6859: WHERE po_line_id = p_po_line_id
6860: ORDER BY shipment_num;
6861:
6862: CURSOR po_distribution_cursor(p_line_location_id po_distributions.line_location_id%TYPE) IS
6863: SELECT po_distribution_id
6864: FROM PO_DISTRIBUTIONS_ALL
6865: WHERE line_location_id = p_line_location_id
6866: ORDER BY distribution_num;

Line 6864: FROM PO_DISTRIBUTIONS_ALL

6860: ORDER BY shipment_num;
6861:
6862: CURSOR po_distribution_cursor(p_line_location_id po_distributions.line_location_id%TYPE) IS
6863: SELECT po_distribution_id
6864: FROM PO_DISTRIBUTIONS_ALL
6865: WHERE line_location_id = p_line_location_id
6866: ORDER BY distribution_num;
6867:
6868: BEGIN

Line 7003: fnd_attached_documents2_pkg.copy_attachments('PO_DISTRIBUTIONS',

6999: 'Copy Distribution Attachments from pk1_value: '|| l_from_po_distribution_id
7000: || ' to pk1_value: '||l_to_po_distribution_id);
7001: END IF;
7002:
7003: fnd_attached_documents2_pkg.copy_attachments('PO_DISTRIBUTIONS',
7004: l_from_po_distribution_id,
7005: '',
7006: '',
7007: '',

Line 7009: 'PO_DISTRIBUTIONS',

7005: '',
7006: '',
7007: '',
7008: '',
7009: 'PO_DISTRIBUTIONS',
7010: l_to_po_distribution_id,
7011: '',
7012: '',
7013: '',