DBA Data[Home] [Help]

APPS.PO_AP_PURGE_PVT dependencies on PO_DISTRIBUTIONS

Line 1786: -- The subquery on po_distributions is to make sure that no invoice

1782: IF (p_purge_category = PO_AP_PURGE_GRP.G_PUR_CAT_SIMPLE_PO) THEN
1783:
1784: l_progress := '010';
1785:
1786: -- The subquery on po_distributions is to make sure that no invoice
1787: -- has matched to this PO yet
1788:
1789: --SQL What: Generate a list of POs that are eligibible for purge
1790: --SQL Why: This is the initial list of pos to be purged. There

Line 1826: FROM po_distributions PD

1822: WHERE PLL.po_header_id = PH.po_header_id
1823: AND PLL.last_update_date > p_last_activity_date)
1824: AND NOT EXISTS
1825: (SELECT NULL
1826: FROM po_distributions PD
1827: WHERE PD.po_header_id = PH.po_header_id
1828: AND (PD.last_update_date > p_last_activity_date
1829: OR
1830: EXISTS

Line 1887: FROM po_distributions PD

1883: WHERE PLL.po_header_id = PH.po_header_id
1884: AND PLL.last_update_date > p_last_activity_date)
1885: AND NOT EXISTS
1886: (SELECT NULL
1887: FROM po_distributions PD
1888: WHERE PD.po_header_id = PH.po_header_id
1889: AND PD.last_update_date > p_last_activity_date)
1890: AND NOT EXISTS
1891: (SELECT NULL

Line 2634: FROM po_distributions PD

2630: SET PPL.double_check_flag = 'N'
2631: WHERE PPL.double_check_flag = 'Y'
2632: AND EXISTS (
2633: SELECT NULL
2634: FROM po_distributions PD
2635: WHERE PPL.po_header_id = PD.po_header_id
2636: AND PD.project_id IS NOT NULL
2637: AND PD.destination_type_code = 'EXPENSE');
2638:

Line 2664: FROM po_distributions PD

2660: SET PPL.double_check_flag = 'N'
2661: WHERE PPL.double_check_flag = 'Y'
2662: AND EXISTS (
2663: SELECT NULL
2664: FROM po_distributions PD
2665: WHERE PPL.po_header_id = PD.po_header_id
2666: AND PD.project_id IS NOT NULL
2667: AND PD.destination_type_code IN ('INVENTORY',
2668: 'SHOP FLOOR'));

Line 3006: FROM po_distributions PD,

3002: SET PPL.double_check_flag = 'N'
3003: WHERE PPL.double_check_flag = 'Y'
3004: AND EXISTS (
3005: SELECT NULL
3006: FROM po_distributions PD,
3007: ap_invoice_distributions AD
3008: WHERE PD.po_header_id = PPL.po_header_id
3009: AND AD.po_distribution_id = PD.po_distribution_id
3010: AND NOT EXISTS (

Line 3410: FROM po_distributions PD

3406: AND PPD.last_update_date >
3407: p_last_activity_date)))
3408: AND NOT EXISTS
3409: (SELECT NULL
3410: FROM po_distributions PD
3411: WHERE PD.po_header_id = PPL.po_header_id
3412: AND (PD.last_update_date > p_last_activity_date
3413: OR
3414: EXISTS

Line 3479: FROM po_distributions PD

3475: AND PPD.last_update_date >
3476: p_last_activity_date)))
3477: AND NOT EXISTS
3478: (SELECT NULL
3479: FROM po_distributions PD
3480: WHERE PD.po_header_id = PH.po_header_id
3481: AND PD.last_update_date >
3482: p_last_activity_date));
3483:

Line 4994: --SQL What: Delete po distributions with header within the range

4990: END IF;
4991:
4992: l_progress := '080';
4993:
4994: --SQL What: Delete po distributions with header within the range
4995: DELETE
4996: FROM po_distributions PD
4997: WHERE EXISTS (
4998: SELECT NULL

Line 4996: FROM po_distributions PD

4992: l_progress := '080';
4993:
4994: --SQL What: Delete po distributions with header within the range
4995: DELETE
4996: FROM po_distributions PD
4997: WHERE EXISTS (
4998: SELECT NULL
4999: FROM po_purge_po_list PPL
5000: WHERE PPL.po_header_id = PD.po_header_id

Line 5019: FROM po_distributions_archive PDA

5015: l_progress := '090';
5016:
5017: --SQL What: Delete po dist archive with header within the range
5018: DELETE
5019: FROM po_distributions_archive PDA
5020: WHERE EXISTS (
5021: SELECT NULL
5022: FROM po_purge_po_list PPL
5023: WHERE PPL.po_header_id = PDA.po_header_id