185: wf_engine.StartProcess( ItemType => 'POSCHORD',
186: ItemKey => l_item_key);
187: END IF;
188: exception when others then
189: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
190: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
191: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
192: END IF;
193:
186: ItemKey => l_item_key);
187: END IF;
188: exception when others then
189: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
190: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
191: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
192: END IF;
193:
194: END Notify_Requester_Sup_Change;
281: wf_engine.StartProcess( ItemType => 'POSCHORD',
282: ItemKey => l_item_key);
283: END IF;
284: exception when others then
285: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
286: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
287: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
288: END IF;
289:
282: ItemKey => l_item_key);
283: END IF;
284: exception when others then
285: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
286: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
287: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
288: END IF;
289:
290: END Notify_Planner_Sup_Change;
497: END IF;
498:
499: commit;
500: exception when others then
501: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
502: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
503: l_api_name || '.others_exception',sqlerrm);
504: END IF;
505: End Update_Chg_Req_If_Po_Apprvd;
498:
499: commit;
500: exception when others then
501: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
502: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
503: l_api_name || '.others_exception',sqlerrm);
504: END IF;
505: End Update_Chg_Req_If_Po_Apprvd;
506:
528: PRAGMA AUTONOMOUS_TRANSACTION;
529: l_api_name varchar2(50) :='Carry_Over_Acknowledgement';
530: l_carryover_exception exception;
531: Begin
532: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
533: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, g_module_prefix || l_api_name || '.invoked','Autonomous Transaction');
534: END IF;
535:
536: PO_ACKNOWLEDGE_PO_GRP.carry_over_acknowledgement(1.0,
529: l_api_name varchar2(50) :='Carry_Over_Acknowledgement';
530: l_carryover_exception exception;
531: Begin
532: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
533: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, g_module_prefix || l_api_name || '.invoked','Autonomous Transaction');
534: END IF;
535:
536: PO_ACKNOWLEDGE_PO_GRP.carry_over_acknowledgement(1.0,
537: FND_API.G_FALSE,
543: raise l_carryover_exception;
544: end if;
545: commit;
546: exception when others then
547: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
548: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix || l_api_name || '.others_exception',sqlerrm);
549: END IF;
550: RAISE;
551: End Carry_Over_Acknowledgement;
544: end if;
545: commit;
546: exception when others then
547: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
548: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix || l_api_name || '.others_exception',sqlerrm);
549: END IF;
550: RAISE;
551: End Carry_Over_Acknowledgement;
552:
651: x_return_status := FND_API.G_RET_STS_SUCCESS;
652: end if;
653:
654: exception when others then
655: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
656: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
657: l_api_name || '.others_exception', sqlerrm);
658: END IF;
659: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
652: end if;
653:
654: exception when others then
655: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
656: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
657: l_api_name || '.others_exception', sqlerrm);
658: END IF;
659: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
660: --Restoring PO's Authorization status back to "IN PROCESS".
896: close l_cancel_hdr_csr;
897:
898: exception when others then
899: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
900: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
901: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
902: l_api_name || '.others_exception', sqlerrm);
903: END IF;
904: end CancelPO;
897:
898: exception when others then
899: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
900: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
901: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
902: l_api_name || '.others_exception', sqlerrm);
903: END IF;
904: end CancelPO;
905:
1065: --Bug 6772960 - End
1066:
1067: exception
1068: when others then
1069: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1070: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1071: l_api_name || '.others_exception', sqlerrm);
1072: END IF;
1073: raise;
1066:
1067: exception
1068: when others then
1069: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1070: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1071: l_api_name || '.others_exception', sqlerrm);
1072: END IF;
1073: raise;
1074: end;
1230: Insert_Acc_Rejection_Row(itemtype, itemkey, actid, 'N');
1231:
1232: EXCEPTION
1233: WHEN OTHERS THEN
1234: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1235: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1236: l_api_name || '.others_exception', sqlerrm);
1237: END IF;
1238: wf_core.context('PO_ChangeOrderWF_PVT','Register_rejection',l_progress);
1231:
1232: EXCEPTION
1233: WHEN OTHERS THEN
1234: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1235: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1236: l_api_name || '.others_exception', sqlerrm);
1237: END IF;
1238: wf_core.context('PO_ChangeOrderWF_PVT','Register_rejection',l_progress);
1239: raise;
1405:
1406:
1407:
1408: x_return_msg:='004';
1409: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1410: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
1411: l_api_name || '.start_wf_process', l_Item_Type||'*'||l_Item_Key);
1412: END IF;
1413:
1406:
1407:
1408: x_return_msg:='004';
1409: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1410: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
1411: l_api_name || '.start_wf_process', l_Item_Type||'*'||l_Item_Key);
1412: END IF;
1413:
1414: --
1470: x_return_status := FND_API.G_RET_STS_SUCCESS;
1471: exception when others then
1472: x_return_msg:='KO_U'||x_return_msg||sqlerrm;
1473: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1474: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1475: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1476: l_api_name || '.others_exception', x_return_msg);
1477: END IF;
1478:
1471: exception when others then
1472: x_return_msg:='KO_U'||x_return_msg||sqlerrm;
1473: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1474: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
1475: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
1476: l_api_name || '.others_exception', x_return_msg);
1477: END IF;
1478:
1479: END KickOffPOApproval;
4321: WF_NOTIFICATION.WriteToClob(document,l_document);
4322: end if;
4323: exception when others then
4324: IF g_fnd_debug = 'Y' THEN
4325: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
4326: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
4327: END IF;
4328: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm); */
4329: null;
5092: WF_NOTIFICATION.WriteToClob(document,'GEN_NTF_FOR_SUP_BUY_RP for no html customer');
5093: end if;
5094: exception when others then
5095: IF g_fnd_debug = 'Y' THEN
5096: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
5097: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
5098: END IF;
5099: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm); */
5100: null;
6671: x_return_status,
6672: x_complex_flag);
6673:
6674: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
6675: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6676: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
6677: g_module_prefix,
6678: x_progress || 'x_return_status=' || x_return_status || 'x_complex_flag ' || x_complex_flag);
6679: END IF;
6672: x_complex_flag);
6673:
6674: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
6675: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6676: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
6677: g_module_prefix,
6678: x_progress || 'x_return_status=' || x_return_status || 'x_complex_flag ' || x_complex_flag);
6679: END IF;
6680:
6678: x_progress || 'x_return_status=' || x_return_status || 'x_complex_flag ' || x_complex_flag);
6679: END IF;
6680:
6681: ELSE
6682: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6683: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
6684: g_module_prefix,
6685: x_progress ||'x_return_status = ' || x_return_status);
6686: END IF;
6679: END IF;
6680:
6681: ELSE
6682: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6683: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
6684: g_module_prefix,
6685: x_progress ||'x_return_status = ' || x_return_status);
6686: END IF;
6687: END IF;
7124: x_return_status,
7125: x_complex_flag);
7126:
7127: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
7128: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7129: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
7130: g_module_prefix,
7131: l_progress
7132: || 'x_return_status=' || x_return_status
7125: x_complex_flag);
7126:
7127: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
7128: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7129: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
7130: g_module_prefix,
7131: l_progress
7132: || 'x_return_status=' || x_return_status
7133: || 'x_complex_flag ' || x_complex_flag);
7133: || 'x_complex_flag ' || x_complex_flag);
7134: END IF;
7135:
7136: ELSE
7137: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7138: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
7139: g_module_prefix,
7140: l_progress
7141: ||'x_return_status = ' || x_return_status);
7134: END IF;
7135:
7136: ELSE
7137: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7138: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
7139: g_module_prefix,
7140: l_progress
7141: ||'x_return_status = ' || x_return_status);
7142: END IF;
7187: wf_engine.StartProcess( ItemType => 'POSCHORD',
7188: ItemKey => l_item_key);
7189:
7190: exception when others then
7191: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7192: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7193: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
7194: END IF;
7195: END NotifySupAllChgRpdWF;
7188: ItemKey => l_item_key);
7189:
7190: exception when others then
7191: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7192: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7193: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
7194: END IF;
7195: END NotifySupAllChgRpdWF;
7196:
7254: p_revision_num, l_chn_req_grp_id, p_user_id, l_retmsg,
7255: l_retcode, l_doc_check_rec_type, null, 'Y');
7256:
7257: exception when others then
7258: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7259: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7260: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
7261: END IF;
7262: x_return_status := 'U';
7255: l_retcode, l_doc_check_rec_type, null, 'Y');
7256:
7257: exception when others then
7258: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7259: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7260: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
7261: END IF;
7262: x_return_status := 'U';
7263: End ProcessHdrCancelResponse;
7568: */
7569: end if;
7570:
7571: exception when others then
7572: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7573: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7574: l_api_name || '.others_exception', x_progress||':'||sqlerrm);
7575: END IF;
7576: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7569: end if;
7570:
7571: exception when others then
7572: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7573: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
7574: l_api_name || '.others_exception', x_progress||':'||sqlerrm);
7575: END IF;
7576: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7577: x_err_msg := x_progress||'*'||sqlerrm;
7882: x_complex_flag varchar2(1);
7883:
7884:
7885: BEGIN
7886: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7887: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
7888: l_api_name || 'start',p_header_id||'*'||p_release_id||'*'||p_revision_num||'*'||p_chg_req_grp_id);
7889: END IF;
7890:
7883:
7884:
7885: BEGIN
7886: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
7887: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
7888: l_api_name || 'start',p_header_id||'*'||p_release_id||'*'||p_revision_num||'*'||p_chg_req_grp_id);
7889: END IF;
7890:
7891: -- Start Workflow
7966: x_ret_status,
7967: x_complex_flag);
7968:
7969: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
7970: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7971: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
7972: g_module_prefix,
7973: l_progress
7974: || 'x_return_status=' || x_return_status);
7967: x_complex_flag);
7968:
7969: IF x_return_status IS NOT NULL AND x_return_status = FND_API.g_ret_sts_success THEN
7970: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7971: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
7972: g_module_prefix,
7973: l_progress
7974: || 'x_return_status=' || x_return_status);
7975: END IF;
7974: || 'x_return_status=' || x_return_status);
7975: END IF;
7976:
7977: ELSE
7978: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7979: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
7980: g_module_prefix,
7981: l_progress
7982: ||'x_return_status = ' || x_return_status);
7975: END IF;
7976:
7977: ELSE
7978: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7979: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
7980: g_module_prefix,
7981: l_progress
7982: ||'x_return_status = ' || x_return_status);
7983: END IF;
8033: ItemKey => l_item_key);
8034:
8035: x_return_status := FND_API.G_RET_STS_SUCCESS;
8036: exception when others then
8037: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8038: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8039: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
8040: END IF;
8041: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8034:
8035: x_return_status := FND_API.G_RET_STS_SUCCESS;
8036: exception when others then
8037: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8038: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8039: l_api_name || '.others_exception', l_progress||':'||sqlerrm);
8040: END IF;
8041: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8042: end StartSupplierChangeWF;
8104: WHEN OTHERS THEN
8105: l_user_id := -1;
8106: END;
8107:
8108: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8109: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8110: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8111: END IF;
8112: /* bug 13915321 end*/
8105: l_user_id := -1;
8106: END;
8107:
8108: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8109: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8110: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8111: END IF;
8112: /* bug 13915321 end*/
8113: /* bug 13915321 The fix to use following logic for searching
8153: EXCEPTION
8154: when others then
8155: l_resp_id := -1;
8156: END;
8157: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8158: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8159: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8160: END IF;
8161: end if;
8154: when others then
8155: l_resp_id := -1;
8156: END;
8157: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8158: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8159: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8160: END IF;
8161: end if;
8162: if ((l_user_id = -1) or (l_resp_id = -1 OR l_resp_id is null)) then
8164: open l_get_user_info_csr;
8165: fetch l_get_user_info_csr into
8166: l_resp_id, l_user_id;
8167: close l_get_user_info_csr;
8168: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8169: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8170: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8171: END IF;
8172: end if;
8165: fetch l_get_user_info_csr into
8166: l_resp_id, l_user_id;
8167: close l_get_user_info_csr;
8168: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8169: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8170: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8171: END IF;
8172: end if;
8173: /* As a fail safe case retaining the fix in 9672656
8211: and fr.start_date < sysdate
8212: and nvl(fr.end_date, sysdate +1) >= sysdate
8213: and nvl(fsp.org_id,-1) = nvl(p_org_id,-1);
8214: /* and nvl(fsp.business_group_id,-1) = nvl(fnd_profile.value_specific('PER_BUSINESS_GROUP_ID', NULL, fr.responsibility_id, fr.application_id),-1); */
8215: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8216: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8217: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8218: END IF;
8219: EXCEPTION
8212: and nvl(fr.end_date, sysdate +1) >= sysdate
8213: and nvl(fsp.org_id,-1) = nvl(p_org_id,-1);
8214: /* and nvl(fsp.business_group_id,-1) = nvl(fnd_profile.value_specific('PER_BUSINESS_GROUP_ID', NULL, fr.responsibility_id, fr.application_id),-1); */
8215: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8216: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8217: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8218: END IF;
8219: EXCEPTION
8220: when others then
8249: and fr.start_date < sysdate
8250: and nvl(fr.end_date, sysdate +1) >= sysdate
8251: and nvl(fsp.org_id,-1) = nvl(p_org_id,-1);
8252: /* and nvl(fsp.business_group_id,-1) = nvl(fnd_profile.value_specific('PER_BUSINESS_GROUP_ID', NULL, fr.responsibility_id, fr.application_id),-1); */
8253: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8254: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8255: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8256: END IF;
8257: EXCEPTION
8250: and nvl(fr.end_date, sysdate +1) >= sysdate
8251: and nvl(fsp.org_id,-1) = nvl(p_org_id,-1);
8252: /* and nvl(fsp.business_group_id,-1) = nvl(fnd_profile.value_specific('PER_BUSINESS_GROUP_ID', NULL, fr.responsibility_id, fr.application_id),-1); */
8253: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8254: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8255: l_api_name || '.intialize parameters',l_progress||' '||l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8256: END IF;
8257: EXCEPTION
8258: when others then
8261: end if;
8262: end if;
8263: /* bug 13915321 end*/
8264: l_progress := '006';
8265: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8266: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8267: l_api_name || '.intialize parameters',l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8268: END IF;
8269: FND_GLOBAL.APPS_INITIALIZE(l_user_id,l_resp_id,l_resp_appl_id);
8262: end if;
8263: /* bug 13915321 end*/
8264: l_progress := '006';
8265: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8266: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8267: l_api_name || '.intialize parameters',l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8268: END IF;
8269: FND_GLOBAL.APPS_INITIALIZE(l_user_id,l_resp_id,l_resp_appl_id);
8270: exception when others then
8267: l_api_name || '.intialize parameters',l_user_id||'*'||l_resp_id||'*'||l_resp_appl_id );
8268: END IF;
8269: FND_GLOBAL.APPS_INITIALIZE(l_user_id,l_resp_id,l_resp_appl_id);
8270: exception when others then
8271: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8272: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8273: l_api_name || '.others_exception', sqlerrm);
8274: END IF;
8275: END initialize;
8268: END IF;
8269: FND_GLOBAL.APPS_INITIALIZE(l_user_id,l_resp_id,l_resp_appl_id);
8270: exception when others then
8271: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8272: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8273: l_api_name || '.others_exception', sqlerrm);
8274: END IF;
8275: END initialize;
8276:
8417: END LOOP;
8418:
8419: CLOSE getReqNum;
8420:
8421: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8422: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix || '.getReqNumber', l_req_num ||' * '|| l_req_header_id);
8423: END IF;
8424:
8425: x_req_num := TO_CHAR(l_req_num);
8418:
8419: CLOSE getReqNum;
8420:
8421: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8422: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix || '.getReqNumber', l_req_num ||' * '|| l_req_header_id);
8423: END IF;
8424:
8425: x_req_num := TO_CHAR(l_req_num);
8426: x_req_hdr_id := TO_CHAR(l_req_header_id);
8426: x_req_hdr_id := TO_CHAR(l_req_header_id);
8427:
8428: EXCEPTION
8429: WHEN OTHERS THEN
8430: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8431: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8432: g_module_prefix,
8433: ':unexpected error' || Sqlerrm);
8434: END IF;
8427:
8428: EXCEPTION
8429: WHEN OTHERS THEN
8430: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8431: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8432: g_module_prefix,
8433: ':unexpected error' || Sqlerrm);
8434: END IF;
8435:
8470: end if;
8471:
8472: EXCEPTION
8473: WHEN OTHERS THEN
8474: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8475: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8476: g_module_prefix,
8477: ':unexpected error' || Sqlerrm);
8478: END IF;
8471:
8472: EXCEPTION
8473: WHEN OTHERS THEN
8474: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8475: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8476: g_module_prefix,
8477: ':unexpected error' || Sqlerrm);
8478: END IF;
8479:
8620: x_revision_num := l_revision_num;
8621:
8622: EXCEPTION
8623: WHEN OTHERS THEN
8624: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8625: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8626: g_module_prefix,
8627: ':unexpected error' || Sqlerrm);
8628: END IF;
8621:
8622: EXCEPTION
8623: WHEN OTHERS THEN
8624: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8625: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8626: g_module_prefix,
8627: ':unexpected error' || Sqlerrm);
8628: END IF;
8629:
8637: PROCEDURE SET_SUPPLIER_CONTEXT(p_supplier_user_id in NUMBER,p_resp_id in NUMBER,p_appl_resp_id in NUMBER)
8638: IS
8639: BEGIN
8640:
8641: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8642: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix || '.SET_SUPPLIER_CONTEXT', 'user_id:'||p_supplier_user_id||'resp:'||p_resp_id||'appl id:'||p_appl_resp_id );
8643: END IF;
8644:
8645: fnd_global.APPS_INITIALIZE(p_supplier_user_id, p_resp_id, p_appl_resp_id);
8638: IS
8639: BEGIN
8640:
8641: IF g_fnd_debug = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
8642: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix || '.SET_SUPPLIER_CONTEXT', 'user_id:'||p_supplier_user_id||'resp:'||p_resp_id||'appl id:'||p_appl_resp_id );
8643: END IF;
8644:
8645: fnd_global.APPS_INITIALIZE(p_supplier_user_id, p_resp_id, p_appl_resp_id);
8646:
8645: fnd_global.APPS_INITIALIZE(p_supplier_user_id, p_resp_id, p_appl_resp_id);
8646:
8647: EXCEPTION
8648: WHEN OTHERS THEN
8649: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8650: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8651: g_module_prefix,
8652: ':unexpected error' || Sqlerrm);
8653: END IF;
8646:
8647: EXCEPTION
8648: WHEN OTHERS THEN
8649: IF( g_fnd_debug = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8650: FND_LOG.STRING(FND_LOG.LEVEL_ERROR,
8651: g_module_prefix,
8652: ':unexpected error' || Sqlerrm);
8653: END IF;
8654:
8664: l_external_url varchar2(500);
8665: begin
8666:
8667: l_external_url := fnd_profile.value('POS_EXTERNAL_URL');
8668: IF (g_fnd_debug = 'Y' AND FND_LOG.level_procedure >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8669: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8670: l_api_name || '.start', 'POS_EXTERNAL_URL=' || l_external_url);
8671: END IF;
8672: resultout := 'N:' || l_external_url;
8665: begin
8666:
8667: l_external_url := fnd_profile.value('POS_EXTERNAL_URL');
8668: IF (g_fnd_debug = 'Y' AND FND_LOG.level_procedure >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8669: FND_LOG.string(FND_LOG.level_procedure, g_module_prefix ||
8670: l_api_name || '.start', 'POS_EXTERNAL_URL=' || l_external_url);
8671: END IF;
8672: resultout := 'N:' || l_external_url;
8673:
8681: resultout := 'Y:' || l_external_url;
8682: end if;
8683:
8684: exception when others then
8685: IF (g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8686: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8687: l_api_name || '.others_exception', sqlerrm);
8688: END IF;
8689: resultout := 'F:' || l_external_url;
8682: end if;
8683:
8684: exception when others then
8685: IF (g_fnd_debug = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
8686: FND_LOG.string(FND_LOG.level_unexpected, g_module_prefix ||
8687: l_api_name || '.others_exception', sqlerrm);
8688: END IF;
8689: resultout := 'F:' || l_external_url;
8690: return;
8719: BEGIN
8720:
8721: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 01.';
8722: IF (g_fnd_debug = 'Y') THEN
8723: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'Enter in post_approval_notif ' || l_progress);
8724: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemtype ' || p_itemtype);
8725: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemkey ' || p_itemkey);
8726: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_actid ' || p_actid);
8727: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_funcmode ' || p_funcmode);
8720:
8721: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 01.';
8722: IF (g_fnd_debug = 'Y') THEN
8723: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'Enter in post_approval_notif ' || l_progress);
8724: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemtype ' || p_itemtype);
8725: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemkey ' || p_itemkey);
8726: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_actid ' || p_actid);
8727: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_funcmode ' || p_funcmode);
8728: END IF;
8721: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 01.';
8722: IF (g_fnd_debug = 'Y') THEN
8723: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'Enter in post_approval_notif ' || l_progress);
8724: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemtype ' || p_itemtype);
8725: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemkey ' || p_itemkey);
8726: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_actid ' || p_actid);
8727: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_funcmode ' || p_funcmode);
8728: END IF;
8729:
8722: IF (g_fnd_debug = 'Y') THEN
8723: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'Enter in post_approval_notif ' || l_progress);
8724: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemtype ' || p_itemtype);
8725: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemkey ' || p_itemkey);
8726: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_actid ' || p_actid);
8727: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_funcmode ' || p_funcmode);
8728: END IF;
8729:
8730: if (p_funcmode IN ('FORWARD', 'QUESTION', 'ANSWER')) THEN
8723: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'Enter in post_approval_notif ' || l_progress);
8724: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemtype ' || p_itemtype);
8725: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_itemkey ' || p_itemkey);
8726: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_actid ' || p_actid);
8727: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'p_funcmode ' || p_funcmode);
8728: END IF;
8729:
8730: if (p_funcmode IN ('FORWARD', 'QUESTION', 'ANSWER')) THEN
8731: if (p_funcmode = 'FORWARD') then
8742:
8743: if (p_funcmode = 'RESPOND') then
8744: l_notification_id := WF_ENGINE.context_nid;
8745: IF (g_fnd_debug = 'Y') THEN
8746: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'l_notification_id '||l_notification_id );
8747: END IF;
8748: l_result := wf_notification.GetAttrText(l_notification_id, 'RESULT');
8749:
8750: IF (g_fnd_debug = 'Y') THEN
8747: END IF;
8748: l_result := wf_notification.GetAttrText(l_notification_id, 'RESULT');
8749:
8750: IF (g_fnd_debug = 'Y') THEN
8751: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'l_result '||l_result );
8752: END IF;
8753:
8754: if (l_result = 'FORWARD') THEN
8755:
8773: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 03.' ;
8774:
8775: --
8776: IF (g_fnd_debug = 'Y') THEN
8777: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8778: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preserved_ctx ' ||l_preserved_ctx);
8779: END IF;
8780: --
8781:
8774:
8775: --
8776: IF (g_fnd_debug = 'Y') THEN
8777: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8778: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preserved_ctx ' ||l_preserved_ctx);
8779: END IF;
8780: --
8781:
8782:
8790: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 04.' ;
8791:
8792: --
8793: IF (g_fnd_debug = 'Y') THEN
8794: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8795: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_responder_id ' ||l_responder_id);
8796: END IF;
8797: --
8798: l_session_user_id := fnd_global.user_id;
8791:
8792: --
8793: IF (g_fnd_debug = 'Y') THEN
8794: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8795: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_responder_id ' ||l_responder_id);
8796: END IF;
8797: --
8798: l_session_user_id := fnd_global.user_id;
8799: l_session_resp_id := fnd_global.resp_id;
8800: l_session_appl_id := fnd_global.resp_appl_id;
8801:
8802: --
8803: IF (g_fnd_debug = 'Y') THEN
8804: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8805: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8806: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8807: END IF;
8808: --
8801:
8802: --
8803: IF (g_fnd_debug = 'Y') THEN
8804: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8805: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8806: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8807: END IF;
8808: --
8809: IF (l_session_user_id = -1) THEN
8802: --
8803: IF (g_fnd_debug = 'Y') THEN
8804: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8805: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8806: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8807: END IF;
8808: --
8809: IF (l_session_user_id = -1) THEN
8810: l_session_user_id := NULL;
8818: l_session_appl_id := NULL;
8819: END IF;
8820: --
8821: IF (g_fnd_debug = 'Y') THEN
8822: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8823: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8824: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8825: END IF;
8826: --
8819: END IF;
8820: --
8821: IF (g_fnd_debug = 'Y') THEN
8822: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8823: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8824: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8825: END IF;
8826: --
8827:
8820: --
8821: IF (g_fnd_debug = 'Y') THEN
8822: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_user_id ' ||l_session_user_id);
8823: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_resp_id ' ||l_session_resp_id);
8824: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_session_appl_id ' ||l_session_appl_id);
8825: END IF;
8826: --
8827:
8828: l_preparer_resp_id := wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
8835: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 05.' ;
8836:
8837: --
8838: IF (g_fnd_debug = 'Y') THEN
8839: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8840: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_resp_id ' ||l_preparer_resp_id);
8841: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_appl_id ' ||l_preparer_appl_id);
8842: END IF;
8843: --
8836:
8837: --
8838: IF (g_fnd_debug = 'Y') THEN
8839: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8840: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_resp_id ' ||l_preparer_resp_id);
8841: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_appl_id ' ||l_preparer_appl_id);
8842: END IF;
8843: --
8844: if (l_responder_id is not null) then
8837: --
8838: IF (g_fnd_debug = 'Y') THEN
8839: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress);
8840: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_resp_id ' ||l_preparer_resp_id);
8841: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_preparer_appl_id ' ||l_preparer_appl_id);
8842: END IF;
8843: --
8844: if (l_responder_id is not null) then
8845: if (l_responder_id <> l_session_user_id) then
8851: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 06.' ;
8852:
8853: --
8854: IF (g_fnd_debug = 'Y') THEN
8855: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress || 'When the response is made from email using guest user feature');
8856: END IF;
8857: --
8858:
8859: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
8872: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 07.' ;
8873:
8874: --
8875: IF (g_fnd_debug = 'Y') THEN
8876: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress || 'When the response is made from sysadmin login');
8877: END IF;
8878: --
8879:
8880: if (l_session_resp_id is null) THEN
8881: /* possible when the response is made from the default worklist without choosing a valid responsibility */
8882: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 07.' ;
8883: --
8884: IF (g_fnd_debug = 'Y') THEN
8885: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress '||l_progress || 'When the response is made from the default worklist');
8886: END IF;
8887: --
8888: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
8889: itemkey => p_itemkey,
8910: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 09.' ;
8911:
8912: --
8913: IF (g_fnd_debug = 'Y') THEN
8914: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,l_api_name,'l_progress ' ||l_progress || 'When the response is made after choosing a correct responsibility');
8915: END IF;
8916: --
8917:
8918: if ( l_preserved_ctx = 'TRUE') then
8955:
8956: EXCEPTION
8957: when no_data_found then
8958: IF (g_fnd_debug = 'Y') THEN
8959: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED, l_api_name, 'No data found in post_approval_notif ' || l_progress);
8960: END IF;
8961: raise;
8962:
8963: when others then
8961: raise;
8962:
8963: when others then
8964: IF (g_fnd_debug = 'Y') THEN
8965: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED, l_api_name,'Exception in post_approval_notif ' || l_progress);
8966: END IF;
8967: raise;
8968: END post_approval_notif;
8969:
9029:
9030: BEGIN
9031: --
9032: IF (g_fnd_debug = 'Y') THEN
9033: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Inside PO_SUPCHG_SELECTOR procedure');
9034: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemtype : '||p_itemtype);
9035: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemkey : '||p_itemkey);
9036: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_actid : '||p_actid);
9037: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_funcmode : '||p_funcmode);
9030: BEGIN
9031: --
9032: IF (g_fnd_debug = 'Y') THEN
9033: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Inside PO_SUPCHG_SELECTOR procedure');
9034: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemtype : '||p_itemtype);
9035: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemkey : '||p_itemkey);
9036: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_actid : '||p_actid);
9037: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_funcmode : '||p_funcmode);
9038: END IF;
9031: --
9032: IF (g_fnd_debug = 'Y') THEN
9033: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Inside PO_SUPCHG_SELECTOR procedure');
9034: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemtype : '||p_itemtype);
9035: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemkey : '||p_itemkey);
9036: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_actid : '||p_actid);
9037: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_funcmode : '||p_funcmode);
9038: END IF;
9039: --
9032: IF (g_fnd_debug = 'Y') THEN
9033: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Inside PO_SUPCHG_SELECTOR procedure');
9034: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemtype : '||p_itemtype);
9035: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemkey : '||p_itemkey);
9036: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_actid : '||p_actid);
9037: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_funcmode : '||p_funcmode);
9038: END IF;
9039: --
9040:
9033: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Inside PO_SUPCHG_SELECTOR procedure');
9034: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemtype : '||p_itemtype);
9035: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_itemkey : '||p_itemkey);
9036: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_actid : '||p_actid);
9037: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','p_funcmode : '||p_funcmode);
9038: END IF;
9039: --
9040:
9041:
9060: --
9061: l_progress :='010 - ses_user_id:'||l_session_user_id ||' ses_resp_id :'||l_session_resp_id||' responder id:' ||l_responder_id||' org id :'||l_org_id;
9062:
9063: IF (g_fnd_debug = 'Y') THEN
9064: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','l_progress1 : '||l_progress);
9065: END IF;
9066: --
9067:
9068: IF (p_funcmode = 'TEST_CTX') THEN
9121: --
9122: l_progress := '020 selection fn responder id not null';
9123:
9124: IF (g_fnd_debug = 'Y') THEN
9125: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','l_progress2 : '||l_progress);
9126: END IF;
9127: --
9128:
9129: --
9129: --
9130: l_progress :='030 selector fn : setting user id :'||l_responder_id ||' resp id '||l_resp_id_to_set||' l_appl id '||l_appl_id_to_set;
9131:
9132: IF (g_fnd_debug = 'Y') THEN
9133: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','l_progress3 : '||l_progress);
9134: END IF;
9135: --
9136: else
9137: l_user_id_to_set := wf_engine.GetItemAttrNumber (itemtype => p_itemtype,
9145: aname => 'APPLICATION_ID');
9146: --
9147: l_progress := '040 selector fn responder id null';
9148: IF (g_fnd_debug = 'Y') THEN
9149: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','l_progress4 : '||l_progress);
9150: END IF;
9151: --
9152:
9153: --
9153: --
9154: l_progress := '050 selector fn : set user '||l_user_id_to_set||' resp id ' ||l_resp_id_to_set||' appl id '||l_appl_id_to_set;
9155:
9156: IF (g_fnd_debug = 'Y') THEN
9157: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','l_progress4 : '||l_progress);
9158: END IF;
9159: --
9160: end if;
9161:
9171: END IF;
9172: EXCEPTION WHEN OTHERS THEN
9173:
9174: IF (g_fnd_debug = 'Y') THEN
9175: fnd_log.string(FND_LOG.LEVEL_PROCEDURE, 'pos.plsql.PO_ChangeOrderWF_PVT.PO_SUPCHG_SELECTOR.invoked','Exception in Selector Procedure');
9176: END IF;
9177:
9178: WF_CORE.context('PO_ChangeOrderWF_PVT', 'PO_SUPCHG_SELECTOR', p_itemtype, p_itemkey, p_actid, p_funcmode);
9179: RAISE;