1179: --dbms_output.put_line('For std pos');
1180: begin
1181: select a.notification_id, a.recipient_role
1182: INTO l_nid, l_ntf_role_name
1183: from wf_notifications a,
1184: wf_item_activity_statuses wa
1185: where itemkey=wa.item_key
1186: and itemtype=wa.item_type
1187: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
1194: begin
1195: --dbms_output.put_line('For Releases');
1196: select a.notification_id, a.recipient_role
1197: INTO l_nid, l_ntf_role_name
1198: from wf_notifications a,
1199: wf_item_activity_statuses wa
1200: where itemkey=wa.item_key
1201: and itemtype=wa.item_type
1202: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
1209: if (l_nid is null) then
1210: --we do not want to continue if the notification is not closed.
1211: return;
1212: else
1213: x_supp_user_name := wf_notification.responder(l_nid);
1214: end if;
1215:
1216: if (substr(x_supp_user_name, 1, 6) = 'email:') then
1217: --Get the username and store that in the supplier_user_name.
2097:
2098:
2099:
2100:
2163:
2396: '
2397:
2398:
2399: ';
2400: WF_NOTIFICATION.WriteToClob(document,l_document);
2401:
2402: END LOOP;
2403: CLOSE l_po_chg_req_csr;
2404: WF_NOTIFICATION.WriteToClob(document, '
2400: WF_NOTIFICATION.WriteToClob(document,l_document);
2401:
2402: END LOOP;
2403: CLOSE l_po_chg_req_csr;
2404: WF_NOTIFICATION.WriteToClob(document, '
2405:
2413:
2414: if(l_additional_changes is not null) then
2415: l_document := '
'||fnd_message.get_string('PO','PO_WF_NOTIF_ADD_CHN_REQ')||''||
2416: ' `  '||l_additional_changes||'
';
2417: WF_NOTIFICATION.WriteToClob(document,l_document);
2418: end if;
2419:
2420: else
2421: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
2420: else
2421: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
2422: fnd_message.set_token('DOC',l_document_type);
2423: l_document := fnd_message.get;
2424: WF_NOTIFICATION.WriteToClob(document,l_document);
2425: end if;
2426: exception when others then
2427: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm);
2428: END GEN_NTF_FOR_REQ_SUP_CHN;
2423: l_document := fnd_message.get;
2424: WF_NOTIFICATION.WriteToClob(document,l_document);
2425: end if;
2426: exception when others then
2427: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm);
2428: END GEN_NTF_FOR_REQ_SUP_CHN;
2429:
2430:
2431: PROCEDURE GEN_NTF_FOR_PLAN_SUP_CHN( p_code IN varchar2,
2933:
2934:
2935:
2936:
2994:
3222: '
3223:
3224:
3225: ';
3226: WF_NOTIFICATION.WriteToClob(document,l_document);
3227:
3228: END LOOP;
3229: CLOSE l_po_chg_req_csr;
3230: WF_NOTIFICATION.WriteToClob(document, '
3226: WF_NOTIFICATION.WriteToClob(document,l_document);
3227:
3228: END LOOP;
3229: CLOSE l_po_chg_req_csr;
3230: WF_NOTIFICATION.WriteToClob(document, '
3231:
3237:
3238: if(l_additional_changes is not null) then
3239: l_document := '
'||fnd_message.get_string('PO','PO_WF_NOTIF_ADD_CHN_REQ')||''||
3240: ' `  '||l_additional_changes||'
';
3241: WF_NOTIFICATION.WriteToClob(document,l_document);
3242: end if;
3243:
3244: else
3245: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
3244: else
3245: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
3246: fnd_message.set_token('DOC',l_document_type);
3247: l_document := fnd_message.get;
3248: WF_NOTIFICATION.WriteToClob(document,l_document);
3249: end if;
3250: exception when others then
3251: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm);
3252:
3247: l_document := fnd_message.get;
3248: WF_NOTIFICATION.WriteToClob(document,l_document);
3249: end if;
3250: exception when others then
3251: WF_NOTIFICATION.WriteToClob(document,'Exception occured:'||sqlerrm);
3252:
3253: END GEN_NTF_FOR_PLAN_SUP_CHN;
3254:
3255: /*
3876:
3877:
3878:
3879:
3918:
3991: '
3992:
3993:
3994: ';
3995: WF_NOTIFICATION.WriteToClob(document,l_document);
3996:
3997: END LOOP;
3998: CLOSE l_po_ack_csr;
3999: WF_NOTIFICATION.WriteToClob(document, '
3995: WF_NOTIFICATION.WriteToClob(document,l_document);
3996:
3997: END LOOP;
3998: CLOSE l_po_ack_csr;
3999: WF_NOTIFICATION.WriteToClob(document, '
4000:
4058:
4296: '
4297:
4298:
4299: ';
4300: WF_NOTIFICATION.WriteToClob(document,l_document);
4301:
4302: END LOOP;
4303: CLOSE l_po_chg_req_csr;
4304: WF_NOTIFICATION.WriteToClob(document, '
4300: WF_NOTIFICATION.WriteToClob(document,l_document);
4301:
4302: END LOOP;
4303: CLOSE l_po_chg_req_csr;
4304: WF_NOTIFICATION.WriteToClob(document, '
4305:
4311:
4312: if(l_additional_changes is not null) then
4313: l_document := '
'||fnd_message.get_string('PO','PO_WF_NOTIF_ADD_CHN_REQ')||''||
4314: ' `  '||l_additional_changes||'
';
4315: WF_NOTIFICATION.WriteToClob(document,l_document);
4316: end if;
4317: else
4318: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
4319: fnd_message.set_token('DOC',l_document_type);
4317: else
4318: fnd_message.set_name('PO','PO_WF_NOTIF_CAN_ENTIER');
4319: fnd_message.set_token('DOC',l_document_type);
4320: l_document := fnd_message.get;
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 ||
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;
4330:
4331: END GEN_NTF_FOR_BUYER_SUP_CHG;
4332:
4781:
4782:
4783:
'||fnd_message.get_string('PO','PO_WF_NOTIF_REASON')||' | '||fnd_message.get_string('PO','PO_WF_NOTIF_SPLIT')||' |
---|
5046: ';
5047: WF_NOTIFICATION.WriteToClob(document,l_document);
5048: END LOOP;
5049: CLOSE l_po_chg_req_csr;
5050: WF_NOTIFICATION.WriteToClob(document, '
5051:
5072:
5073: '' ||
5074: '';
5075:
5076: WF_NOTIFICATION.WriteToClob(document,l_document);
5077: end if;
5078:
5079: else --if header_cnacel = N
5080: if(l_header_response = 'ACCEPTED') then
5085: fnd_message.set_name('PO','PO_WF_NOTIF_BUY_RESP_CAN');
5086: fnd_message.set_token('DOC',l_doc_hdr_info);
5087: fnd_message.set_token('RESPONSE',l_header_response);
5088: l_document := fnd_message.get;
5089: WF_NOTIFICATION.WriteToClob(document,l_document);
5090: end if;
5091: else
5092: WF_NOTIFICATION.WriteToClob(document,'GEN_NTF_FOR_SUP_BUY_RP for no html customer');
5093: end if;
5088: l_document := fnd_message.get;
5089: WF_NOTIFICATION.WriteToClob(document,l_document);
5090: end if;
5091: else
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 ||
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;
5101:
5102: END GEN_NTF_FOR_SUP_BUY_RP;
5103:
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
8751: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, l_api_name, 'l_result '||l_result );
8752: END IF;
8752: END IF;
8753:
8754: if (l_result = 'FORWARD') THEN
8755:
8756: l_forwardTo := wf_notification.GetAttrText(l_notification_id, 'FORWARD_TO_USERNAME_RESPONSE');
8757: l_forward_to_username_response := wf_engine.GetItemAttrText (itemtype => p_itemtype,
8758: itemkey => p_itemkey,
8759: aname => 'FORWARD_TO_USERNAME_RESPONSE');
8760:
8782:
8783: SELECT fu.USER_ID
8784: INTO l_responder_id
8785: FROM fnd_user fu,
8786: wf_notifications wfn
8787: WHERE wfn.notification_id = l_notification_id
8788: AND wfn.original_recipient = fu.user_name;
8789:
8790: l_progress := 'PO_ChangeOrderWF_PVT.post_approval_notif: 04.' ;