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 309: -- PO_ENCUMBRANCE_GT has been updated with the data that should

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

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

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

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

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

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

532: l_login_id := FND_GLOBAL.login_id ;
533:
534:
535:
536: -- Insert the data into PO_BC_DISTRIBUTIONS from PO_ENCUMBRANCE_GT,
537: --bug#5523323 Modified the insert statement to fetch data directly
538: --from the po_encumbrance_gt table rather than collections. This
539: --is possible because the autonomous transaction no longer exists.
540: INSERT INTO PO_BC_DISTRIBUTIONS

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

534:
535:
536: -- Insert the data into PO_BC_DISTRIBUTIONS from PO_ENCUMBRANCE_GT,
537: --bug#5523323 Modified the insert statement to fetch data directly
538: --from the po_encumbrance_gt table rather than collections. This
539: --is possible because the autonomous transaction no longer exists.
540: INSERT INTO PO_BC_DISTRIBUTIONS
541: ( BC_DISTRIBUTION_ID,
542: PACKET_ID,

Line 685: FROM PO_ENCUMBRANCE_GT DIST

681: DIST.REFERENCE15,
682: DIST.ADJUSTMENT_STATUS,
683: DIST.ORIGIN_SEQUENCE_NUM,
684: DIST.CLM_DOC_FLAG /* <> */
685: FROM PO_ENCUMBRANCE_GT DIST
686: WHERE SEND_TO_GL_FLAG = 'Y';
687: -- Bug 12866050 : Reverting the fix 10329412
688: --AND Nvl(final_amt,0) <> 0 ; -- Bug 10329412
689: /* Bug 10329412: Stopping event creation for 0$ amount */

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

1372: -------------------------------------------------------------------------------
1373: --Start of Comments
1374: --Name: copy_detailed_gl_results
1375: --Pre-reqs:
1376: -- PO_ENCUMBRANCE_GT is populated with all calculations.
1377: -- Call to GL Funds Checker already made on given packet ID.
1378: --Modifies:
1379: -- GL_BC_PACKETS
1380: --Locks:

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

1379: -- GL_BC_PACKETS
1380: --Locks:
1381: -- None.
1382: --Function:
1383: -- Copies result information from gl_bc_packets into PO_ENCUMBRANCE_GT
1384: -- Further post-processing/error reporting relies on this information from GTT
1385: --Parameters:
1386: --IN:
1387: --p_packet_id

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

1406: l_po_prevent_text FND_NEW_MESSAGES.message_text%TYPE;
1407: l_not_processed_msg FND_NEW_MESSAGES.message_text%TYPE;
1408:
1409: -- bug3543542 START
1410: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1411: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1412: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1413: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1414: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --

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

1407: l_not_processed_msg FND_NEW_MESSAGES.message_text%TYPE;
1408:
1409: -- bug3543542 START
1410: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1411: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1412: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1413: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1414: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1415: l_gl_status_tbl gl_status_tbl_type;

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

1408:
1409: -- bug3543542 START
1410: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1411: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1412: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1413: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1414: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1415: l_gl_status_tbl gl_status_tbl_type;
1416: l_gl_result_code_tbl gl_result_code_tbl_type;

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

1409: -- bug3543542 START
1410: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1411: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1412: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1413: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1414: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1415: l_gl_status_tbl gl_status_tbl_type;
1416: l_gl_result_code_tbl gl_result_code_tbl_type;
1417: l_update_enc_amt_flag_tbl update_enc_amt_flag_tbl_type;

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

1410: TYPE gl_status_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_status_code%TYPE;
1411: TYPE gl_result_code_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.gl_result_code%TYPE;
1412: TYPE update_enc_amt_flag_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.update_encumbered_amount_flag%TYPE;
1413: TYPE dist_id_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.distribution_id%TYPE;
1414: TYPE reference15_tbl_type IS TABLE OF PO_ENCUMBRANCE_GT.reference15%TYPE; --
1415: l_gl_status_tbl gl_status_tbl_type;
1416: l_gl_result_code_tbl gl_result_code_tbl_type;
1417: l_update_enc_amt_flag_tbl update_enc_amt_flag_tbl_type;
1418: l_dist_id_tbl dist_id_tbl_type;

Line 1635: UPDATE PO_ENCUMBRANCE_GT TEMP

1631:
1632: l_progress := '020';
1633:
1634: FORALL i IN 1..l_gl_status_tbl.COUNT
1635: UPDATE PO_ENCUMBRANCE_GT TEMP
1636: SET TEMP.gl_status_code = l_gl_status_tbl(i),
1637: TEMP.gl_result_code = l_gl_result_code_tbl(i),
1638: TEMP.update_encumbered_amount_flag = l_update_enc_amt_flag_tbl(i),
1639: TEMP.encumbered_amount_change = l_encumbered_amount_change(i) -- Bug 4878973

Line 1666: UPDATE PO_ENCUMBRANCE_GT DISTS

1662: l_progress := '030';
1663:
1664: l_po_prevent_text := FND_MESSAGE.get_string('PO', 'PO_ENC_DIST_PREVENTED');
1665:
1666: UPDATE PO_ENCUMBRANCE_GT DISTS
1667: SET DISTS.result_text = l_po_prevent_text
1668: , DISTS.result_type = g_result_WARNING
1669: WHERE DISTS.prevent_encumbrance_flag = 'Y'
1670: AND DISTS.result_text IS NULL;

Line 1680: UPDATE PO_ENCUMBRANCE_GT DISTS

1676: END IF;
1677:
1678: l_progress := '040';
1679:
1680: UPDATE PO_ENCUMBRANCE_GT DISTS
1681: SET DISTS.result_text =
1682: (SELECT GL_TEXT.description
1683: FROM GL_LOOKUPS GL_TEXT
1684: WHERE GL_TEXT.lookup_type = 'FUNDS_CHECK_RESULT_CODE'

Line 1705: UPDATE PO_ENCUMBRANCE_GT DISTS

1701: IF g_debug_stmt THEN
1702: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Updating successful rows.');
1703: END IF;
1704:
1705: UPDATE PO_ENCUMBRANCE_GT DISTS
1706: SET DISTS.result_type = g_result_WARNING
1707: WHERE DISTS.gl_result_code IN
1708: /*Bug13887688 Adding few more lookup_codes which are also WARNINGS*/
1709: ('P20','P21','P22','P23','P25','P26','P27', 'P39','P29','P31', 'P35', 'P36', 'P37', 'P38')

Line 1720: UPDATE PO_ENCUMBRANCE_GT DISTS

1716: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1717: 'Number of rows set to Warning: ' || l_debug_count);
1718: END IF;
1719:
1720: UPDATE PO_ENCUMBRANCE_GT DISTS
1721: SET DISTS.result_type = g_result_SUCCESS
1722: WHERE DISTS.result_type IS NULL
1723: AND DISTS.gl_status_code IN ('A', 'S');
1724:

Line 1747: UPDATE PO_ENCUMBRANCE_GT DISTS

1743: END IF;
1744:
1745: l_not_processed_msg := FND_MESSAGE.get_string('PO', 'PO_ENC_DIST_NOT_PROCESSED');
1746:
1747: UPDATE PO_ENCUMBRANCE_GT DISTS
1748: SET DISTS.result_type = g_result_ERROR
1749: WHERE DISTS.result_type IS NULL
1750: AND DISTS.gl_result_code like 'F%'
1751: AND DISTS.gl_status_code IN ('R', 'F');

Line 1761: UPDATE PO_ENCUMBRANCE_GT DISTS

1757: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1758: 'Number of rows failed: ' || l_debug_count);
1759: END IF;
1760:
1761: UPDATE PO_ENCUMBRANCE_GT DISTS
1762: SET DISTS.result_type = g_result_NOT_PROCESSED
1763: , DISTS.result_text = l_not_processed_msg
1764: WHERE DISTS.result_type IS NULL
1765: AND DISTS.gl_result_code like 'P%'

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

1779:
1780: IF g_debug_stmt THEN
1781: PO_DEBUG.debug_stmt(l_log_head,l_progress,
1782: 'PO update of text/message type successful');
1783: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',
1784: PO_DEBUG.g_all_rows,
1785: po_tbl_varchar30('result_text', 'result_type',
1786: 'prevent_encumbrance_flag')
1787: );

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

1801: -------------------------------------------------------------------------------
1802: --Start of Comments
1803: --Name: update_document_encumbrance
1804: --Pre-reqs:
1805: -- PO_ENCUMBRANCE_GT has all necessary information populated after
1806: -- making a call to the GL Funds Checker
1807: --Modifies:
1808: -- PO_REQ_DISTRIBUTIONS_ALL, PO_DISTRIBUTIONS_ALL, PO_REQUISITION_LINES_ALL,
1809: -- PO_LINE_LOCATIONS_ALL

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

1905: -------------------------------------------------------------------------------
1906: --Start of Comments
1907: --Name: update_successful_rows
1908: --Pre-reqs:
1909: -- PO_ENCUMBRANCE_GT has all necessary information populated after
1910: -- making a call to the GL Funds Checker
1911: --Modifies:
1912: -- PO_REQ_DISTRIBUTIONS, PO_DISTRIBUTIONS
1913: --Locks:

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

2028: l_progress := '020';
2029: IF g_debug_stmt THEN
2030: PO_DEBUG.debug_stmt(l_log_head,l_progress,
2031: 'Updated encumbered_amount_change');
2032: PO_DEBUG.debug_table(l_log_head, l_progress, 'PO_ENCUMBRANCE_GT',
2033: PO_DEBUG.g_all_rows,
2034: po_tbl_varchar30('encumbered_flag',
2035: 'encumbered_amount_change')
2036: );

Line 2069: FROM PO_ENCUMBRANCE_GT TEMP

2065: SUM (decode(TEMP.update_encumbered_amount_flag,
2066: 'Y', TEMP.encumbered_amount_change,
2067: 0)
2068: )
2069: FROM PO_ENCUMBRANCE_GT TEMP
2070: WHERE TEMP.distribution_id = PRD.distribution_id
2071: AND TEMP.distribution_type = g_dist_type_REQUISITION
2072: GROUP BY TEMP.distribution_id
2073: ), /* Updating these cols also for bug#13930578 */

Line 2080: FROM PO_ENCUMBRANCE_GT MAIN_REQ

2076: PRD.last_update_login = fnd_global.login_id
2077: WHERE PRD.distribution_id in
2078: (
2079: SELECT MAIN_REQ.distribution_id
2080: FROM PO_ENCUMBRANCE_GT MAIN_REQ
2081: WHERE MAIN_REQ.distribution_type = g_dist_type_REQUISITION -- doc is Req
2082: AND MAIN_REQ.origin_sequence_num IS NULL -- doc is main doc
2083: AND MAIN_REQ.gl_status_code = 'A'
2084: AND MAIN_REQ.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 2095: FROM PO_ENCUMBRANCE_GT TEMP

2091: (
2092: SELECT
2093: Nvl(PRD.funds_liquidated,0) + DECODE(p_action, g_action_UNRESERVE,
2094: Decode(TEMP.CLM_DOC_FLAG,'Y',TEMP.CHANGE_IN_FUNDED_VALUE),0)
2095: FROM PO_ENCUMBRANCE_GT TEMP
2096: WHERE TEMP.distribution_id = PRD.distribution_id
2097: AND TEMP.distribution_type = g_dist_type_REQUISITION
2098: )
2099: WHERE PRD.distribution_id in

Line 2102: FROM PO_ENCUMBRANCE_GT MAIN_REQ

2098: )
2099: WHERE PRD.distribution_id in
2100: (
2101: SELECT MAIN_REQ.distribution_id
2102: FROM PO_ENCUMBRANCE_GT MAIN_REQ
2103: WHERE MAIN_REQ.distribution_type = g_dist_type_REQUISITION -- doc is Req
2104: AND MAIN_REQ.origin_sequence_num IS NULL -- doc is main doc
2105: AND MAIN_REQ.gl_status_code = 'A'
2106: AND MAIN_REQ.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 2151: FROM PO_ENCUMBRANCE_GT TEMP

2147: DECODE( TEMP.adjustment_status
2148: , g_adjustment_status_OLD, 'Y'
2149: , TEMP.prevent_encumbrance_flag
2150: )
2151: FROM PO_ENCUMBRANCE_GT TEMP
2152: WHERE TEMP.distribution_id = PRD.distribution_id
2153: AND TEMP.distribution_type = g_dist_type_REQUISITION
2154: ), /* Updating these cols also for bug#13930578 */
2155: PRD.last_update_date = sysdate,

Line 2161: FROM PO_ENCUMBRANCE_GT MAIN_REQ

2157: PRD.last_update_login = fnd_global.login_id
2158: WHERE PRD.distribution_id IN
2159: (
2160: SELECT MAIN_REQ.distribution_id
2161: FROM PO_ENCUMBRANCE_GT MAIN_REQ
2162: WHERE MAIN_REQ.distribution_type = g_dist_type_REQUISITION
2163: AND MAIN_REQ.origin_sequence_num is NULL
2164: AND MAIN_REQ.gl_status_code = 'A'
2165: );

Line 2211: FROM PO_ENCUMBRANCE_GT TEMP

