DBA Data[Home] [Help]

APPS.IGC_CBC_PO_GRP dependencies on PO_DISTRIBUTIONS

Line 10: -- cursor to return max and min gl dates for PO distributions

6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'IGC_CBC_PO_GRP';
7: --
8:
9: -- Some Common Cursors
10: -- cursor to return max and min gl dates for PO distributions
11:
12: CURSOR c_po_dates(p_document_id po_distributions.po_header_id%TYPE)
13: IS
14: SELECT max(pod.gl_encumbered_date)

Line 12: CURSOR c_po_dates(p_document_id po_distributions.po_header_id%TYPE)

8:
9: -- Some Common Cursors
10: -- cursor to return max and min gl dates for PO distributions
11:
12: CURSOR c_po_dates(p_document_id po_distributions.po_header_id%TYPE)
13: IS
14: SELECT max(pod.gl_encumbered_date)
15: ,min(pod.gl_encumbered_date)
16: FROM po_distributions pod,

Line 16: FROM po_distributions pod,

12: CURSOR c_po_dates(p_document_id po_distributions.po_header_id%TYPE)
13: IS
14: SELECT max(pod.gl_encumbered_date)
15: ,min(pod.gl_encumbered_date)
16: FROM po_distributions pod,
17: po_lines pol,
18: po_line_locations poll
19: WHERE pol.po_header_id = p_document_id
20: AND NVL(pol.closed_code,'X') <> 'FINALLY CLOSED'

Line 55: CURSOR c_rel_dates(p_document_id po_distributions.po_release_id%TYPE)

51: AND lines.source_type_code = 'VENDOR';
52: -- AND NVL(dists.prevent_encumbrance_flag,'N') = 'N';
53:
54: -- cursor to return max and min gl dates for releases
55: CURSOR c_rel_dates(p_document_id po_distributions.po_release_id%TYPE)
56: IS
57: SELECT max(pod.gl_encumbered_date)
58: ,min(pod.gl_encumbered_date)
59: FROM po_distributions pod,

Line 59: FROM po_distributions pod,

55: CURSOR c_rel_dates(p_document_id po_distributions.po_release_id%TYPE)
56: IS
57: SELECT max(pod.gl_encumbered_date)
58: ,min(pod.gl_encumbered_date)
59: FROM po_distributions pod,
60: po_line_locations poll
61: WHERE pod.po_release_id = p_document_id
62: AND poll.po_release_id = p_document_id
63: AND NVL(poll.closed_code,'X') <> 'FINALLY CLOSED'

Line 314: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;

310: l_api_name CONSTANT VARCHAR2(30) := 'CBC_HEADER_VALIDATIONS';
311:
312: l_sob_id financials_system_parameters.set_of_books_id%TYPE;
313: l_document_id NUMBER := to_number(p_document_id);
314: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;
315: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;
316: l_max_fiscal_year gl_periods.period_year%TYPE;
317: l_min_fiscal_year gl_periods.period_year%TYPE;
318: l_req_encumbrance_flag financials_system_parameters.req_encumbrance_flag%TYPE;

Line 315: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;

311:
312: l_sob_id financials_system_parameters.set_of_books_id%TYPE;
313: l_document_id NUMBER := to_number(p_document_id);
314: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;
315: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;
316: l_max_fiscal_year gl_periods.period_year%TYPE;
317: l_min_fiscal_year gl_periods.period_year%TYPE;
318: l_req_encumbrance_flag financials_system_parameters.req_encumbrance_flag%TYPE;
319: l_purch_encumbrance_flag financials_system_parameters.purch_encumbrance_flag%TYPE;

Line 355: -- Get the minimum and maximum gl dates for the PO distributions

351: IF (p_document_type = 'PO')
352: AND p_document_sub_type IN ('STANDARD','PLANNED')
353: AND NVL(l_purch_encumbrance_flag,'N')='Y' THEN
354:
355: -- Get the minimum and maximum gl dates for the PO distributions
356:
357: OPEN c_po_dates(l_document_id);
358: FETCH c_po_dates INTO l_max_gl_date, l_min_gl_date;
359: CLOSE c_po_dates;

