11: --< Shared Proc FPJ End >
12:
13: --
14: -- The module base for this package.
15: D_PACKAGE_BASE CONSTANT VARCHAR2(50) := PO_LOG.get_package_base(g_pkg_name);
16:
17: -- The module base for the subprogram.
18: D_copy_attributes CONSTANT VARCHAR2(100) := PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'copy_attributes');
19: --
14: -- The module base for this package.
15: D_PACKAGE_BASE CONSTANT VARCHAR2(50) := PO_LOG.get_package_base(g_pkg_name);
16:
17: -- The module base for the subprogram.
18: D_copy_attributes CONSTANT VARCHAR2(100) := PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'copy_attributes');
19: --
20:
21: --
22: D_copy_line_adjustments CONSTANT VARCHAR2(100) := PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'copy_line_adjustments');
18: D_copy_attributes CONSTANT VARCHAR2(100) := PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'copy_attributes');
19: --
20:
21: --
22: D_copy_line_adjustments CONSTANT VARCHAR2(100) := PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'copy_line_adjustments');
23:
24: -- Cursor definitions:
25:
26: CURSOR po_line_cursor(x_po_header_id po_lines.po_header_id%TYPE) IS
333: l_message_type MsgTypeTab;
334: l_message MsgTextLineTab;
335: /*Bug:13077836 end */
336: BEGIN
337: IF (PO_LOG.d_proc) THEN
338: PO_LOG.proc_begin(d_module);
339: PO_LOG.proc_begin(d_module, 'p_online_report_id', p_online_report_id);
340: END IF;
341: d_pos := 10;
334: l_message MsgTextLineTab;
335: /*Bug:13077836 end */
336: BEGIN
337: IF (PO_LOG.d_proc) THEN
338: PO_LOG.proc_begin(d_module);
339: PO_LOG.proc_begin(d_module, 'p_online_report_id', p_online_report_id);
340: END IF;
341: d_pos := 10;
342: DELETE PO_ONLINE_REPORT_TEXT
335: /*Bug:13077836 end */
336: BEGIN
337: IF (PO_LOG.d_proc) THEN
338: PO_LOG.proc_begin(d_module);
339: PO_LOG.proc_begin(d_module, 'p_online_report_id', p_online_report_id);
340: END IF;
341: d_pos := 10;
342: DELETE PO_ONLINE_REPORT_TEXT
343: WHERE ONLINE_REPORT_ID = p_online_report_id
347: FOR l_index in 1..l_message.COUNT LOOP
348: x_message:=x_message||l_message(l_index)||'~';
349: x_message_type:=l_message_type(l_index);
350: End Loop;
351: IF PO_LOG.d_stmt THEN
352: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
353: PO_LOG.stmt(d_module,d_pos,'x_message',x_message);
354: END IF;
355: COMMIT;
348: x_message:=x_message||l_message(l_index)||'~';
349: x_message_type:=l_message_type(l_index);
350: End Loop;
351: IF PO_LOG.d_stmt THEN
352: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
353: PO_LOG.stmt(d_module,d_pos,'x_message',x_message);
354: END IF;
355: COMMIT;
356: d_pos := 30;
349: x_message_type:=l_message_type(l_index);
350: End Loop;
351: IF PO_LOG.d_stmt THEN
352: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
353: PO_LOG.stmt(d_module,d_pos,'x_message',x_message);
354: END IF;
355: COMMIT;
356: d_pos := 30;
357: IF PO_LOG.d_event THEN
353: PO_LOG.stmt(d_module,d_pos,'x_message',x_message);
354: END IF;
355: COMMIT;
356: d_pos := 30;
357: IF PO_LOG.d_event THEN
358: PO_LOG.event(d_module,d_pos,'Committed after Deleting Record from PO_Online_Report_Text');
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
354: END IF;
355: COMMIT;
356: d_pos := 30;
357: IF PO_LOG.d_event THEN
358: PO_LOG.event(d_module,d_pos,'Committed after Deleting Record from PO_Online_Report_Text');
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
362: PO_LOG.proc_end(d_module,'x_message',x_message);
356: d_pos := 30;
357: IF PO_LOG.d_event THEN
358: PO_LOG.event(d_module,d_pos,'Committed after Deleting Record from PO_Online_Report_Text');
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
362: PO_LOG.proc_end(d_module,'x_message',x_message);
363: PO_LOG.proc_end(d_module);
364: END IF;
357: IF PO_LOG.d_event THEN
358: PO_LOG.event(d_module,d_pos,'Committed after Deleting Record from PO_Online_Report_Text');
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
362: PO_LOG.proc_end(d_module,'x_message',x_message);
363: PO_LOG.proc_end(d_module);
364: END IF;
365: EXCEPTION
358: PO_LOG.event(d_module,d_pos,'Committed after Deleting Record from PO_Online_Report_Text');
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
362: PO_LOG.proc_end(d_module,'x_message',x_message);
363: PO_LOG.proc_end(d_module);
364: END IF;
365: EXCEPTION
366: WHEN OTHERS THEN
359: END IF;
360: IF PO_LOG.d_proc THEN
361: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
362: PO_LOG.proc_end(d_module,'x_message',x_message);
363: PO_LOG.proc_end(d_module);
364: END IF;
365: EXCEPTION
366: WHEN OTHERS THEN
367: d_log_msg := 'Unhandled Exception in ' || d_module;
364: END IF;
365: EXCEPTION
366: WHEN OTHERS THEN
367: d_log_msg := 'Unhandled Exception in ' || d_module;
368: IF PO_LOG.d_exc THEN
369: PO_LOG.exc(d_module,d_pos,d_log_msg);
370: END IF;
371: RAISE;
372: END ret_and_del_online_report_rec;
365: EXCEPTION
366: WHEN OTHERS THEN
367: d_log_msg := 'Unhandled Exception in ' || d_module;
368: IF PO_LOG.d_exc THEN
369: PO_LOG.exc(d_module,d_pos,d_log_msg);
370: END IF;
371: RAISE;
372: END ret_and_del_online_report_rec;
373: --
2696:
2697: BEGIN
2698: l_progress := '010';
2699:
2700: IF PO_LOG.d_proc THEN
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2697: BEGIN
2698: l_progress := '010';
2699:
2700: IF PO_LOG.d_proc THEN
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2705: PO_LOG.proc_begin(d_mod,'x_sequence',x_sequence);
2698: l_progress := '010';
2699:
2700: IF PO_LOG.d_proc THEN
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2705: PO_LOG.proc_begin(d_mod,'x_sequence',x_sequence);
2706: END IF;
2699:
2700: IF PO_LOG.d_proc THEN
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2705: PO_LOG.proc_begin(d_mod,'x_sequence',x_sequence);
2706: END IF;
2707:
2700: IF PO_LOG.d_proc THEN
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2705: PO_LOG.proc_begin(d_mod,'x_sequence',x_sequence);
2706: END IF;
2707:
2708: PO_ATTRIBUTE_VALUES_PVT.copy_attributes
2701: PO_LOG.proc_begin(d_mod,'p_orig_po_line_id',p_orig_po_line_id);
2702: PO_LOG.proc_begin(d_mod,'p_new_po_line_id',p_new_po_line_id);
2703: PO_LOG.proc_begin(d_mod,'p_line_num',p_line_num);
2704: PO_LOG.proc_begin(d_mod,'p_online_report_id',p_online_report_id);
2705: PO_LOG.proc_begin(d_mod,'x_sequence',x_sequence);
2706: END IF;
2707:
2708: PO_ATTRIBUTE_VALUES_PVT.copy_attributes
2709: (
2710: p_orig_po_line_id => p_orig_po_line_id
2711: , p_new_po_line_id => p_new_po_line_id
2712: );
2713:
2714: IF PO_LOG.d_proc THEN PO_LOG.proc_end(d_mod); END IF;
2715: EXCEPTION
2716: WHEN OTHERS THEN
2717: copydoc_sql_error(x_routine => d_mod,
2718: x_progress => l_progress,
2721: x_sequence => x_sequence,
2722: x_line_num => p_line_num,
2723: x_shipment_num => 0,
2724: x_distribution_num => 0);
2725: IF PO_LOG.d_exc THEN PO_LOG.exc(d_mod,l_progress,'Unhandled exception'); END IF;
2726: RAISE;
2727: END copy_attributes;
2728: --
2729:
3821: THEN
3822: l_is_clm_doc := 'Y';
3823: END IF;
3824:
3825: IF (PO_LOG.d_proc) THEN
3826: PO_LOG.proc_begin(d_module, 'l_is_clm_doc', l_is_clm_doc);
3827: END IF;
3828:
3829: OPEN po_line_cursor(x_from_po_header_id);
3822: l_is_clm_doc := 'Y';
3823: END IF;
3824:
3825: IF (PO_LOG.d_proc) THEN
3826: PO_LOG.proc_begin(d_module, 'l_is_clm_doc', l_is_clm_doc);
3827: END IF;
3828:
3829: OPEN po_line_cursor(x_from_po_header_id);
3830:
4442: d_log_msg VARCHAR2(200);
4443: BEGIN
4444: --Initialise the variables
4445: d_pos := 0;
4446: IF (PO_LOG.d_proc) THEN
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4443: BEGIN
4444: --Initialise the variables
4445: d_pos := 0;
4446: IF (PO_LOG.d_proc) THEN
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4451: PO_LOG.proc_begin(d_module, 'x_new_segment1', x_new_segment1);
4444: --Initialise the variables
4445: d_pos := 0;
4446: IF (PO_LOG.d_proc) THEN
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4451: PO_LOG.proc_begin(d_module, 'x_new_segment1', x_new_segment1);
4452: END IF;
4445: d_pos := 0;
4446: IF (PO_LOG.d_proc) THEN
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4451: PO_LOG.proc_begin(d_module, 'x_new_segment1', x_new_segment1);
4452: END IF;
4453: d_pos := 10;
4446: IF (PO_LOG.d_proc) THEN
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4451: PO_LOG.proc_begin(d_module, 'x_new_segment1', x_new_segment1);
4452: END IF;
4453: d_pos := 10;
4454: x_return_status := FND_API.g_ret_sts_success;
4447: PO_LOG.proc_begin(d_module);
4448: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
4449: PO_LOG.proc_begin(d_module, 'p_copy_attachment', p_copy_attachment);
4450: PO_LOG.proc_begin(d_module, 'p_copy_terms', p_copy_terms);
4451: PO_LOG.proc_begin(d_module, 'x_new_segment1', x_new_segment1);
4452: END IF;
4453: d_pos := 10;
4454: x_return_status := FND_API.g_ret_sts_success;
4455: x_errmsg_code := NULL;
4469: FROM po_headers_all POH, financials_system_params_all FSP
4470: WHERE po_header_id = p_po_header_id
4471: AND poh.org_id = fsp.org_id;
4472:
4473: IF PO_LOG.d_stmt THEN
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4470: WHERE po_header_id = p_po_header_id
4471: AND poh.org_id = fsp.org_id;
4472:
4473: IF PO_LOG.d_stmt THEN
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4478: PO_LOG.stmt(d_module,d_pos,'l_sob_id',l_sob_id);
4471: AND poh.org_id = fsp.org_id;
4472:
4473: IF PO_LOG.d_stmt THEN
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4478: PO_LOG.stmt(d_module,d_pos,'l_sob_id',l_sob_id);
4479: END IF;
4472:
4473: IF PO_LOG.d_stmt THEN
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4478: PO_LOG.stmt(d_module,d_pos,'l_sob_id',l_sob_id);
4479: END IF;
4480:
4473: IF PO_LOG.d_stmt THEN
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4478: PO_LOG.stmt(d_module,d_pos,'l_sob_id',l_sob_id);
4479: END IF;
4480:
4481: d_pos := 20;
4474: PO_LOG.stmt(d_module,d_pos,'l_doc_org_id',l_doc_org_id);
4475: PO_LOG.stmt(d_module,d_pos,'l_type_lookup_code',l_type_lookup_code);
4476: PO_LOG.stmt(d_module,d_pos,'l_global_agreement_flag',l_global_agreement_flag);
4477: PO_LOG.stmt(d_module,d_pos,'l_inv_org_id',l_inv_org_id);
4478: PO_LOG.stmt(d_module,d_pos,'l_sob_id',l_sob_id);
4479: END IF;
4480:
4481: d_pos := 20;
4482: --Check if the PO Number Provided by the user is unique
4485: IF(NOT PO_CORE_S.Check_Doc_Number_Unique(x_new_segment1,
4486: l_doc_org_id,
4487: l_type_lookup_code)) THEN
4488: x_errmsg_code := 'PO_ALL_ENTER_UNIQUE_VAL';
4489: IF PO_LOG.d_exc THEN
4490: PO_LOG.exc(d_module,d_pos,'Segment1 value not unique');
4491: END IF;
4492: RAISE FND_API.g_exc_error;
4493: END IF;
4486: l_doc_org_id,
4487: l_type_lookup_code)) THEN
4488: x_errmsg_code := 'PO_ALL_ENTER_UNIQUE_VAL';
4489: IF PO_LOG.d_exc THEN
4490: PO_LOG.exc(d_module,d_pos,'Segment1 value not unique');
4491: END IF;
4492: RAISE FND_API.g_exc_error;
4493: END IF;
4494: END IF;
4496: --Check if the PO is a drop ship PO
4497: IF(PO_COPYDOC_S1.po_is_dropship(p_po_header_id)) THEN
4498: d_pos := 35;
4499: x_errmsg_code := 'PO_NOT_SUPPORT_COPY_DROPSHIPPO';
4500: IF PO_LOG.d_exc THEN
4501: PO_LOG.exc(d_module,d_pos,'Duplicate Document not supported for DropShip PO');
4502: END IF;
4503: RAISE FND_API.g_exc_error;
4504: END IF;
4497: IF(PO_COPYDOC_S1.po_is_dropship(p_po_header_id)) THEN
4498: d_pos := 35;
4499: x_errmsg_code := 'PO_NOT_SUPPORT_COPY_DROPSHIPPO';
4500: IF PO_LOG.d_exc THEN
4501: PO_LOG.exc(d_module,d_pos,'Duplicate Document not supported for DropShip PO');
4502: END IF;
4503: RAISE FND_API.g_exc_error;
4504: END IF;
4505: d_pos := 40;
4506: --Check if the PO has a config id associated with it
4507: IF(PO_COPYDOC_S1.po_has_config_id(p_po_header_id)) THEN
4508: d_pos := 45;
4509: x_errmsg_code := 'PO_CANNOT_COPY_CONFIG_ID_DOC';
4510: IF PO_LOG.d_exc THEN
4511: PO_LOG.exc(d_module,d_pos,'Duplicate Document not supported for PO with Config ID');
4512: END IF;
4513: RAISE FND_API.g_exc_error;
4514: END IF;
4507: IF(PO_COPYDOC_S1.po_has_config_id(p_po_header_id)) THEN
4508: d_pos := 45;
4509: x_errmsg_code := 'PO_CANNOT_COPY_CONFIG_ID_DOC';
4510: IF PO_LOG.d_exc THEN
4511: PO_LOG.exc(d_module,d_pos,'Duplicate Document not supported for PO with Config ID');
4512: END IF;
4513: RAISE FND_API.g_exc_error;
4514: END IF;
4515: d_pos := 50;
4513: RAISE FND_API.g_exc_error;
4514: END IF;
4515: d_pos := 50;
4516: --If validations go thru fine invoke the copy_document procedure
4517: IF PO_LOG.d_event THEN
4518: PO_LOG.event(d_module,d_pos,'Invoking PO_COPYDOC_S1.Copy Document Procedure');
4519: END IF;
4520:
4521: copy_document (
4514: END IF;
4515: d_pos := 50;
4516: --If validations go thru fine invoke the copy_document procedure
4517: IF PO_LOG.d_event THEN
4518: PO_LOG.event(d_module,d_pos,'Invoking PO_COPYDOC_S1.Copy Document Procedure');
4519: END IF;
4520:
4521: copy_document (
4522: x_action_code => 'PO',
4535: x_return_code => l_return_code,
4536: x_copy_terms => p_copy_terms,
4537: p_api_commit => FALSE); --Do not Commit
4538:
4539: IF PO_LOG.d_event THEN
4540: PO_LOG.event(d_module,d_pos,'PO_COPYDOC_S1.Copy Document Procedure call completed');
4541: END IF;
4542: d_pos := 60;
4543: --If online_report_id is not null get the message
4536: x_copy_terms => p_copy_terms,
4537: p_api_commit => FALSE); --Do not Commit
4538:
4539: IF PO_LOG.d_event THEN
4540: PO_LOG.event(d_module,d_pos,'PO_COPYDOC_S1.Copy Document Procedure call completed');
4541: END IF;
4542: d_pos := 60;
4543: --If online_report_id is not null get the message
4544: IF (l_online_report_id is NOT NULL) THEN
4545: d_pos := 65;
4546: PO_COPYDOC_S1.ret_and_del_online_report_rec( l_online_report_id
4547: ,x_message_type
4548: ,x_text_line);
4549: IF PO_LOG.d_stmt THEN
4550: PO_LOG.stmt(d_module,d_pos,'l_online_report_id',l_online_report_id);
4551: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
4552: PO_LOG.stmt(d_module,d_pos,'x_text_line',x_text_line);
4553: END IF;
4546: PO_COPYDOC_S1.ret_and_del_online_report_rec( l_online_report_id
4547: ,x_message_type
4548: ,x_text_line);
4549: IF PO_LOG.d_stmt THEN
4550: PO_LOG.stmt(d_module,d_pos,'l_online_report_id',l_online_report_id);
4551: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
4552: PO_LOG.stmt(d_module,d_pos,'x_text_line',x_text_line);
4553: END IF;
4554: END IF;
4547: ,x_message_type
4548: ,x_text_line);
4549: IF PO_LOG.d_stmt THEN
4550: PO_LOG.stmt(d_module,d_pos,'l_online_report_id',l_online_report_id);
4551: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
4552: PO_LOG.stmt(d_module,d_pos,'x_text_line',x_text_line);
4553: END IF;
4554: END IF;
4555: d_pos := 70;
4548: ,x_text_line);
4549: IF PO_LOG.d_stmt THEN
4550: PO_LOG.stmt(d_module,d_pos,'l_online_report_id',l_online_report_id);
4551: PO_LOG.stmt(d_module,d_pos,'x_message_type',x_message_type);
4552: PO_LOG.stmt(d_module,d_pos,'x_text_line',x_text_line);
4553: END IF;
4554: END IF;
4555: d_pos := 70;
4556: IF(l_return_code < 0) THEN
4557: d_pos := 75;
4558: RAISE FND_API.g_exc_unexpected_error;
4559: END IF;
4560:
4561: IF PO_LOG.d_proc THEN
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4558: RAISE FND_API.g_exc_unexpected_error;
4559: END IF;
4560:
4561: IF PO_LOG.d_proc THEN
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4559: END IF;
4560:
4561: IF PO_LOG.d_proc THEN
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4560:
4561: IF PO_LOG.d_proc THEN
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4561: IF PO_LOG.d_proc THEN
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4569: PO_LOG.proc_end(d_module);
4562: PO_LOG.proc_end(d_module,'x_new_segment1',x_new_segment1);
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4569: PO_LOG.proc_end(d_module);
4570: END IF;
4563: PO_LOG.proc_end(d_module,'x_new_po_header_id',x_new_po_header_id);
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4569: PO_LOG.proc_end(d_module);
4570: END IF;
4571: EXCEPTION
4564: PO_LOG.proc_end(d_module,'x_errmsg_code',x_errmsg_code);
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4569: PO_LOG.proc_end(d_module);
4570: END IF;
4571: EXCEPTION
4572: WHEN FND_API.g_exc_error THEN
4565: PO_LOG.proc_end(d_module,'x_message_type',x_message_type);
4566: PO_LOG.proc_end(d_module,'x_text_line',x_text_line);
4567: PO_LOG.proc_end(d_module,'x_return_status',x_return_status);
4568: PO_LOG.proc_end(d_module,'x_exception_msg',x_exception_msg);
4569: PO_LOG.proc_end(d_module);
4570: END IF;
4571: EXCEPTION
4572: WHEN FND_API.g_exc_error THEN
4573: x_return_status := FND_API.g_ret_sts_error;
4578: x_return_status := FND_API.g_ret_sts_error; /*Bug:13077836 */
4579: ELSE
4580: x_exception_msg := 'Unexpected Error in ' || d_module||'-'||d_pos;
4581: END IF;
4582: IF PO_LOG.d_exc THEN
4583: PO_LOG.exc(d_module,d_pos,x_exception_msg);
4584: END IF;
4585: WHEN OTHERS THEN
4586: x_return_status := FND_API.g_ret_sts_unexp_error;
4579: ELSE
4580: x_exception_msg := 'Unexpected Error in ' || d_module||'-'||d_pos;
4581: END IF;
4582: IF PO_LOG.d_exc THEN
4583: PO_LOG.exc(d_module,d_pos,x_exception_msg);
4584: END IF;
4585: WHEN OTHERS THEN
4586: x_return_status := FND_API.g_ret_sts_unexp_error;
4587: IF (l_online_report_id is NOT NULL) THEN
4593: x_exception_msg := x_text_line;
4594: ELSE
4595: x_exception_msg := 'Unhandled Exception in ' || d_module||'-'||d_pos;
4596: END IF;
4597: IF PO_LOG.d_exc THEN
4598: PO_LOG.exc(d_module,d_pos,x_exception_msg);
4599: END IF;
4600: END val_params_and_duplicate_doc;
4601: --
4594: ELSE
4595: x_exception_msg := 'Unhandled Exception in ' || d_module||'-'||d_pos;
4596: END IF;
4597: IF PO_LOG.d_exc THEN
4598: PO_LOG.exc(d_module,d_pos,x_exception_msg);
4599: END IF;
4600: END val_params_and_duplicate_doc;
4601: --
4602: