1: PACKAGE BODY PO_WF_REQ_NOTIFICATION AS
2: /* $Header: POXWPA6B.pls 120.14.12000000.3 2007/05/04 00:01:49 lswamy 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');
98:
99: DESCRIPTION : This private function returns true if foreign currency
100: column needs to be displayed for Req Approval notifications
101:
102: Referenced by : PO_WF_REQ_NOTIFICATION. This is invoked from
103: get_req_lines_details_link
104:
105: parameters : p_document_id - This is requisition Header id
106: p_func_currency_code - This is functional currency
114:
115: DESCRIPTION : This procedure retrieves item_type, item_key and
116: notification id(if #nid is present)
117:
118: Referenced by : PO_WF_REQ_NOTIFICATION
119: parameters : document_id - Document Identifier
120: itemtype - Workflow item type for Req approval
121: itemkey - Unique workflow item key
122: nid - Workflow id for current notification
134:
135: DESCRIPTION : This function finds the req total and
136: return the value with a displayable format specified by given currency.
137:
138: Referenced by : PO_WF_REQ_NOTIFICATION
139: parameters :
140: itemtype - Workflow item type for Req approval
141: itemkey - Unique workflow item key
142: p_document_id - req header id
1820: l_line.txn_curr_code is not null AND
1821: l_currency_code <> l_line.txn_curr_code) THEN
1822:
1823: l_document := l_document || '
1828: END IF;
1829: END IF;
1830:
1831: l_document := l_document || '
2559:
2560: commit;
2561: EXCEPTION
2562: WHEN OTHERS THEN
2563: wf_core.context('PO_WF_REQ_NOTIFICATION','update_action_history',l_progress,sqlerrm);
2564: RAISE;
2565: end;
2566:
2567:
2908:
2909: EXCEPTION
2910:
2911: WHEN OTHERS THEN
2912: wf_core.context('PO_WF_REQ_NOTIFICATION','set_doc_mgr_context',l_progress);
2913: raise;
2914:
2915: END set_doc_mgr_context;
2916:
3139: EXCEPTION
3140: WHEN OTHERS THEN
3141: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3142: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
3143: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_approval_msg_attribute',l_progress);
3144: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_APPROVER_MSG_ATTRIBUTE');
3145: raise;
3146:
3147: END Get_req_approver_msg_attribute;
3140: WHEN OTHERS THEN
3141: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3142: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
3143: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_approval_msg_attribute',l_progress);
3144: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_APPROVER_MSG_ATTRIBUTE');
3145: raise;
3146:
3147: END Get_req_approver_msg_attribute;
3148:
3201:
3202: EXCEPTION
3203: WHEN OTHERS THEN
3204: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3205: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_preparer_msg_attribute',l_progress);
3206: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_PREPARER_MSG_ATTRIBUTE');
3207: raise;
3208:
3209: END Get_req_preparer_msg_attribute;
3202: EXCEPTION
3203: WHEN OTHERS THEN
3204: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3205: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_preparer_msg_attribute',l_progress);
3206: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name, l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_PREPARER_MSG_ATTRIBUTE');
3207: raise;
3208:
3209: END Get_req_preparer_msg_attribute;
3210:
3286: EXCEPTION
3287: WHEN OTHERS THEN
3288: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3289: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
3290: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_fwdfrom_msg_attribute',l_progress);
3291: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
3292: l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_FWDFROM_MSG_ATTRIBUTE');
3293: raise;
3294:
3288: l_doc_string := PO_REQAPPROVAL_INIT1.get_error_doc(itemType, itemkey);
3289: l_preparer_user_name := PO_REQAPPROVAL_INIT1.get_preparer_user_name(itemType, itemkey);
3290: wf_core.context('PO_WF_REQ_NOTIFICATION','Get_req_fwdfrom_msg_attribute',l_progress);
3291: PO_REQAPPROVAL_INIT1.send_error_notif(itemType, itemkey, l_preparer_user_name,
3292: l_doc_string, sqlerrm, 'PO_WF_REQ_NOTIFICATION.GET_REQ_FWDFROM_MSG_ATTRIBUTE');
3293: raise;
3294:
3295: END Get_req_fwdfrom_msg_attribute;
3296:
3362: end;
3363: end if;
3364:
3365: IF (g_po_wf_debug = 'Y') THEN
3366: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,'PO_WF_REQ_NOTIFICATION.get_item_info nid='||nid);
3367: END IF;
3368:
3369: end;
3370:
3401: return to_char(p_amount,l_mask);
3402:
3403: end FORMAT_CURRENCY_NO_PRECESION;
3404:
3405: END PO_WF_REQ_NOTIFICATION;