Line 468: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;

464: l_min_req_fiscal_year NUMBER;
465: l_gl_prd_sts VARCHAR2(1);
466: l_po_prd_sts VARCHAR2(1);
467: l_prev_cbc_acct_date DATE;
468: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;
469: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;
470: l_max_cbc_acc_date po_requisition_headers.cbc_accounting_date%TYPE;
471: l_min_cbc_acc_date po_requisition_headers.cbc_accounting_date%TYPE;
472: l_po_cbc_acct_date DATE;

Line 469: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;

465: l_gl_prd_sts VARCHAR2(1);
466: l_po_prd_sts VARCHAR2(1);
467: l_prev_cbc_acct_date DATE;
468: l_max_gl_date po_distributions.gl_encumbered_date%TYPE;
469: l_min_gl_date po_distributions.gl_encumbered_date%TYPE;
470: l_max_cbc_acc_date po_requisition_headers.cbc_accounting_date%TYPE;
471: l_min_cbc_acc_date po_requisition_headers.cbc_accounting_date%TYPE;
472: l_po_cbc_acct_date DATE;
473:

Line 500: FROM po_distributions pod

496: CURSOR c_bpa_dates (p_document_id IN NUMBER)
497: IS
498: SELECT MAX(pod.gl_encumbered_date),
499: MIN(pod.gl_encumbered_date)
500: FROM po_distributions pod
501: WHERE pod.po_header_id = p_document_id
502: AND pod.distribution_type = 'AGREEMENT';
503:
504: l_bpa_enc_required_flag VARCHAR2(1);

Line 712: -- Get the minimum and maximum gl dates for the PO distributions

708:
709: IF p_document_type = 'PO'
710: AND p_document_sub_type IN ('STANDARD', 'PLANNED') -- Bug 3173178
711: THEN
712: -- Get the minimum and maximum gl dates for the PO distributions
713:
714: OPEN c_po_dates(p_document_id);
715: FETCH c_po_dates INTO l_max_gl_date, l_min_gl_date;
716: CLOSE c_po_dates;

Line 918: Po_distributions bpa_d

914: l_min_bpa_accounting_date
915: FROM po_headers bpa_h,
916: Po_lines pol,
917: Po_line_locations poll,
918: Po_distributions bpa_d
919: WHERE pol.po_header_id = p_document_id
920: AND poll.po_line_id = pol.po_line_id
921: AND NVL(pol.closed_code,'X') <> 'FINALLY CLOSED'
922: AND NVL(pol.cancel_flag,'N') = 'N'

Line 1058: -- po_distributions_v p

1054: -- Bug 2885953 - amended cursor below for performance enhancements
1055: -- Cursor c_max_req_date IS
1056: -- SELECT max(r.cbc_accounting_date)
1057: -- FROM po_requisition_headers r,
1058: -- po_distributions_v p
1059: -- WHERE r.requisition_header_id = p.requisition_header_id
1060: -- AND p.po_header_id = p_document_id;
1061: Cursor c_max_req_date IS
1062: SELECT max(porh.cbc_accounting_date)

Line 1064: po_distributions pod,

1060: -- AND p.po_header_id = p_document_id;
1061: Cursor c_max_req_date IS
1062: SELECT max(porh.cbc_accounting_date)
1063: FROM po_requisition_headers porh,
1064: po_distributions pod,
1065: po_requisition_lines porl,
1066: po_req_distributions pord
1067: WHERE pod.po_header_id = p_document_id
1068: AND pod.req_distribution_id = pord.distribution_id(+)

Line 1078: -- po_distributions_v p

