DBA Data[Home] [Help]

APPS.PO_ENCUMBRANCE_POSTPROCESSING dependencies on PO_ENCUMBRANCE_GT

Line 187: PO_ENCUMBRANCE_GT.adjustment_status%TYPE

183:
184:
185: -- adjustment status
186: g_adjustment_status_OLD CONSTANT
187: PO_ENCUMBRANCE_GT.adjustment_status%TYPE
188: := PO_DOCUMENT_FUNDS_PVT.g_adjustment_status_OLD;
189:
190: g_adjustment_status_NEW CONSTANT
191: PO_ENCUMBRANCE_GT.adjustment_status%TYPE

Line 191: PO_ENCUMBRANCE_GT.adjustment_status%TYPE

187: PO_ENCUMBRANCE_GT.adjustment_status%TYPE
188: := PO_DOCUMENT_FUNDS_PVT.g_adjustment_status_OLD;
189:
190: g_adjustment_status_NEW CONSTANT
191: PO_ENCUMBRANCE_GT.adjustment_status%TYPE
192: := PO_DOCUMENT_FUNDS_PVT.g_adjustment_status_NEW;
193:
194:
195: -- result classifications

Line 196: g_result_SUCCESS CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

192: := PO_DOCUMENT_FUNDS_PVT.g_adjustment_status_NEW;
193:
194:
195: -- result classifications
196: g_result_SUCCESS CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
197: := PO_DOCUMENT_FUNDS_PVT.g_result_SUCCESS;
198:
199: g_result_WARNING CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
200: := PO_DOCUMENT_FUNDS_PVT.g_result_WARNING;

Line 199: g_result_WARNING CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

195: -- result classifications
196: g_result_SUCCESS CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
197: := PO_DOCUMENT_FUNDS_PVT.g_result_SUCCESS;
198:
199: g_result_WARNING CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
200: := PO_DOCUMENT_FUNDS_PVT.g_result_WARNING;
201:
202: g_result_ERROR CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
203: := PO_DOCUMENT_FUNDS_PVT.g_result_ERROR;

Line 202: g_result_ERROR CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

198:
199: g_result_WARNING CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
200: := PO_DOCUMENT_FUNDS_PVT.g_result_WARNING;
201:
202: g_result_ERROR CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
203: := PO_DOCUMENT_FUNDS_PVT.g_result_ERROR;
204: --note: this classification currently maps to Warning, but is
205: --given a seperate label so as to easily identify this condition
206: g_result_NOT_PROCESSED CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

Line 206: g_result_NOT_PROCESSED CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

202: g_result_ERROR CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
203: := PO_DOCUMENT_FUNDS_PVT.g_result_ERROR;
204: --note: this classification currently maps to Warning, but is
205: --given a seperate label so as to easily identify this condition
206: g_result_NOT_PROCESSED CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
207: := PO_DOCUMENT_FUNDS_PVT.g_result_WARNING;
208:
209: --note: this classification currently maps to ERROR, but is
210: --given a seperate label so as to easily identify this condition,

Line 213: g_result_TRANSACTION CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE

209: --note: this classification currently maps to ERROR, but is
210: --given a seperate label so as to easily identify this condition,
211: --which occurs when there is a single high-level failure message
212: --instead of detailed results for each distribution
213: g_result_TRANSACTION CONSTANT PO_ENCUMBRANCE_GT.result_type%TYPE
214: := PO_DOCUMENT_FUNDS_PVT.g_result_ERROR;
215:
216: -- current module
217: g_module_ENCUMBRANCE CONSTANT

Line 307: -- PO_ENCUMBRANCE_GT has been updated with the data that should

303: -------------------------------------------------------------------------------
304: --Start of Comments
305: --Name: insert_packet
306: --Pre-reqs:
307: -- PO_ENCUMBRANCE_GT has been updated with the data that should
308: -- be inserted into PO_BC_DISTRIBUTIONS.
309: --Modifies:
310: -- GL_BC_PACKETS
311: --Locks:

Line 315: -- PO_ENCUMBRANCE_GT into PO_BC_DISTRIBUTIONS. It does this through

311: --Locks:
312: -- None.
313: --Function:
314: -- This procedure inserts all of the entries in
315: -- PO_ENCUMBRANCE_GT into PO_BC_DISTRIBUTIONS. It does this through
316: -- an autonomous transaction helper procedure, as GL needs the data
317: -- committed, but we don't want to commit anything else.
318: --Parameters:
319: --IN:

Line 432: -- transfers data from po_encumbrance_gt to po_bc_distributions.

428: --Locks:
429: -- None.
430: --Function:
431: -- This procedure takes its input parameters and inserts and
432: -- transfers data from po_encumbrance_gt to po_bc_distributions.
433: --Parameters:
434: --IN:
435: -- p_status_code
436: -- Specifies whether this is a Funds Check (C) or a real (pending) action (P).

Line 571: -- Insert the data into PO_BC_DISTRIBUTIONS from PO_ENCUMBRANCE_GT,

567: l_login_id := FND_GLOBAL.login_id ;
568:
569:
570:
571: -- Insert the data into PO_BC_DISTRIBUTIONS from PO_ENCUMBRANCE_GT,
572: --bug#5523323 Modified the insert statement to fetch data directly
573: --from the po_encumbrance_gt table rather than collections. This
574: --is possible because the autonomous transaction no longer exists.
575: INSERT INTO PO_BC_DISTRIBUTIONS

Line 573: --from the po_encumbrance_gt table rather than collections. This

569:
570:
571: -- Insert the data into PO_BC_DISTRIBUTIONS from PO_ENCUMBRANCE_GT,
572: --bug#5523323 Modified the insert statement to fetch data directly
573: --from the po_encumbrance_gt table rather than collections. This
574: --is possible because the autonomous transaction no longer exists.
575: INSERT INTO PO_BC_DISTRIBUTIONS
576: ( BC_DISTRIBUTION_ID,
577: PACKET_ID,

Line 692: FROM PO_ENCUMBRANCE_GT DIST

688: DIST.REFERENCE14,
689: DIST.REFERENCE15,
690: DIST.ADJUSTMENT_STATUS,
691: DIST.ORIGIN_SEQUENCE_NUM
692: FROM PO_ENCUMBRANCE_GT DIST
693: WHERE SEND_TO_GL_FLAG = 'Y' ;
694:
695: l_progress := '100';
696: --

Line 1298: -- PO_ENCUMBRANCE_GT is populated with all calculations.

1294: -------------------------------------------------------------------------------
1295: --Start of Comments
1296: --Name: copy_detailed_gl_results
1297: --Pre-reqs:
1298: -- PO_ENCUMBRANCE_GT is populated with all calculations.
1299: -- Call to GL Funds Checker already made on given packet ID.
1300: --Modifies:
1301: -- GL_BC_PACKETS
1302: --Locks:

Line 1305: -- Copies result information from gl_bc_packets into PO_ENCUMBRANCE_GT

1301: -- GL_BC_PACKETS
1302: --Locks:
1303: -- None.
1304: --Function:
1305: -- Copies result information from gl_bc_packets into PO_ENCUMBRANCE_GT
1306: -- Further post-processing/error reporting relies on this information from GTT
1307: --Parameters:
1308: --IN:
1309: --p_packet_id

Line 1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;

1328: l_po_prevent_text FND_NEW_MESSAGES.message_text%TYPE;
1329: l_not_processed_msg FND_NEW_MESSAGES.message_text%TYPE;
1330:
1331: -- bug3543542 START
1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --

Line 1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;

1329: l_not_processed_msg FND_NEW_MESSAGES.message_text%TYPE;
1330:
1331: -- bug3543542 START
1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1337: l_gl_status_tbl gl_status_tbl_type;

Line 1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;

1330:
1331: -- bug3543542 START
1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1337: l_gl_status_tbl gl_status_tbl_type;
1338: l_gl_result_code_tbl gl_result_code_tbl_type;

Line 1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;

1331: -- bug3543542 START
1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1337: l_gl_status_tbl gl_status_tbl_type;
1338: l_gl_result_code_tbl gl_result_code_tbl_type;
1339: l_update_enc_amt_flag_tbl update_enc_amt_flag_tbl_type;

Line 1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --

1332: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1333: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1334: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1335: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1336: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1337: l_gl_status_tbl gl_status_tbl_type;
1338: l_gl_result_code_tbl gl_result_code_tbl_type;
1339: l_update_enc_amt_flag_tbl update_enc_amt_flag_tbl_type;
1340: l_dist_id_tbl dist_id_tbl_type;

Line 1477: UPDATE PO_ENCUMBRANCE_GT TEMP

1473:
1474: l_progress := '020';
1475:
1476: FORALL i IN 1..l_gl_status_tbl.COUNT
1477: UPDATE PO_ENCUMBRANCE_GT TEMP
1478: SET TEMP.gl_status_code = l_gl_status_tbl(i),
1479: TEMP.gl_result_code = l_gl_result_code_tbl(i),
1480: TEMP.update_encumbered_amount_flag = l_update_enc_amt_flag_tbl(i),
1481: TEMP.encumbered_amount_change = l_encumbered_amount_change(i) -- Bug 4878973

Line 1508: UPDATE PO_ENCUMBRANCE_GT DISTS

1504: l_progress := '030';
1505:
1506: l_po_prevent_text := FND_MESSAGE.get_string('PO', 'PO_ENC_DIST_PREVENTED');
1507:
1508: UPDATE PO_ENCUMBRANCE_GT DISTS
1509: SET DISTS.result_text = l_po_prevent_text
1510: , DISTS.result_type = g_result_WARNING
1511: WHERE DISTS.prevent_encumbrance_flag = 'Y'
1512: AND DISTS.result_text IS NULL;

Line 1522: UPDATE PO_ENCUMBRANCE_GT DISTS

1518: END IF;
1519:
1520: l_progress := '040';
1521:
1522: UPDATE PO_ENCUMBRANCE_GT DISTS
1523: SET DISTS.result_text =
1524: (SELECT GL_TEXT.description
1525: FROM GL_LOOKUPS GL_TEXT
1526: WHERE GL_TEXT.lookup_type = 'FUNDS_CHECK_RESULT_CODE'

Line 1547: UPDATE PO_ENCUMBRANCE_GT DISTS

1543: IF g_debug_stmt THEN
1544: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Updating successful rows.');
1545: END IF;
1546:
1547: UPDATE PO_ENCUMBRANCE_GT DISTS
1548: SET DISTS.result_type = g_result_WARNING
1549: WHERE DISTS.gl_result_code IN
1550: ('P20','P21','P22','P23','P25','P26','P27', 'P39')
1551: AND DISTS.gl_status_code IN ('A', 'S');

Line 1561: UPDATE PO_ENCUMBRANCE_GT DISTS

1557: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1558: 'Number of rows set to Warning: ' || l_debug_count);
1559: END IF;
1560:
1561: UPDATE PO_ENCUMBRANCE_GT DISTS
1562: SET DISTS.result_type = g_result_SUCCESS
1563: WHERE DISTS.result_type IS NULL
1564: AND DISTS.gl_status_code IN ('A', 'S');
1565:

Line 1588: UPDATE PO_ENCUMBRANCE_GT DISTS

1584: END IF;
1585:
1586: l_not_processed_msg := FND_MESSAGE.get_string('PO', 'PO_ENC_DIST_NOT_PROCESSED');
1587:
1588: UPDATE PO_ENCUMBRANCE_GT DISTS
1589: SET DISTS.result_type = g_result_ERROR
1590: WHERE DISTS.result_type IS NULL
1591: AND DISTS.gl_result_code like 'F%'
1592: AND DISTS.gl_status_code IN ('R', 'F');

Line 1602: UPDATE PO_ENCUMBRANCE_GT DISTS

1598: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1599: 'Number of rows failed: ' || l_debug_count);
1600: END IF;
1601:
1602: UPDATE PO_ENCUMBRANCE_GT DISTS
1603: SET DISTS.result_type = g_result_NOT_PROCESSED
1604: , DISTS.result_text = l_not_processed_msg
1605: WHERE DISTS.result_type IS NULL
1606: AND DISTS.gl_result_code like 'P%'

Line 1624: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',

1620:
1621: IF g_debug_stmt THEN
1622: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1623: 'PO update of text/message type successful');
1624: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',
1625: PO_DEBUG.g_all_rows,
1626: po_tbl_varchar30('result_text', 'result_type',
1627: 'prevent_encumbrance_flag')
1628: );

Line 1646: -- PO_ENCUMBRANCE_GT has all necessary information populated after

1642: -------------------------------------------------------------------------------
1643: --Start of Comments
1644: --Name: update_document_encumbrance
1645: --Pre-reqs:
1646: -- PO_ENCUMBRANCE_GT has all necessary information populated after
1647: -- making a call to the GL Funds Checker
1648: --Modifies:
1649: -- PO_REQ_DISTRIBUTIONS_ALL, PO_DISTRIBUTIONS_ALL, PO_REQUISITION_LINES_ALL,
1650: -- PO_LINE_LOCATIONS_ALL

Line 1750: -- PO_ENCUMBRANCE_GT has all necessary information populated after

1746: -------------------------------------------------------------------------------
1747: --Start of Comments
1748: --Name: update_successful_rows
1749: --Pre-reqs:
1750: -- PO_ENCUMBRANCE_GT has all necessary information populated after
1751: -- making a call to the GL Funds Checker
1752: --Modifies:
1753: -- PO_REQ_DISTRIBUTIONS, PO_DISTRIBUTIONS
1754: --Locks:

Line 1873: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',

1869: l_progress := '020';
1870: IF g_debug_stmt THEN
1871: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1872: 'Updated encumbered_amount_change');
1873: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',
1874: PO_DEBUG.g_all_rows,
1875: po_tbl_varchar30('encumbered_flag',
1876: 'encumbered_amount_change')
1877: );

Line 1910: FROM PO_ENCUMBRANCE_GT TEMP

1906: SUM (decode(TEMP.update_encumbered_amount_flag,
1907: 'Y', TEMP.encumbered_amount_change,
1908: 0)
1909: )
1910: FROM PO_ENCUMBRANCE_GT TEMP
1911: WHERE TEMP.distribution_id = PRD.distribution_id
1912: AND TEMP.distribution_type = g_dist_type_REQUISITION
1913: GROUP BY TEMP.distribution_id
1914: )

Line 1918: FROM PO_ENCUMBRANCE_GT MAIN_REQ

1914: )
1915: WHERE PRD.distribution_id in
1916: (
1917: SELECT MAIN_REQ.distribution_id
1918: FROM PO_ENCUMBRANCE_GT MAIN_REQ
1919: WHERE MAIN_REQ.distribution_type = g_dist_type_REQUISITION -- doc is Req
1920: AND MAIN_REQ.origin_sequence_num IS NULL -- doc is main doc
1921: AND MAIN_REQ.gl_status_code = 'A'
1922: AND MAIN_REQ.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 1967: FROM PO_ENCUMBRANCE_GT TEMP

1963: DECODE( TEMP.adjustment_status
1964: , g_adjustment_status_OLD, 'Y'
1965: , TEMP.prevent_encumbrance_flag
1966: )
1967: FROM PO_ENCUMBRANCE_GT TEMP
1968: WHERE TEMP.distribution_id = PRD.distribution_id
1969: AND TEMP.distribution_type = g_dist_type_REQUISITION
1970: )
1971: WHERE PRD.distribution_id IN

Line 1974: FROM PO_ENCUMBRANCE_GT MAIN_REQ

1970: )
1971: WHERE PRD.distribution_id IN
1972: (
1973: SELECT MAIN_REQ.distribution_id
1974: FROM PO_ENCUMBRANCE_GT MAIN_REQ
1975: WHERE MAIN_REQ.distribution_type = g_dist_type_REQUISITION
1976: AND MAIN_REQ.origin_sequence_num is NULL
1977: AND MAIN_REQ.gl_status_code = 'A'
1978: );

Line 2017: FROM PO_ENCUMBRANCE_GT TEMP

2013: SUM (decode(TEMP.update_encumbered_amount_flag,
2014: 'Y',TEMP.encumbered_amount_change,
2015: 0)
2016: )
2017: FROM PO_ENCUMBRANCE_GT TEMP
2018: WHERE TEMP.distribution_id = POD.po_distribution_id
2019: AND TEMP.distribution_type <> g_dist_type_REQUISITION
2020: GROUP BY TEMP.distribution_id
2021: )

Line 2025: FROM PO_ENCUMBRANCE_GT MAIN_PURCH

2021: )
2022: WHERE POD.po_distribution_id in
2023: (
2024: SELECT MAIN_PURCH.distribution_id
2025: FROM PO_ENCUMBRANCE_GT MAIN_PURCH
2026: WHERE MAIN_PURCH.distribution_type <> g_dist_type_REQUISITION
2027: -- doc is PO/PA/Release
2028: AND MAIN_PURCH.origin_sequence_num IS NULL -- doc is main doc
2029: AND MAIN_PURCH.gl_status_code = 'A'

Line 2078: FROM PO_ENCUMBRANCE_GT TEMP

2074: nvl(PRD.encumbered_amount, 0) +
2075: SUM(decode(TEMP.update_encumbered_amount_flag
2076: , 'Y',TEMP.encumbered_amount_change
2077: , 0))
2078: FROM PO_ENCUMBRANCE_GT TEMP
2079: WHERE TEMP.distribution_id = PRD.distribution_id
2080: AND TEMP.distribution_type = g_dist_type_REQUISITION
2081: GROUP BY TEMP.distribution_id
2082: --: added MAX, SUM and GROUP BY operators

Line 2087: FROM PO_ENCUMBRANCE_GT BACKING_REQ

2083: )
2084: WHERE PRD.distribution_id in
2085: (
2086: SELECT BACKING_REQ.distribution_id
2087: FROM PO_ENCUMBRANCE_GT BACKING_REQ
2088: WHERE BACKING_REQ.distribution_type = g_dist_type_REQUISITION
2089: AND BACKING_REQ.origin_sequence_num IS NOT NULL
2090: AND BACKING_REQ.gl_status_code = 'A'
2091: AND BACKING_REQ.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 2137: FROM PO_ENCUMBRANCE_GT CURRENT_DOC

2133: 0)
2134: ),
2135: nvl(POD.unencumbered_amount, 0) -
2136: SUM(CURRENT_DOC.encumbered_amount_change)
2137: FROM PO_ENCUMBRANCE_GT CURRENT_DOC
2138: WHERE CURRENT_DOC.distribution_id = POD.po_distribution_id
2139: AND CURRENT_DOC.distribution_type IN
2140: (g_dist_type_AGREEMENT, g_dist_type_PLANNED)
2141: GROUP BY CURRENT_DOC.distribution_id

Line 2146: FROM PO_ENCUMBRANCE_GT BACKING_PURCH

2142: )
2143: WHERE POD.po_distribution_id in
2144: (
2145: SELECT BACKING_PURCH.distribution_id
2146: FROM PO_ENCUMBRANCE_GT BACKING_PURCH
2147: WHERE BACKING_PURCH.distribution_type IN
2148: (g_dist_type_AGREEMENT, g_dist_type_PLANNED) -- PA/PPO
2149: AND BACKING_PURCH.origin_sequence_num IS NOT NULL -- backing doc
2150: AND (BACKING_PURCH.gl_status_code = 'A'

Line 2212: FROM PO_ENCUMBRANCE_GT PPO_DISTS

2208: )
2209: *
2210: SUM (PPO_DISTS.qty_open))
2211: )
2212: FROM PO_ENCUMBRANCE_GT PPO_DISTS
2213: WHERE PPO_DISTS.distribution_id = POD.po_distribution_id
2214: AND PPO_DISTS.distribution_type = g_dist_type_PLANNED
2215: GROUP BY PPO_DISTS.distribution_id
2216: )

Line 2220: FROM PO_ENCUMBRANCE_GT MAIN_SR

2216: )
2217: WHERE POD.po_distribution_id IN
2218: (
2219: SELECT MAIN_SR.source_distribution_id -- get backing PPO's id
2220: FROM PO_ENCUMBRANCE_GT MAIN_SR
2221: WHERE MAIN_SR.distribution_type = g_dist_type_SCHEDULED
2222: AND MAIN_SR.origin_sequence_num IS NULL
2223: -- the main doc is a Scheduled Release
2224: AND MAIN_SR.gl_status_code = 'A'

Line 2296: FROM PO_ENCUMBRANCE_GT EXEC_D

2292: )
2293: , 1, 'N' --if max is 1, then no backing Enc PA, so prevent_enc_flag <= N
2294: , 'Y' -- if max is 2, then there is backing Enc PA, so prevent_enc_flag <= Y
2295: )
2296: FROM PO_ENCUMBRANCE_GT EXEC_D
2297: WHERE EXEC_D.req_distribution_id = PRD.distribution_id
2298: )
2299: WHERE PRD.distribution_id IN
2300: (

Line 2302: FROM PO_ENCUMBRANCE_GT EXEC_DOC

2298: )
2299: WHERE PRD.distribution_id IN
2300: (
2301: SELECT EXEC_DOC.req_distribution_id
2302: FROM PO_ENCUMBRANCE_GT EXEC_DOC
2303: WHERE EXEC_DOC.distribution_type
2304: IN (g_dist_type_STANDARD, g_dist_type_BLANKET, g_dist_type_PLANNED)
2305: AND EXEC_DOC.req_distribution_id IS NOT NULL
2306: AND EXEC_DOC.gl_status_code = 'A'

Line 2354: -- PO_ENCUMBRANCE_GT has all necessary information populated after

2350: -------------------------------------------------------------------------------
2351: --Start of Comments
2352: --Name: update_failed_rows
2353: --Pre-reqs:
2354: -- PO_ENCUMBRANCE_GT has all necessary information populated after
2355: -- making a call to the GL Funds Checker
2356: --Modifies:
2357: -- PO_REQ_DISTRIBUTIONS, PO_DISTRIBUTIONS
2358: --Locks:

Line 2413: FROM PO_ENCUMBRANCE_GT TEMP

2409: SET PRD.failed_funds_lookup_code
2410: =
2411: (
2412: SELECT TEMP.gl_result_code
2413: FROM PO_ENCUMBRANCE_GT TEMP
2414: WHERE TEMP.distribution_id = PRD.distribution_id
2415: AND TEMP.distribution_type = g_dist_type_REQUISITION
2416: AND rownum = 1
2417: -- handles case with 2 same dist_ids in same packet (Adjust)

Line 2422: FROM PO_ENCUMBRANCE_GT REQ_DISTS

2418: )
2419: WHERE PRD.distribution_id in
2420: (
2421: SELECT REQ_DISTS.distribution_id
2422: FROM PO_ENCUMBRANCE_GT REQ_DISTS
2423: WHERE REQ_DISTS.distribution_type = g_dist_type_REQUISITION
2424: AND REQ_DISTS.origin_sequence_num IS NULL
2425: AND REQ_DISTS.gl_status_code = 'R'
2426: AND REQ_DISTS.prevent_encumbrance_flag = 'N'

Line 2448: FROM PO_ENCUMBRANCE_GT TEMP

2444: SET POD.failed_funds_lookup_code
2445: =
2446: (
2447: SELECT TEMP.gl_result_code
2448: FROM PO_ENCUMBRANCE_GT TEMP
2449: WHERE TEMP.distribution_id = POD.po_distribution_id
2450: AND TEMP.distribution_type <> g_dist_type_REQUISITION
2451: AND rownum = 1
2452: -- handles case with 2 same dist_ids in same packet (Adjust)

Line 2457: FROM PO_ENCUMBRANCE_GT PO_DISTS

2453: )
2454: WHERE POD.po_distribution_id in
2455: (
2456: SELECT PO_DISTS.distribution_id
2457: FROM PO_ENCUMBRANCE_GT PO_DISTS
2458: WHERE PO_DISTS.distribution_type <> g_dist_type_REQUISITION
2459: AND PO_DISTS.origin_sequence_num IS NULL
2460: AND PO_DISTS.gl_status_code = 'R'
2461: AND PO_DISTS.prevent_encumbrance_flag = 'N'

Line 2552: FROM PO_ENCUMBRANCE_GT TEMP

2548: )
2549: WHERE PRL.requisition_line_id IN
2550: (
2551: SELECT TEMP.line_id
2552: FROM PO_ENCUMBRANCE_GT TEMP
2553: WHERE TEMP.gl_status_code = 'A'
2554: AND TEMP.distribution_type = g_dist_type_REQUISITION
2555: AND (
2556: (TEMP.send_to_gl_flag = 'Y') --bug 3568512: use new column

Line 2594: FROM PO_ENCUMBRANCE_GT TEMP

2590: )
2591: WHERE POLL.line_location_id IN
2592: (
2593: SELECT TEMP.line_location_id
2594: FROM PO_ENCUMBRANCE_GT TEMP
2595: WHERE TEMP.gl_status_code = 'A'
2596: AND TEMP.distribution_type IN (g_dist_type_STANDARD, g_dist_type_PLANNED,
2597: g_dist_type_SCHEDULED, g_dist_type_BLANKET)
2598: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 3165: FROM PO_ENCUMBRANCE_GT TEMP

3161: AND nvl(POLL.approved_flag,'N') = 'Y'
3162: AND EXISTS
3163: (
3164: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3165: FROM PO_ENCUMBRANCE_GT TEMP
3166: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3167: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3168: AND TEMP.line_location_id = POLL.line_location_id
3169: AND TEMP.distribution_type IN

Line 3200: FROM PO_ENCUMBRANCE_GT TEMP

3196: WHERE nvl(POH.approved_flag,'N') = 'Y' -- if approved
3197: AND EXISTS
3198: (
3199: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3200: FROM PO_ENCUMBRANCE_GT TEMP
3201: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3202: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3203: AND TEMP.header_id = POH.po_header_id
3204: AND TEMP.distribution_type IN

Line 3238: FROM PO_ENCUMBRANCE_GT TEMP

3234: WHERE nvl(POH.approved_flag,'N') = 'Y' -- if approved
3235: AND EXISTS
3236: (
3237: SELECT 'UNRESERVED SINGLE DISTRIBUTION EXISTS'
3238: FROM PO_ENCUMBRANCE_GT TEMP
3239: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3240: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3241: AND TEMP.header_id = POH.po_header_id
3242: AND TEMP.distribution_type = g_dist_type_AGREEMENT

Line 3272: FROM PO_ENCUMBRANCE_GT TEMP

3268: AND nvl(POLL.approved_flag,'N') = 'Y' -- if approved
3269: AND EXISTS
3270: (
3271: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3272: FROM PO_ENCUMBRANCE_GT TEMP
3273: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3274: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3275: AND TEMP.line_location_id = POLL.line_location_id
3276: AND TEMP.distribution_type IN

Line 3305: FROM PO_ENCUMBRANCE_GT TEMP

3301: WHERE nvl(POR.approved_flag,'N') = 'Y' -- if approved
3302: AND EXISTS
3303: (
3304: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3305: FROM PO_ENCUMBRANCE_GT TEMP
3306: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3307: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3308: AND TEMP.po_release_id = POR.po_release_id
3309: AND TEMP.distribution_type IN

Line 3349: -- PO_ENCUMBRANCE_GT result fields have been populated

3345: ------------------------------------------------------------------------------
3346: --Start of Comments
3347: --Name: create_detailed_report
3348: --Pre-reqs:
3349: -- PO_ENCUMBRANCE_GT result fields have been populated
3350: --Modifies:
3351: -- PO_ENCUMBRANCE_GT
3352: -- PO_ONLINE_REPORT_TEXT
3353: --Locks:

Line 3351: -- PO_ENCUMBRANCE_GT

3347: --Name: create_detailed_report
3348: --Pre-reqs:
3349: -- PO_ENCUMBRANCE_GT result fields have been populated
3350: --Modifies:
3351: -- PO_ENCUMBRANCE_GT
3352: -- PO_ONLINE_REPORT_TEXT
3353: --Locks:
3354: -- None.
3355: --Function:

Line 3429: UPDATE PO_ENCUMBRANCE_GT DISTS

3425: l_progress := '020';
3426:
3427: -- Update the result info with identifying string info
3428: -- i.e. 'Line 1 Shipment 2 Distribution 1'
3429: UPDATE PO_ENCUMBRANCE_GT DISTS
3430: SET DISTS.result_text =
3431: (
3432: DECODE( DISTS.distribution_type
3433: , g_dist_type_AGREEMENT, ''

Line 3490: FROM PO_ENCUMBRANCE_GT DISTS

3486: , l_text_line_tbl
3487: , l_show_in_psa_tbl --
3488: , l_segment1_tbl --
3489: , l_distribution_type_tbl --
3490: FROM PO_ENCUMBRANCE_GT DISTS
3491: WHERE DISTS.origin_sequence_num IS NULL --main doc only
3492: AND DISTS.result_text IS NOT NULL
3493: AND (DISTS.adjustment_status IS NULL OR
3494: DISTS.adjustment_status = g_adjustment_status_NEW

Line 3542: FROM PO_ENCUMBRANCE_GT DISTS

3538: --the rows had a gl date exception.
3539: BEGIN
3540: SELECT 'Y'
3541: INTO l_error_rows_flag
3542: FROM PO_ENCUMBRANCE_GT DISTS
3543: WHERE DISTS.result_type = g_result_ERROR
3544: AND rownum = 1;
3545: EXCEPTION
3546: WHEN NO_DATA_FOUND THEN

Line 3564: FROM PO_ENCUMBRANCE_GT DISTS

3560: IF(nvl(l_error_rows_flag,'N')='N')THEN
3561: BEGIN
3562: SELECT 'Y'
3563: INTO l_warning_rows_flag
3564: FROM PO_ENCUMBRANCE_GT DISTS
3565: WHERE DISTS.result_type = g_result_WARNING
3566: AND DISTS.origin_sequence_num IS NULL --bug 3589694
3567: AND rownum = 1;
3568: EXCEPTION

Line 3749: -- PO_ENCUMBRANCE_GT which we are reporting on

3745: -- ID of the current user
3746: --p_sequence_num_tbl
3747: -- Used only if reporting level is g_report_level_DISTRIBUTION
3748: -- A collection of sequence numbers for the rows from
3749: -- PO_ENCUMBRANCE_GT which we are reporting on
3750: --p_line_num_tbl
3751: -- A collection of line numbers for the rows from
3752: -- PO_ENCUMBRANCE_GT which we are reporting on
3753: --p_shipment_num_tbl

Line 3752: -- PO_ENCUMBRANCE_GT which we are reporting on

3748: -- A collection of sequence numbers for the rows from
3749: -- PO_ENCUMBRANCE_GT which we are reporting on
3750: --p_line_num_tbl
3751: -- A collection of line numbers for the rows from
3752: -- PO_ENCUMBRANCE_GT which we are reporting on
3753: --p_shipment_num_tbl
3754: -- A collection of shipment numbers for the rows from
3755: -- PO_ENCUMBRANCE_GT which we are reporting on
3756: --p_distribution_num_tbl

Line 3755: -- PO_ENCUMBRANCE_GT which we are reporting on

3751: -- A collection of line numbers for the rows from
3752: -- PO_ENCUMBRANCE_GT which we are reporting on
3753: --p_shipment_num_tbl
3754: -- A collection of shipment numbers for the rows from
3755: -- PO_ENCUMBRANCE_GT which we are reporting on
3756: --p_distribution_num_tbl
3757: -- A collection of distribution numbers for the rows from
3758: -- PO_ENCUMBRANCE_GT which we are reporting on
3759: --p_distribution_id_tbl

Line 3758: -- PO_ENCUMBRANCE_GT which we are reporting on

3754: -- A collection of shipment numbers for the rows from
3755: -- PO_ENCUMBRANCE_GT which we are reporting on
3756: --p_distribution_num_tbl
3757: -- A collection of distribution numbers for the rows from
3758: -- PO_ENCUMBRANCE_GT which we are reporting on
3759: --p_distribution_id_tbl
3760: -- A collection of distribution ids for the rows from
3761: -- PO_ENCUMBRANCE_GT which we are reporting on
3762: --p_result_code_tbl

Line 3761: -- PO_ENCUMBRANCE_GT which we are reporting on

3757: -- A collection of distribution numbers for the rows from
3758: -- PO_ENCUMBRANCE_GT which we are reporting on
3759: --p_distribution_id_tbl
3760: -- A collection of distribution ids for the rows from
3761: -- PO_ENCUMBRANCE_GT which we are reporting on
3762: --p_result_code_tbl
3763: -- A collection of result codes for the rows from
3764: -- PO_ENCUMBRANCE_GT which we are reporting on
3765: --p_message_type_tbl

Line 3764: -- PO_ENCUMBRANCE_GT which we are reporting on

3760: -- A collection of distribution ids for the rows from
3761: -- PO_ENCUMBRANCE_GT which we are reporting on
3762: --p_result_code_tbl
3763: -- A collection of result codes for the rows from
3764: -- PO_ENCUMBRANCE_GT which we are reporting on
3765: --p_message_type_tbl
3766: -- A collection of result classifications for the rows from
3767: -- PO_ENCUMBRANCE_GT which we are reporting on
3768: --p_text_line_tbl

Line 3767: -- PO_ENCUMBRANCE_GT which we are reporting on

3763: -- A collection of result codes for the rows from
3764: -- PO_ENCUMBRANCE_GT which we are reporting on
3765: --p_message_type_tbl
3766: -- A collection of result classifications for the rows from
3767: -- PO_ENCUMBRANCE_GT which we are reporting on
3768: --p_text_line_tbl
3769: -- A collection of result messages for the rows from
3770: -- PO_ENCUMBRANCE_GT which we are reporting on
3771: --OUT:

Line 3770: -- PO_ENCUMBRANCE_GT which we are reporting on

3766: -- A collection of result classifications for the rows from
3767: -- PO_ENCUMBRANCE_GT which we are reporting on
3768: --p_text_line_tbl
3769: -- A collection of result messages for the rows from
3770: -- PO_ENCUMBRANCE_GT which we are reporting on
3771: --OUT:
3772: --x_online_report_id
3773: -- The unique ID of the result information in the
3774: -- PO_ONLINE_REPORT_TEXT table

Line 4146: FROM po_encumbrance_gt

4142: SET online_report_id=p_online_report_id
4143: WHERE reference15 in
4144: (
4145: SELECT reference15
4146: FROM po_encumbrance_gt
4147: WHERE send_to_gl_flag='Y'
4148: );
4149:
4150: l_progress :='001';