2207: 'Y',TEMP.encumbered_amount_change,
2208: 0)
2209: ),
2210: NULL -- <13503748>
2211: FROM PO_ENCUMBRANCE_GT TEMP
2212: WHERE TEMP.distribution_id = POD.po_distribution_id
2213: AND TEMP.distribution_type <> g_dist_type_REQUISITION
2214: GROUP BY TEMP.distribution_id
2215: ), /* Updating these cols also for bug#13930578 */

Line 2222: FROM PO_ENCUMBRANCE_GT MAIN_PURCH

2218: POD.last_update_login = fnd_global.login_id
2219: WHERE POD.po_distribution_id in
2220: (
2221: SELECT MAIN_PURCH.distribution_id
2222: FROM PO_ENCUMBRANCE_GT MAIN_PURCH
2223: WHERE MAIN_PURCH.distribution_type <> g_dist_type_REQUISITION
2224: -- doc is PO/PA/Release
2225: AND MAIN_PURCH.origin_sequence_num IS NULL -- doc is main doc
2226: AND MAIN_PURCH.gl_status_code = 'A'

Line 2275: FROM PO_ENCUMBRANCE_GT TEMP

2271: nvl(PRD.encumbered_amount, 0) +
2272: SUM(decode(TEMP.update_encumbered_amount_flag
2273: , 'Y',TEMP.encumbered_amount_change
2274: , 0))
2275: FROM PO_ENCUMBRANCE_GT TEMP
2276: WHERE TEMP.distribution_id = PRD.distribution_id
2277: AND TEMP.distribution_type = g_dist_type_REQUISITION
2278: GROUP BY TEMP.distribution_id
2279: --: added MAX, SUM and GROUP BY operators

Line 2287: FROM PO_ENCUMBRANCE_GT BACKING_REQ

2283: PRD.last_update_login = fnd_global.login_id
2284: WHERE PRD.distribution_id in
2285: (
2286: SELECT BACKING_REQ.distribution_id
2287: FROM PO_ENCUMBRANCE_GT BACKING_REQ
2288: WHERE BACKING_REQ.distribution_type = g_dist_type_REQUISITION
2289: AND BACKING_REQ.origin_sequence_num IS NOT NULL
2290: AND BACKING_REQ.gl_status_code = 'A'
2291: AND BACKING_REQ.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 2337: FROM PO_ENCUMBRANCE_GT CURRENT_DOC

2333: 0)
2334: ),
2335: nvl(POD.unencumbered_amount, 0) -
2336: SUM(CURRENT_DOC.encumbered_amount_change)
2337: FROM PO_ENCUMBRANCE_GT CURRENT_DOC
2338: WHERE CURRENT_DOC.distribution_id = POD.po_distribution_id
2339: AND CURRENT_DOC.distribution_type IN
2340: (g_dist_type_AGREEMENT, g_dist_type_PLANNED)
2341: GROUP BY CURRENT_DOC.distribution_id

Line 2346: FROM PO_ENCUMBRANCE_GT BACKING_PURCH

2342: )
2343: WHERE POD.po_distribution_id in
2344: (
2345: SELECT BACKING_PURCH.distribution_id
2346: FROM PO_ENCUMBRANCE_GT BACKING_PURCH
2347: WHERE BACKING_PURCH.distribution_type IN
2348: (g_dist_type_AGREEMENT, g_dist_type_PLANNED) -- PA/PPO
2349: AND BACKING_PURCH.origin_sequence_num IS NOT NULL -- backing doc
2350: AND (BACKING_PURCH.gl_status_code = 'A'

Line 2412: FROM PO_ENCUMBRANCE_GT PPO_DISTS

2408: )
2409: *
2410: SUM (PPO_DISTS.qty_open))
2411: )
2412: FROM PO_ENCUMBRANCE_GT PPO_DISTS
2413: WHERE PPO_DISTS.distribution_id = POD.po_distribution_id
2414: AND PPO_DISTS.distribution_type = g_dist_type_PLANNED
2415: GROUP BY PPO_DISTS.distribution_id
2416: )

Line 2420: FROM PO_ENCUMBRANCE_GT MAIN_SR