1074: -- Bug 2885953 - amended cursor below for performance enhancements
1075: -- Cursor c_max_rel_req_date IS
1076: -- SELECT max(r.cbc_accounting_date)
1077: -- FROM po_requisition_headers r,
1078: -- po_distributions_v p
1079: -- WHERE r.requisition_header_id = p.requisition_header_id
1080: -- AND p.po_release_id = p_document_id;
1081: Cursor c_max_rel_req_date IS
1082: SELECT max(porh.cbc_accounting_date)

Line 1084: po_distributions pod,

1080: -- AND p.po_release_id = p_document_id;
1081: Cursor c_max_rel_req_date IS
1082: SELECT max(porh.cbc_accounting_date)
1083: FROM po_requisition_headers porh,
1084: po_distributions pod,
1085: po_requisition_lines porl,
1086: po_req_distributions pord
1087: WHERE pod.po_release_id = p_document_id
1088: AND pod.req_distribution_id = pord.distribution_id(+)

Line 1114: Po_distributions bpa_d

1110: Cursor c_max_bpa_po_date IS
1111: SELECT max(bpa_h.cbc_accounting_date)
1112: FROM po_headers bpa_h,
1113: Po_lines pol,
1114: Po_distributions bpa_d
1115: WHERE pol.po_header_id = p_document_id
1116: AND pol.from_header_id IS NOT NULL
1117: AND pol.from_header_id = bpa_d.po_header_id
1118: AND bpa_d.po_header_id = bpa_h.po_header_id

Line 1650: From PO_Distributions_V p,

1646: Select p.req_distribution_id,
1647: p.gl_encumbered_date PO_GL_Date,
1648: p.set_of_books_id sob_id,
1649: h.cbc_accounting_date PO_Acct_Date
1650: From PO_Distributions_V p,
1651: PO_Headers h
1652: Where p.po_header_id = p_document_id
1653: And p.po_line_id = nvl(p_line_id, p.po_line_id)
1654: And p.line_location_id = nvl(p_line_location_id, p.line_location_id)

Line 1666: -- From po_distributions_v p,

1662: -- Select p.req_distribution_id,
1663: -- p.gl_encumbered_date rel_gl_date,
1664: -- p.set_of_books_id sob_id,
1665: -- r.cbc_accounting_date rel_acct_date
1666: -- From po_distributions_v p,
1667: -- po_releases r
1668: -- Where p.po_release_id = p_document_id
1669: -- And p.line_location_id = nvl(p_line_location_id, p.line_location_id)
1670: -- And p.po_release_id = r.po_release_id

Line 1677: From po_distributions pod,

1673: Select pod.req_distribution_id,
1674: pod.gl_encumbered_date rel_gl_date,
1675: pod.set_of_books_id sob_id,
1676: r.cbc_accounting_date rel_acct_date
1677: From po_distributions pod,
1678: po_releases r,
1679: po_requisition_headers porh,
1680: po_requisition_lines porl,
1681: po_req_distributions pord

Line 1697: From po_distributions_v P,

1693: Select p.gl_encumbered_date rel_gl_date,
1694: p.source_distribution_id,
1695: p.set_of_books_id sob_id,
1696: r.cbc_accounting_date rel_acct_date
1697: From po_distributions_v P,
1698: po_releases R
1699: Where p.po_release_id = p_document_id
1700: And p.line_location_id = nvl(p_line_location_id, p.line_location_id)
1701: And p.po_release_id = r.po_release_id;

Line 1714: From po_distributions

1710: l_req_gl_date Date;
1711:
1712: Cursor c_po_dists (p_source_id NUMBER) IS
1713: Select gl_encumbered_date
1714: From po_distributions
1715: Where po_distribution_id = p_source_id;
1716:
1717: l_po_gl_date Date;
1718:

Line 1913: UPDATE po_distributions

1909:
1910: --If all validations pass then PO dist GL Dates require rolling forward
1911:
1912: IF l_passed_validation THEN
1913: UPDATE po_distributions
1914: SET gl_encumbered_date = p_action_date
1915: WHERE po_distribution_id = l_po_dists_sch_rel.source_distribution_id;
1916: END IF;
1917: