DBA Data[Home] [Help]

APPS.PO_R12_CAT_UPG_FINAL_GRP dependencies on PO_R12_CAT_UPG_DEBUG

Line 7: g_debug BOOLEAN := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;

3:
4: g_pkg_name CONSTANT VARCHAR2(30) := 'PO_R12_CAT_UPG_FINAL_GRP';
5: g_module_prefix CONSTANT VARCHAR2(100) := 'po.plsql.' || g_pkg_name || '.';
6:
7: g_debug BOOLEAN := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;
8: g_err_num NUMBER := PO_R12_CAT_UPG_PVT.g_application_err_num;
9:
10: -- BEGIN: Forward function declarations
11:

Line 123: PO_R12_CAT_UPG_DEBUG.set_logging_options(p_log_level => p_log_level);

119: BEGIN
120: l_progress := '010';
121:
122: -- Set logging options
123: PO_R12_CAT_UPG_DEBUG.set_logging_options(p_log_level => p_log_level);
124: g_debug := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;
125:
126: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;
127:

Line 124: g_debug := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;

120: l_progress := '010';
121:
122: -- Set logging options
123: PO_R12_CAT_UPG_DEBUG.set_logging_options(p_log_level => p_log_level);
124: g_debug := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;
125:
126: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;
127:
128: -- Standard call to check for call compatibility

Line 126: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;

122: -- Set logging options
123: PO_R12_CAT_UPG_DEBUG.set_logging_options(p_log_level => p_log_level);
124: g_debug := PO_R12_CAT_UPG_DEBUG.is_logging_enabled;
125:
126: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;
127:
128: -- Standard call to check for call compatibility
129: IF NOT FND_API.compatible_API_call(
130: p_current_version_number => l_api_version,

Line 228: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'Number of rows of PO_HEADERS_ALL updated='||SQL%rowcount); END IF;

224: WHERE po_header_id = l_po_header_ids(i);
225:
226: x_rows_processed := SQL%rowcount; --Bug#5156673 --TBD: What is the impact due to the loop ; mutiple loops doing multiple updates; x_rows_processed will not be the total rows proecssed by this worked then ?
227:
228: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'Number of rows of PO_HEADERS_ALL updated='||SQL%rowcount); END IF;
229:
230: l_progress := '110';
231: -- SQL What: Bulk update the PO Number on the Archive table (there would
232: -- be only 1 revision = 0, for the newly created GBPA's)

Line 246: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'Number of rows of PO_HEADERS_ARCHIVE_ALL updated='||SQL%rowcount); END IF;

242: last_update_login = FND_GLOBAL.login_id
243: WHERE po_header_id = l_po_header_ids(i)
244: AND revision_num = 0;
245:
246: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'Number of rows of PO_HEADERS_ARCHIVE_ALL updated='||SQL%rowcount); END IF;
247:
248: l_progress := '110';
249: IF (l_po_header_ids.COUNT < p_batch_size) THEN
250: EXIT;

Line 257: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'EXCEPTION: SNAPSHOT_TOO_OLD. Now commiting and re-opening the transferred_gbpas_csr'); END IF;

253: l_progress := '120';
254: COMMIT;
255: EXCEPTION
256: WHEN g_SNAPSHOT_TOO_OLD THEN
257: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'EXCEPTION: SNAPSHOT_TOO_OLD. Now commiting and re-opening the transferred_gbpas_csr'); END IF;
258:
259: -- Commit and re-open the cursor
260: l_progress := '080';
261: COMMIT;

Line 294: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;

290: -- Standard call to get message count and if count is 1, get message info.
291: FND_MSG_PUB.count_and_get(p_count => x_msg_count,
292: p_data => x_msg_data );
293:
294: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;
295: EXCEPTION
296: WHEN OTHERS THEN
297: BEGIN
298: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'OTHERS Start'); END IF;

Line 298: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'OTHERS Start'); END IF;

294: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;
295: EXCEPTION
296: WHEN OTHERS THEN
297: BEGIN
298: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'OTHERS Start'); END IF;
299: IF (transferred_gbpas_csr%ISOPEN) THEN
300: CLOSE transferred_gbpas_csr;
301: END IF;
302: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 304: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'x_return_status='||x_return_status); END IF;

300: CLOSE transferred_gbpas_csr;
301: END IF;
302: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
303:
304: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'x_return_status='||x_return_status); END IF;
305:
306: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
307: FND_MSG_PUB.add_exc_msg(G_PKG_NAME,l_api_name,SQLERRM);
308: END IF;

Line 314: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'OTHERS End'); END IF;

310: -- Standard call to get message count and if count is 1, get message info.
311: FND_MSG_PUB.count_and_get(p_count => x_msg_count,
312: p_data => x_msg_data );
313:
314: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'OTHERS End'); END IF;
315: EXCEPTION
316: WHEN OTHERS THEN
317: NULL; -- If exception occurs inside the outer exception handling block, ignore it.
318: END;

Line 356: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;

352: l_log_head CONSTANT VARCHAR2(100) := g_module_prefix || l_api_name;
353: l_progress VARCHAR2(3) := '000';
354: BEGIN
355: l_progress := '010';
356: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
357:
358: IF (p_po_header_ids.COUNT > 0) THEN
359: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_po_header_ids(1)='||p_po_header_ids(1)); END IF;
360: END IF;

Line 359: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_po_header_ids(1)='||p_po_header_ids(1)); END IF;

355: l_progress := '010';
356: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
357:
358: IF (p_po_header_ids.COUNT > 0) THEN
359: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_po_header_ids(1)='||p_po_header_ids(1)); END IF;
360: END IF;
361:
362: IF (p_agent_ids.COUNT > 0) THEN
363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_agent_ids(1)='||p_agent_ids(1)); END IF;

Line 363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_agent_ids(1)='||p_agent_ids(1)); END IF;

359: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_po_header_ids(1)='||p_po_header_ids(1)); END IF;
360: END IF;
361:
362: IF (p_agent_ids.COUNT > 0) THEN
363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_agent_ids(1)='||p_agent_ids(1)); END IF;
364: END IF;
365:
366: -- SQL What: Bulk insert into Action History
367: -- SQL Why : To create action history for the new GBPA's

Line 423: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of action history records inserted='||SQL%rowcount); END IF;

419: WHERE POAH.object_id = p_po_header_ids(i)
420: AND POAH.object_type_code = 'PA'
421: AND POAH.object_sub_type_code = 'BLANKET');
422:
423: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of action history records inserted='||SQL%rowcount); END IF;
424:
425: l_progress := '010';
426: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
427: EXCEPTION

Line 426: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;

422:
423: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of action history records inserted='||SQL%rowcount); END IF;
424:
425: l_progress := '010';
426: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
427: EXCEPTION
428: WHEN OTHERS THEN
429: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
430: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);

Line 429: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;

425: l_progress := '010';
426: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
427: EXCEPTION
428: WHEN OTHERS THEN
429: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
430: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);
431: END create_action_history_batch;
432:
433: --------------------------------------------------------------------------------

Line 479: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;

475:
476: l_key PO_SESSION_GT.key%TYPE;
477: BEGIN
478: l_progress := '010';
479: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
480:
481: -- SQL What: Insert into headers archive
482: -- SQL Why : To archive the headers of the new GBPA's
483: -- SQL Join: po_header_id

Line 813: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of header archive records inserted='||SQL%rowcount); END IF;

809: FROM PO_HEADERS_ARCHIVE_ALL POHA2
810: WHERE POHA2.po_header_id = p_po_header_ids(i));
811:
812: l_progress := '020';
813: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of header archive records inserted='||SQL%rowcount); END IF;
814:
815: -- Similarly, bulk insert into lines, attributes, TLP and org_assignment archives
816:
817: -- SQL What: Pick a new key from session GT sequence .

Line 845: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of lines='||l_po_line_ids.COUNT); END IF;

841: RETURNING num1
842: BULK COLLECT INTO l_po_line_ids;
843:
844: l_progress := '050';
845: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of lines='||l_po_line_ids.COUNT); END IF;
846:
847: -- Archive the lines in batches
848: l_start_index := 1;
849: l_end_index := p_batch_size;

Line 1173: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of line archive records inserted='||SQL%rowcount); END IF;

1169: FROM PO_LINES_ARCHIVE_ALL POLA2
1170: WHERE POLA2.po_line_id = l_po_line_ids(i));
1171:
1172: l_progress := '090';
1173: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of line archive records inserted='||SQL%rowcount); END IF;
1174:
1175: EXIT WHEN (l_last_batch_flag = 'Y');
1176:
1177: l_start_index := l_start_index + p_batch_size;

Line 1877: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of attr archive records inserted='||SQL%rowcount); END IF;

1873: FROM PO_ATTR_VALUES_ARCHIVE POAVA2
1874: WHERE POAVA2.po_line_id = l_po_line_ids(i));
1875:
1876: l_progress := '150';
1877: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of attr archive records inserted='||SQL%rowcount); END IF;
1878:
1879: EXIT WHEN (l_last_batch_flag = 'Y');
1880:
1881: l_start_index := l_start_index + p_batch_size;

Line 2277: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of TLP archive records inserted='||SQL%rowcount); END IF;

2273: WHERE POAVTA2.po_line_id = POTLP.po_line_id
2274: AND POAVTA2.language = POTLP.language);
2275:
2276: l_progress := '200';
2277: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of TLP archive records inserted='||SQL%rowcount); END IF;
2278:
2279: EXIT WHEN (l_last_batch_flag = 'Y');
2280:
2281: l_start_index := l_start_index + p_batch_size;

Line 2338: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of org assignment archive records inserted='||SQL%rowcount); END IF;

2334: FROM PO_GA_ORG_ASSIGNMENTS_ARCHIVE POGAA2
2335: WHERE POGAA2.org_assignment_id = POGA.org_assignment_id);
2336:
2337: l_progress := '220';
2338: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of org assignment archive records inserted='||SQL%rowcount); END IF;
2339:
2340: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2341: EXCEPTION
2342: WHEN OTHERS THEN

Line 2340: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;

2336:
2337: l_progress := '220';
2338: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of org assignment archive records inserted='||SQL%rowcount); END IF;
2339:
2340: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2341: EXCEPTION
2342: WHEN OTHERS THEN
2343: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2344: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);

Line 2343: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;

2339:
2340: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2341: EXCEPTION
2342: WHEN OTHERS THEN
2343: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2344: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);
2345: END archive_gbpa_bulk;
2346:
2347: FUNCTION get_next_po_number

Line 2361: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;

2357:
2358: l_new_po_number PO_HEADERS_ALL.segment1%TYPE;
2359: BEGIN
2360: l_progress := '010';
2361: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;
2362:
2363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'p_org_id='||p_org_id); END IF;
2364:
2365: l_progress := '020';

Line 2363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'p_org_id='||p_org_id); END IF;

2359: BEGIN
2360: l_progress := '010';
2361: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'START'); END IF;
2362:
2363: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'p_org_id='||p_org_id); END IF;
2364:
2365: l_progress := '020';
2366: -- Set the org context because the fuction default_po_unique_identifier
2367: -- depends on the org context. It uses the org-striped view

Line 2376: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'l_new_po_number='||l_new_po_number); END IF;

2372: l_progress := '030';
2373: l_new_po_number := PO_CORE_SV1.default_po_unique_identifier('PO_HEADERS');
2374:
2375: l_progress := '040';
2376: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'l_new_po_number='||l_new_po_number); END IF;
2377:
2378: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;
2379: RETURN l_new_po_number;
2380: END get_next_po_number;

Line 2378: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;

2374:
2375: l_progress := '040';
2376: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'l_new_po_number='||l_new_po_number); END IF;
2377:
2378: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_module,l_progress,'END'); END IF;
2379: RETURN l_new_po_number;
2380: END get_next_po_number;
2381:
2382: --------------------------------------------------------------------------------

Line 2439: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;

2435: l_heading_ou_name FND_NEW_MESSAGES.message_text%TYPE;
2436:
2437: BEGIN
2438: l_progress := '010';
2439: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
2440:
2441: FND_MESSAGE.set_name('PO','PO_GA_TYPE'); -- 'Global Agreement'
2442: l_heading_global_blanket := FND_MESSAGE.get;
2443:

Line 2471: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'gbpa_info='||to_char(l_gbpa_info)); END IF;

2467: l_tab_char || l_tab_char || l_tab_char || l_tab_char ||
2468: l_ou_name ||
2469: l_eoln_char;
2470:
2471: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'gbpa_info='||to_char(l_gbpa_info)); END IF;
2472:
2473: l_long_text := l_long_text || l_gbpa_info;
2474: END LOOP;
2475:

Line 2478: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'x_long_text='||to_char(x_long_text)); END IF;

2474: END LOOP;
2475:
2476: x_long_text := l_long_text; -- OUT value
2477:
2478: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'x_long_text='||to_char(x_long_text)); END IF;
2479:
2480: l_progress := '060';
2481: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2482: EXCEPTION

Line 2481: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;

2477:
2478: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'x_long_text='||to_char(x_long_text)); END IF;
2479:
2480: l_progress := '060';
2481: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2482: EXCEPTION
2483: WHEN OTHERS THEN
2484: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2485: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);

Line 2484: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;

2480: l_progress := '060';
2481: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2482: EXCEPTION
2483: WHEN OTHERS THEN
2484: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2485: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);
2486: END prepare_long_text;
2487:
2488: --------------------------------------------------------------------------------

Line 2542: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;

2538: l_to_entity_name FND_ATTACHED_DOCUMENTS.entity_name%TYPE;
2539:
2540: BEGIN
2541: l_progress := '010';
2542: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
2543:
2544: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_header_id='||p_cpa_header_id); END IF;
2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;
2546: IF (p_gbpa_header_id_list IS NOT NULL) THEN

Line 2544: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_header_id='||p_cpa_header_id); END IF;

2540: BEGIN
2541: l_progress := '010';
2542: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
2543:
2544: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_header_id='||p_cpa_header_id); END IF;
2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;
2546: IF (p_gbpa_header_id_list IS NOT NULL) THEN
2547: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list.COUNT='||p_gbpa_header_id_list.COUNT); END IF;
2548: ELSE

Line 2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;

2541: l_progress := '010';
2542: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
2543:
2544: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_header_id='||p_cpa_header_id); END IF;
2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;
2546: IF (p_gbpa_header_id_list IS NOT NULL) THEN
2547: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list.COUNT='||p_gbpa_header_id_list.COUNT); END IF;
2548: ELSE
2549: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list is NULL'); END IF;

Line 2547: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list.COUNT='||p_gbpa_header_id_list.COUNT); END IF;

2543:
2544: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_header_id='||p_cpa_header_id); END IF;
2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;
2546: IF (p_gbpa_header_id_list IS NOT NULL) THEN
2547: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list.COUNT='||p_gbpa_header_id_list.COUNT); END IF;
2548: ELSE
2549: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list is NULL'); END IF;
2550: END IF;
2551:

Line 2549: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list is NULL'); END IF;

2545: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_cpa_org_id='||p_cpa_org_id); END IF;
2546: IF (p_gbpa_header_id_list IS NOT NULL) THEN
2547: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list.COUNT='||p_gbpa_header_id_list.COUNT); END IF;
2548: ELSE
2549: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'p_gbpa_header_id_list is NULL'); END IF;
2550: END IF;
2551:
2552: FND_MESSAGE.set_name('PO','PO_R12_CAT_UPG_ATTACH_REF_GBPA'); -- 'Referencing Global Agreements'
2553: l_description := FND_MESSAGE.get;

Line 2560: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'security_id(org_id)='||l_security_id); END IF;

2556: l_to_pk1_value := p_cpa_header_id;
2557: --l_security_id := PO_MOAC_UTILS_PVT.get_current_org_id;
2558: l_security_id := p_cpa_header_id;
2559:
2560: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'security_id(org_id)='||l_security_id); END IF;
2561: -- IF g_debug THEN
2562: -- IF (l_security_id IS NULL) THEN
2563: -- l_security_id := 204;
2564: -- IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'DEBUG: security_id(org_id) was NULL. Now hardcoded to:'||l_security_id); END IF;

Line 2564: -- IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'DEBUG: security_id(org_id) was NULL. Now hardcoded to:'||l_security_id); END IF;

2560: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'security_id(org_id)='||l_security_id); END IF;
2561: -- IF g_debug THEN
2562: -- IF (l_security_id IS NULL) THEN
2563: -- l_security_id := 204;
2564: -- IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'DEBUG: security_id(org_id) was NULL. Now hardcoded to:'||l_security_id); END IF;
2565: -- END IF;
2566: -- END IF;
2567:
2568: l_progress := '020';

Line 2578: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Calling FND_DOCUMENTS_PKG.insert_row()'); END IF;

2574: , x_long_text => l_long_text -- IN/OUT
2575: );
2576:
2577: l_progress := '030';
2578: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Calling FND_DOCUMENTS_PKG.insert_row()'); END IF;
2579: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Parameter: userenv(LANG)='||userenv('LANG')); END IF;
2580:
2581: -- Insert into FND_DOCUMENTS
2582: FND_DOCUMENTS_PKG.insert_row

Line 2579: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Parameter: userenv(LANG)='||userenv('LANG')); END IF;

2575: );
2576:
2577: l_progress := '030';
2578: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Calling FND_DOCUMENTS_PKG.insert_row()'); END IF;
2579: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Parameter: userenv(LANG)='||userenv('LANG')); END IF;
2580:
2581: -- Insert into FND_DOCUMENTS
2582: FND_DOCUMENTS_PKG.insert_row
2583: (

Line 2604: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'FND_DOCUMENTS_PKG.insert_row() returns media_id='||l_media_id||', document_id='||l_document_id||', row_id='||l_rowid); END IF;

2600: , x_media_id => l_media_id -- IN/OUT
2601: );
2602:
2603: l_progress := '040';
2604: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'FND_DOCUMENTS_PKG.insert_row() returns media_id='||l_media_id||', document_id='||l_document_id||', row_id='||l_rowid); END IF;
2605:
2606: -- SQL What: Insert long text into FND_DOCUMENTS_LONG_TEXT
2607: -- SQL Why : This long text will be attached to the CPA
2608: -- SQL Join: none

Line 2621: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of rows inserted in FND_DOCUMENTS_LONG_TEXT='||SQL%rowcount); END IF;

2617: , l_long_text
2618: );
2619:
2620: l_progress := '050';
2621: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of rows inserted in FND_DOCUMENTS_LONG_TEXT='||SQL%rowcount); END IF;
2622:
2623: -- SQL What: Get maximum sequence number for the CPA header attachments
2624: -- SQL Why : To get the next sequence number for the new attachment
2625: -- SQL Join: pk1_value, entity_name

Line 2635: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Next seq_num='||l_seq_num); END IF;

2631:
2632: l_seq_num := nvl(l_seq_num, 0) + 10;
2633:
2634: l_progress := '060';
2635: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Next seq_num='||l_seq_num); END IF;
2636:
2637: -- SQL What: Insert document into FND_ATTACHED_DOCUMENTS
2638: -- SQL Why : This long text document will be attached to the CPA
2639: -- SQL Join: none

Line 2672: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of rows inserted in FND_ATTACHED_DOCUMENTS='||SQL%rowcount); END IF;

2668: , sysdate
2669: );
2670:
2671: l_progress := '070';
2672: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of rows inserted in FND_ATTACHED_DOCUMENTS='||SQL%rowcount); END IF;
2673:
2674: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2675: EXCEPTION
2676: WHEN OTHERS THEN

Line 2674: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;

2670:
2671: l_progress := '070';
2672: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of rows inserted in FND_ATTACHED_DOCUMENTS='||SQL%rowcount); END IF;
2673:
2674: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2675: EXCEPTION
2676: WHEN OTHERS THEN
2677: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2678: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);

Line 2677: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;

2673:
2674: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2675: EXCEPTION
2676: WHEN OTHERS THEN
2677: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2678: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);
2679: END create_attachment;
2680:
2681: --------------------------------------------------------------------------------

Line 2738: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;

2734: l_count NUMBER;
2735: l_current_batch NUMBER; -- Bug 5468308: Track the progress of the script
2736: BEGIN
2737: l_progress := '010';
2738: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'START'); END IF;
2739:
2740: OPEN cpa_references_csr;
2741:
2742: l_progress := '020';

Line 2760: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'cpa_reference='||l_cpa_reference||', cpa_org_id='||l_cpa_org_id||', po_header_id='||l_po_header_id); END IF;

2756: FETCH cpa_references_csr
2757: INTO l_cpa_reference, l_cpa_org_id, l_po_header_id;
2758:
2759: l_progress := '030';
2760: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'cpa_reference='||l_cpa_reference||', cpa_org_id='||l_cpa_org_id||', po_header_id='||l_po_header_id); END IF;
2761:
2762: EXIT WHEN CPA_REFERENCES_CSR%NOTFOUND;
2763:
2764: IF (l_prev_cpa_reference IS NOT NULL AND

Line 2790: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Calling create_attchment() outside the loop'); END IF;

2786: END LOOP; -- Main cursor loop
2787:
2788: -- Create the attachment for the last batch of the loop above
2789: IF (l_prev_cpa_reference IS NOT NULL) THEN
2790: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Calling create_attchment() outside the loop'); END IF;
2791: create_attachment
2792: (
2793: p_cpa_header_id => l_prev_cpa_reference
2794: , p_cpa_org_id => l_cpa_org_id

Line 2802: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of CPAs updated='||SQL%rowcount); END IF;

2798:
2799: l_progress := '140';
2800: CLOSE cpa_references_csr;
2801:
2802: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of CPAs updated='||SQL%rowcount); END IF;
2803:
2804: l_progress := '010';
2805: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2806: EXCEPTION

Line 2805: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;

2801:
2802: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Number of CPAs updated='||SQL%rowcount); END IF;
2803:
2804: l_progress := '010';
2805: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2806: EXCEPTION
2807: WHEN OTHERS THEN
2808: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2809: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);

Line 2808: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;

2804: l_progress := '010';
2805: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'END'); END IF;
2806: EXCEPTION
2807: WHEN OTHERS THEN
2808: IF g_debug THEN PO_R12_CAT_UPG_DEBUG.log_stmt(l_log_head,l_progress,'Unexpected exception'); END IF;
2809: RAISE_APPLICATION_ERROR(g_err_num,l_log_head||','||l_progress || ','|| SQLERRM);
2810: END attach_gbpa_numbers_in_cpa;
2811:
2812: END PO_R12_CAT_UPG_FINAL_GRP;