2416: )
2417: WHERE POD.po_distribution_id IN
2418: (
2419: SELECT MAIN_SR.source_distribution_id -- get backing PPO's id
2420: FROM PO_ENCUMBRANCE_GT MAIN_SR
2421: WHERE MAIN_SR.distribution_type = g_dist_type_SCHEDULED
2422: AND MAIN_SR.origin_sequence_num IS NULL
2423: -- the main doc is a Scheduled Release
2424: AND MAIN_SR.gl_status_code = 'A'

Line 2503: FROM PO_ENCUMBRANCE_GT EXEC_D

2499: )
2500: , 1, 'N' --if max is 1, then no backing Enc PA, so prevent_enc_flag <= N
2501: , 'Y' -- if max is 2, then there is backing Enc PA, so prevent_enc_flag <= Y
2502: )
2503: FROM PO_ENCUMBRANCE_GT EXEC_D
2504: WHERE EXEC_D.req_distribution_id = PRD.distribution_id
2505: )
2506: WHERE PRD.distribution_id IN
2507: (

Line 2509: FROM PO_ENCUMBRANCE_GT EXEC_DOC

2505: )
2506: WHERE PRD.distribution_id IN
2507: (
2508: SELECT EXEC_DOC.req_distribution_id
2509: FROM PO_ENCUMBRANCE_GT EXEC_DOC
2510: WHERE EXEC_DOC.distribution_type
2511: IN (g_dist_type_STANDARD, g_dist_type_BLANKET, g_dist_type_PLANNED)
2512: AND EXEC_DOC.req_distribution_id IS NOT NULL
2513: AND EXEC_DOC.gl_status_code = 'A'

Line 2522: FROM PO_ENCUMBRANCE_GT EXEC_DOC

2518: set PRD.prevent_encumbrance_flag = 'Y'
2519: where PRD.distribution_id IN
2520: (
2521: SELECT EXEC_DOC.req_distribution_id
2522: FROM PO_ENCUMBRANCE_GT EXEC_DOC
2523: WHERE EXEC_DOC.distribution_type
2524: IN (g_dist_type_STANDARD, g_dist_type_BLANKET, g_dist_type_PLANNED)
2525: AND EXEC_DOC.req_distribution_id IS NOT NULL
2526: AND EXEC_DOC.gl_status_code = 'A'

Line 2565: FROM PO_ENCUMBRANCE_GT MAIN_PURCH

2561: 'Y'),*/
2562: POD.CHANGE_IN_FUNDED_VALUE = 0
2563: WHERE POD.PO_DISTRIBUTION_ID IN
2564: ( SELECT MAIN_PURCH.DISTRIBUTION_ID
2565: FROM PO_ENCUMBRANCE_GT MAIN_PURCH
2566: WHERE MAIN_PURCH.DISTRIBUTION_TYPE <> G_DIST_TYPE_REQUISITION
2567: -- DOC IS PO/PA/RELEASE
2568: AND MAIN_PURCH.ORIGIN_SEQUENCE_NUM IS NULL -- DOC IS MAIN DOC
2569: AND MAIN_PURCH.GL_STATUS_CODE = 'A'

Line 2588: FROM PO_ENCUMBRANCE_GT TEMP

2584: 'Y')
2585: ,*/
2586: PRD.Unencumbered_Amount =
2587: ( SELECT MAX(NVL(PRD.Unencumbered_Amount,0))
2588: FROM PO_ENCUMBRANCE_GT TEMP
2589: WHERE TEMP.distribution_id = PRD.distribution_id
2590: AND TEMP.CLM_DOC_FLAG = 'Y'
2591: AND TEMP.distribution_type = g_dist_type_REQUISITION
2592: GROUP BY TEMP.distribution_id

Line 2596: FROM PO_ENCUMBRANCE_GT BACKING_REQ

2592: GROUP BY TEMP.distribution_id
2593: )
2594: WHERE PRD.distribution_id IN
2595: ( SELECT BACKING_REQ.distribution_id
2596: FROM PO_ENCUMBRANCE_GT BACKING_REQ
2597: WHERE BACKING_REQ.distribution_type = g_dist_type_REQUISITION
2598: AND BACKING_REQ.origin_sequence_num IS NOT NULL
2599: AND BACKING_REQ.CLM_DOC_FLAG = 'Y'
2600: AND BACKING_REQ.gl_status_code = 'A'

Line 2617: FROM PO_ENCUMBRANCE_GT MAIN_REQ

2613: 'Y'),*/
2614: PRD.CHANGE_IN_FUNDED_VALUE = 0
2615: WHERE PRD.DISTRIBUTION_ID IN
2616: ( SELECT MAIN_REQ.DISTRIBUTION_ID
2617: FROM PO_ENCUMBRANCE_GT MAIN_REQ
2618: WHERE MAIN_REQ.DISTRIBUTION_TYPE = G_DIST_TYPE_REQUISITION
2619: -- DOC IS PO/PA/RELEASE
2620: AND MAIN_REQ.ORIGIN_SEQUENCE_NUM IS NULL -- DOC IS MAIN DOC
2621: AND MAIN_REQ.GL_STATUS_CODE = 'A'

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

2672: -------------------------------------------------------------------------------
2673: --Start of Comments
2674: --Name: update_failed_rows
2675: --Pre-reqs:
2676: -- PO_ENCUMBRANCE_GT has all necessary information populated after
2677: -- making a call to the GL Funds Checker
2678: --Modifies:
2679: -- PO_REQ_DISTRIBUTIONS, PO_DISTRIBUTIONS
2680: --Locks:

Line 2735: FROM PO_ENCUMBRANCE_GT TEMP

2731: SET PRD.failed_funds_lookup_code
2732: =
2733: (
2734: SELECT TEMP.gl_result_code
2735: FROM PO_ENCUMBRANCE_GT TEMP
2736: WHERE TEMP.distribution_id = PRD.distribution_id
2737: AND TEMP.distribution_type = g_dist_type_REQUISITION
2738: AND rownum = 1
2739: -- handles case with 2 same dist_ids in same packet (Adjust)

Line 2744: FROM PO_ENCUMBRANCE_GT REQ_DISTS

2740: )
2741: WHERE PRD.distribution_id in
2742: (
2743: SELECT REQ_DISTS.distribution_id
2744: FROM PO_ENCUMBRANCE_GT REQ_DISTS
2745: WHERE REQ_DISTS.distribution_type = g_dist_type_REQUISITION
2746: AND REQ_DISTS.origin_sequence_num IS NULL
2747: AND REQ_DISTS.gl_status_code = 'R'
2748: AND REQ_DISTS.prevent_encumbrance_flag = 'N'

Line 2770: FROM PO_ENCUMBRANCE_GT TEMP

2766: SET POD.failed_funds_lookup_code
2767: =
2768: (
2769: SELECT TEMP.gl_result_code
2770: FROM PO_ENCUMBRANCE_GT TEMP
2771: WHERE TEMP.distribution_id = POD.po_distribution_id
2772: AND TEMP.distribution_type <> g_dist_type_REQUISITION
2773: AND rownum = 1
2774: -- handles case with 2 same dist_ids in same packet (Adjust)

Line 2779: FROM PO_ENCUMBRANCE_GT PO_DISTS

2775: )
2776: WHERE POD.po_distribution_id in
2777: (
2778: SELECT PO_DISTS.distribution_id
2779: FROM PO_ENCUMBRANCE_GT PO_DISTS
2780: WHERE PO_DISTS.distribution_type <> g_dist_type_REQUISITION
2781: AND PO_DISTS.origin_sequence_num IS NULL
2782: AND PO_DISTS.gl_status_code = 'R'
2783: AND PO_DISTS.prevent_encumbrance_flag = 'N'

Line 2878: FROM PO_ENCUMBRANCE_GT TEMP

2874:
2875: WHERE PRL.requisition_line_id IN
2876: (
2877: SELECT TEMP.line_id
2878: FROM PO_ENCUMBRANCE_GT TEMP
2879: WHERE TEMP.gl_status_code = 'A'
2880: AND TEMP.distribution_type = g_dist_type_REQUISITION
2881: AND (
2882: (TEMP.send_to_gl_flag = 'Y') --bug 3568512: use new column

Line 2923: FROM PO_ENCUMBRANCE_GT TEMP

2919: POLL.last_update_login = fnd_global.login_id
2920: WHERE POLL.line_location_id IN
2921: (
2922: SELECT TEMP.line_location_id
2923: FROM PO_ENCUMBRANCE_GT TEMP
2924: WHERE TEMP.gl_status_code = 'A'
2925: AND TEMP.distribution_type IN (g_dist_type_STANDARD, g_dist_type_PLANNED,
2926: g_dist_type_SCHEDULED, g_dist_type_BLANKET)
2927: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column

Line 3495: FROM PO_ENCUMBRANCE_GT TEMP

3491: AND nvl(POLL.approved_flag,'N') = 'Y'
3492: AND EXISTS
3493: (
3494: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3495: FROM PO_ENCUMBRANCE_GT TEMP
3496: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3497: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3498: AND TEMP.line_location_id = POLL.line_location_id
3499: AND TEMP.distribution_type IN

Line 3530: FROM PO_ENCUMBRANCE_GT TEMP

3526: WHERE nvl(POH.approved_flag,'N') = 'Y' -- if approved
3527: AND EXISTS
3528: (
3529: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3530: FROM PO_ENCUMBRANCE_GT TEMP
3531: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3532: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3533: AND TEMP.header_id = POH.po_header_id
3534: AND TEMP.distribution_type IN

Line 3568: FROM PO_ENCUMBRANCE_GT TEMP

3564: WHERE nvl(POH.approved_flag,'N') = 'Y' -- if approved
3565: AND EXISTS
3566: (
3567: SELECT 'UNRESERVED SINGLE DISTRIBUTION EXISTS'
3568: FROM PO_ENCUMBRANCE_GT TEMP
3569: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3570: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3571: AND TEMP.header_id = POH.po_header_id
3572: AND TEMP.distribution_type = g_dist_type_AGREEMENT

Line 3602: FROM PO_ENCUMBRANCE_GT TEMP

3598: AND nvl(POLL.approved_flag,'N') = 'Y' -- if approved
3599: AND EXISTS
3600: (
3601: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3602: FROM PO_ENCUMBRANCE_GT TEMP
3603: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3604: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3605: AND TEMP.line_location_id = POLL.line_location_id
3606: AND TEMP.distribution_type IN

Line 3635: FROM PO_ENCUMBRANCE_GT TEMP

3631: WHERE nvl(POR.approved_flag,'N') = 'Y' -- if approved
3632: AND EXISTS
3633: (
3634: SELECT 'UNRESERVED DISTRIBUTION EXISTS'
3635: FROM PO_ENCUMBRANCE_GT TEMP
3636: WHERE TEMP.gl_status_code = l_affected_gl_status_code
3637: AND TEMP.send_to_gl_flag = 'Y' --bug 3568512: use new column
3638: AND TEMP.po_release_id = POR.po_release_id
3639: AND TEMP.distribution_type IN

Line 3679: -- PO_ENCUMBRANCE_GT result fields have been populated

3675: ------------------------------------------------------------------------------
3676: --Start of Comments
3677: --Name: create_detailed_report
3678: --Pre-reqs:
3679: -- PO_ENCUMBRANCE_GT result fields have been populated
3680: --Modifies:
3681: -- PO_ENCUMBRANCE_GT
3682: -- PO_ONLINE_REPORT_TEXT
3683: --Locks:

Line 3681: -- PO_ENCUMBRANCE_GT

3677: --Name: create_detailed_report
3678: --Pre-reqs:
3679: -- PO_ENCUMBRANCE_GT result fields have been populated
3680: --Modifies:
3681: -- PO_ENCUMBRANCE_GT
3682: -- PO_ONLINE_REPORT_TEXT
3683: --Locks:
3684: -- None.
3685: --Function:

Line 3759: UPDATE PO_ENCUMBRANCE_GT DISTS

3755: l_progress := '020';
3756:
3757: -- Update the result info with identifying string info
3758: -- i.e. 'Line 1 Shipment 2 Distribution 1'
3759: UPDATE PO_ENCUMBRANCE_GT DISTS
3760: SET DISTS.result_text =
3761: (
3762: DECODE( DISTS.distribution_type
3763: , g_dist_type_AGREEMENT, ''

Line 3820: FROM PO_ENCUMBRANCE_GT DISTS

3816: , l_text_line_tbl
3817: , l_show_in_psa_tbl --
3818: , l_segment1_tbl --
3819: , l_distribution_type_tbl --
3820: FROM PO_ENCUMBRANCE_GT DISTS
3821: WHERE DISTS.origin_sequence_num IS NULL --main doc only
3822: AND DISTS.result_text IS NOT NULL
3823: AND (DISTS.adjustment_status IS NULL OR
3824: DISTS.adjustment_status = g_adjustment_status_NEW

Line 3872: FROM PO_ENCUMBRANCE_GT DISTS

3868: --the rows had a gl date exception.
3869: BEGIN
3870: SELECT 'Y'
3871: INTO l_error_rows_flag
3872: FROM PO_ENCUMBRANCE_GT DISTS
3873: WHERE DISTS.result_type = g_result_ERROR
3874: AND rownum = 1;
3875: EXCEPTION
3876: WHEN NO_DATA_FOUND THEN

Line 3894: FROM PO_ENCUMBRANCE_GT DISTS

3890: IF(nvl(l_error_rows_flag,'N')='N')THEN
3891: BEGIN
3892: SELECT 'Y'
3893: INTO l_warning_rows_flag
3894: FROM PO_ENCUMBRANCE_GT DISTS
3895: WHERE DISTS.result_type = g_result_WARNING
3896: AND DISTS.origin_sequence_num IS NULL --bug 3589694
3897: AND rownum = 1;
3898: EXCEPTION

Line 4079: -- PO_ENCUMBRANCE_GT which we are reporting on

4075: -- ID of the current user
4076: --p_sequence_num_tbl
4077: -- Used only if reporting level is g_report_level_DISTRIBUTION
4078: -- A collection of sequence numbers for the rows from
4079: -- PO_ENCUMBRANCE_GT which we are reporting on
4080: --p_line_num_tbl
4081: -- A collection of line numbers for the rows from
4082: -- PO_ENCUMBRANCE_GT which we are reporting on
4083: --p_shipment_num_tbl

Line 4082: -- PO_ENCUMBRANCE_GT which we are reporting on

4078: -- A collection of sequence numbers for the rows from
4079: -- PO_ENCUMBRANCE_GT which we are reporting on
4080: --p_line_num_tbl
4081: -- A collection of line numbers for the rows from
4082: -- PO_ENCUMBRANCE_GT which we are reporting on
4083: --p_shipment_num_tbl
4084: -- A collection of shipment numbers for the rows from
4085: -- PO_ENCUMBRANCE_GT which we are reporting on
4086: --p_distribution_num_tbl

Line 4085: -- PO_ENCUMBRANCE_GT which we are reporting on

4081: -- A collection of line numbers for the rows from
4082: -- PO_ENCUMBRANCE_GT which we are reporting on
4083: --p_shipment_num_tbl
4084: -- A collection of shipment numbers for the rows from
4085: -- PO_ENCUMBRANCE_GT which we are reporting on
4086: --p_distribution_num_tbl
4087: -- A collection of distribution numbers for the rows from
4088: -- PO_ENCUMBRANCE_GT which we are reporting on
4089: --p_distribution_id_tbl

Line 4088: -- PO_ENCUMBRANCE_GT which we are reporting on

4084: -- A collection of shipment numbers for the rows from
4085: -- PO_ENCUMBRANCE_GT which we are reporting on
4086: --p_distribution_num_tbl
4087: -- A collection of distribution numbers for the rows from
4088: -- PO_ENCUMBRANCE_GT which we are reporting on
4089: --p_distribution_id_tbl
4090: -- A collection of distribution ids for the rows from
4091: -- PO_ENCUMBRANCE_GT which we are reporting on
4092: --p_result_code_tbl

Line 4091: -- PO_ENCUMBRANCE_GT which we are reporting on

4087: -- A collection of distribution numbers for the rows from
4088: -- PO_ENCUMBRANCE_GT which we are reporting on
4089: --p_distribution_id_tbl
4090: -- A collection of distribution ids for the rows from
4091: -- PO_ENCUMBRANCE_GT which we are reporting on
4092: --p_result_code_tbl
4093: -- A collection of result codes for the rows from
4094: -- PO_ENCUMBRANCE_GT which we are reporting on
4095: --p_message_type_tbl

Line 4094: -- PO_ENCUMBRANCE_GT which we are reporting on

4090: -- A collection of distribution ids for the rows from
4091: -- PO_ENCUMBRANCE_GT which we are reporting on
4092: --p_result_code_tbl
4093: -- A collection of result codes for the rows from
4094: -- PO_ENCUMBRANCE_GT which we are reporting on
4095: --p_message_type_tbl
4096: -- A collection of result classifications for the rows from
4097: -- PO_ENCUMBRANCE_GT which we are reporting on
4098: --p_text_line_tbl

Line 4097: -- PO_ENCUMBRANCE_GT which we are reporting on

4093: -- A collection of result codes for the rows from
4094: -- PO_ENCUMBRANCE_GT which we are reporting on
4095: --p_message_type_tbl
4096: -- A collection of result classifications for the rows from
4097: -- PO_ENCUMBRANCE_GT which we are reporting on
4098: --p_text_line_tbl
4099: -- A collection of result messages for the rows from
4100: -- PO_ENCUMBRANCE_GT which we are reporting on
4101: --OUT:

Line 4100: -- PO_ENCUMBRANCE_GT which we are reporting on

4096: -- A collection of result classifications for the rows from
4097: -- PO_ENCUMBRANCE_GT which we are reporting on
4098: --p_text_line_tbl
4099: -- A collection of result messages for the rows from
4100: -- PO_ENCUMBRANCE_GT which we are reporting on
4101: --OUT:
4102: --x_online_report_id
4103: -- The unique ID of the result information in the
4104: -- PO_ONLINE_REPORT_TEXT table

Line 4528: FROM po_encumbrance_gt

4524: SET online_report_id=p_online_report_id
4525: WHERE reference15 in
4526: (
4527: SELECT reference15
4528: FROM po_encumbrance_gt
4529: WHERE send_to_gl_flag='Y'
4530: );
4531:
4532: l_progress :='001';