1: PACKAGE BODY PO_SIGNATURE_PVT AS
2: /* $Header: POXVSIGB.pls 120.10.12010000.2 2008/11/14 03:01:58 vchiran ship $ */
3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N');
3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N');
6:
7: c_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_SIGNATURE_PVT.';
8: g_pkg_name CONSTANT VARCHAR2(30) := 'PO_SIGNATURE_PVT'; --
9: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
10: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
11:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N');
6:
7: c_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_SIGNATURE_PVT.';
8: g_pkg_name CONSTANT VARCHAR2(30) := 'PO_SIGNATURE_PVT'; --
10: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
11:
12: -- Read the profile option that determines whether the promise date will be defaulted with need-by date or not
100: l_sign_attachments_value VARCHAR2(300);
101: BEGIN
102:
103: IF (g_po_wf_debug = 'Y') THEN
104: l_progress := 'PO_SIGNATURE_PVT.Set_Startup_Values: 01';
105: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
106: END IF;
107:
108: -- Set the multi-org context
242: PO_WF_UTIL_PKG.SetItemAttrText(itemtype => itemtype,
243: itemkey => itemkey,
244: aname => 'PO_SUP_SIGNATURE_MSG_BODY',
245: avalue =>
246: 'PLSQLCLOB:PO_SIGNATURE_PVT.get_signature_notfn_body /'|| l_document_id ||':'||itemtype||':'||itemkey);
247:
248: EXCEPTION
249: WHEN l_binding_exception then
250: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemtype, itemkey);
248: EXCEPTION
249: WHEN l_binding_exception then
250: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemtype, itemkey);
251: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemtype, itemkey);
252: WF_CORE.context('PO_SIGNATURE_PVT','Set_Startup_Values',l_progress);
253: PO_REQAPPROVAL_INIT1.send_error_notif(itemtype, itemkey, l_preparer_user_name, l_doc_string, 'l_binding_exception - '||sqlerrm, 'PO_SIGNATURE_PVT.SET_STARTUP_VALUES');
254: RAISE;
255:
256: WHEN OTHERS THEN
249: WHEN l_binding_exception then
250: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemtype, itemkey);
251: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemtype, itemkey);
252: WF_CORE.context('PO_SIGNATURE_PVT','Set_Startup_Values',l_progress);
253: PO_REQAPPROVAL_INIT1.send_error_notif(itemtype, itemkey, l_preparer_user_name, l_doc_string, 'l_binding_exception - '||sqlerrm, 'PO_SIGNATURE_PVT.SET_STARTUP_VALUES');
254: RAISE;
255:
256: WHEN OTHERS THEN
257: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
255:
256: WHEN OTHERS THEN
257: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
258: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
259: WF_CORE.context('PO_SIGNATURE_PVT','Set_Startup_Values',l_progress);
260: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_SIGNATURE_PVT.SET_STARTUP_VALUES');
261: RAISE;
262:
263: END SET_STARTUP_VALUES;
256: WHEN OTHERS THEN
257: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
258: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
259: WF_CORE.context('PO_SIGNATURE_PVT','Set_Startup_Values',l_progress);
260: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_SIGNATURE_PVT.SET_STARTUP_VALUES');
261: RAISE;
262:
263: END SET_STARTUP_VALUES;
264:
326: l_item_type := substr(document_id, l_firstcolon + 1, l_secondcolon - l_firstcolon - 1);
327: l_item_key := substr(document_id, l_secondcolon+1,length(document_id) - l_secondcolon);
328:
329: IF (g_po_wf_debug = 'Y') THEN
330: l_progress := 'PO_SIGNATURE_PVT.get_signature_notfn_body: 01';
331: PO_WF_DEBUG_PKG.insert_debug(l_item_type,l_item_key,l_progress);
332: END IF;
333:
334: l_buyer_name := PO_WF_UTIL_PKG.GetItemAttrText (itemtype => l_item_type,
435:
436: l_msgbody := l_msgbody || '