29: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
30: --
31: IF l_debug_on IS NULL
32: THEN
33: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
34: END IF;
35: --
36: WSH_DEBUG_SV.start_debug (p_entity_id);
37: IF l_debug_on THEN
32: THEN
33: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
34: END IF;
35: --
36: WSH_DEBUG_SV.start_debug (p_entity_id);
37: IF l_debug_on THEN
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
34: END IF;
35: --
36: WSH_DEBUG_SV.start_debug (p_entity_id);
37: IF l_debug_on THEN
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
35: --
36: WSH_DEBUG_SV.start_debug (p_entity_id);
37: IF l_debug_on THEN
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
43: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
36: WSH_DEBUG_SV.start_debug (p_entity_id);
37: IF l_debug_on THEN
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
43: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
44: END IF;
37: IF l_debug_on THEN
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
43: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
44: END IF;
45:
38: wsh_debug_sv.push(l_module_name, 'Send_Document');
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
43: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
44: END IF;
45:
46: IF ( p_document_type = 'SR' ) THEN
39: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
40: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
41: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
42: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
43: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
44: END IF;
45:
46: IF ( p_document_type = 'SR' ) THEN
47:
65: raise wsh_invalid_doc_type;
66: END IF;
67:
68: IF l_debug_on THEN
69: wsh_debug_sv.pop (l_module_name);
70: END IF;
71: WSH_DEBUG_SV.stop_debug;
72:
73: EXCEPTION
67:
68: IF l_debug_on THEN
69: wsh_debug_sv.pop (l_module_name);
70: END IF;
71: WSH_DEBUG_SV.stop_debug;
72:
73: EXCEPTION
74:
75: WHEN wsh_invalid_doc_type THEN
74:
75: WHEN wsh_invalid_doc_type THEN
76: x_return_status := wsh_util_core.g_ret_sts_error;
77: IF l_debug_on THEN
78: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_doc_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
79: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_doc_type');
80: END IF;
81: WHEN OTHERS THEN
82: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
75: WHEN wsh_invalid_doc_type THEN
76: x_return_status := wsh_util_core.g_ret_sts_error;
77: IF l_debug_on THEN
78: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_doc_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
79: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_doc_type');
80: END IF;
81: WHEN OTHERS THEN
82: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
83: IF l_debug_on THEN
80: END IF;
81: WHEN OTHERS THEN
82: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
83: IF l_debug_on THEN
84: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
85: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
86: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
87: END IF;
88: END Send_Document;
81: WHEN OTHERS THEN
82: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
83: IF l_debug_on THEN
84: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
85: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
86: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
87: END IF;
88: END Send_Document;
89:
82: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
83: IF l_debug_on THEN
84: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
85: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
86: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
87: END IF;
88: END Send_Document;
89:
90: PROCEDURE Send_Shipment_Request ( p_entity_id IN NUMBER,
228: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
229: --
230: IF l_debug_on IS NULL
231: THEN
232: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
233: END IF;
234: --
235: IF l_debug_on THEN
236: wsh_debug_sv.push(l_module_name);
232: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
233: END IF;
234: --
235: IF l_debug_on THEN
236: wsh_debug_sv.push(l_module_name);
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
233: END IF;
234: --
235: IF l_debug_on THEN
236: wsh_debug_sv.push(l_module_name);
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
241: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
234: --
235: IF l_debug_on THEN
236: wsh_debug_sv.push(l_module_name);
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
241: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
242: END IF;
235: IF l_debug_on THEN
236: wsh_debug_sv.push(l_module_name);
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
241: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
242: END IF;
243:
236: wsh_debug_sv.push(l_module_name);
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
241: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
242: END IF;
243:
244:
237: wsh_debug_sv.log(l_module_name, 'p_entity_id',p_entity_id);
238: wsh_debug_sv.log(l_module_name, 'p_entity_type',p_entity_type);
239: wsh_debug_sv.log(l_module_name, 'p_action_type',p_action_type);
240: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
241: wsh_debug_sv.log(l_module_name, 'p_organization_id',p_organization_id);
242: END IF;
243:
244:
245: l_wh_type := WSH_EXTERNAL_INTERFACE_SV.Get_Warehouse_Type(p_organization_id => p_organization_id,
246: x_return_status => x_return_status,
247: p_delivery_id => p_entity_id);
248:
249: IF l_debug_on THEN
250: wsh_debug_sv.log(l_module_name, 'l_wh_type,x_return_status',l_wh_type||','||x_return_status);
251: END IF;
252:
253: IF ( l_wh_type IS NULL ) THEN
254: select organization_code
258: raise wsh_incorrect_org;
259: END IF;
260:
261: IF l_debug_on THEN
262: wsh_debug_sv.log(l_module_name, 'l_org_code',l_org_code);
263: END IF;
264:
265: open del_name_cur;
266: Fetch del_name_cur into l_entity_number, l_customer_id;
266: Fetch del_name_cur into l_entity_number, l_customer_id;
267: close del_name_cur;
268:
269: IF l_debug_on THEN
270: wsh_debug_sv.log(l_module_name, 'l_entity_number,l_customer_id',l_entity_number||','||l_customer_id);
271: END IF;
272: IF l_customer_id IS NULL THEN
273: raise wsh_invalid_customer;
274: END IF;
284: l_txns_history_rec.item_type := 'WSHSUPI';
285:
286: select to_char(WSH_DOCUMENT_NUMBER_S.nextval) into l_txns_history_rec.document_number from dual;
287: IF l_debug_on THEN
288: wsh_debug_sv.log(l_module_name, 'DOCUMENT_NUMBER',l_txns_history_rec.document_number);
289: END IF;
290:
291: /* K proj
292: IF ( l_wh_type = 'CMS' and p_action_type = 'D' ) THEN
295: */
296: l_txns_history_rec.event_name := 'oracle.apps.wsh.sup.ssro';
297: --END IF;
298: IF l_debug_on THEN
299: wsh_debug_sv.log (l_module_name, 'Action Type ' , p_action_type);
300: wsh_debug_sv.log (l_module_name, 'Delivery Id ' , p_entity_id);
301: wsh_debug_sv.log (l_module_name, 'Document Type ' , p_document_type);
302: END IF;
303: IF ( p_action_type = 'A' ) THEN
296: l_txns_history_rec.event_name := 'oracle.apps.wsh.sup.ssro';
297: --END IF;
298: IF l_debug_on THEN
299: wsh_debug_sv.log (l_module_name, 'Action Type ' , p_action_type);
300: wsh_debug_sv.log (l_module_name, 'Delivery Id ' , p_entity_id);
301: wsh_debug_sv.log (l_module_name, 'Document Type ' , p_document_type);
302: END IF;
303: IF ( p_action_type = 'A' ) THEN
304:
297: --END IF;
298: IF l_debug_on THEN
299: wsh_debug_sv.log (l_module_name, 'Action Type ' , p_action_type);
300: wsh_debug_sv.log (l_module_name, 'Delivery Id ' , p_entity_id);
301: wsh_debug_sv.log (l_module_name, 'Document Type ' , p_document_type);
302: END IF;
303: IF ( p_action_type = 'A' ) THEN
304:
305: IF ( WSH_DELIVERY_UTIL.Is_SendDoc_Allowed( p_entity_id,
317: x_exception_exist => x_exception_exist,
318: x_severity_present => x_severity_present,
319: x_return_status => x_return_status);
320: IF l_debug_on THEN
321: wsh_debug_sv.log(l_module_name, 'check_exception x_exception_exist,x_severity_present,x_return_status',x_exception_exist||','||x_severity_present||','||x_return_status);
322: END IF;
323:
324: IF (x_exception_exist = 'Y') THEN
325: raise wsh_details_exceptions;
333: p_source_code => 'OE',
334: p_init_flag => 'Y',
335: x_return_status => x_return_status);
336: IF l_debug_on THEN
337: wsh_debug_sv.log(l_module_name, 'check_credit_holds x_return_status',x_return_status);
338: END IF;
339:
340: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
341: raise wsh_details_credit_hold;
362: (p_delivery_id => p_entity_id,
363: x_return_status => x_return_status);
364:
365: IF l_debug_on THEN
366: wsh_debug_sv.log(l_module_name, 'Del_Assigned_To_Trip x_return_status',x_return_status);
367: END IF;
368: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
369: IF l_debug_on THEN
370: wsh_debug_sv.pop(l_module_name, 'RETURN');
366: wsh_debug_sv.log(l_module_name, 'Del_Assigned_To_Trip x_return_status',x_return_status);
367: END IF;
368: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
369: IF l_debug_on THEN
370: wsh_debug_sv.pop(l_module_name, 'RETURN');
371: END IF;
372: RETURN;
373: ELSIF l_assigned_to_trip = 'Y' THEN
374: raise wsh_del_assign_to_trip;
413: where delivery_id = p_entity_id
414: for update nowait;
415:
416: IF l_debug_on THEN
417: wsh_debug_sv.log (l_module_name,'Update_Dlvy_Status-> x_return_status: ',x_return_status);
418: END IF;
419:
420: IF ( x_return_status not in (WSH_UTIL_CORE.G_RET_STS_SUCCESS,WSH_UTIL_CORE.G_RET_STS_WARNING) ) THEN
421: raise wsh_insert_history_error;
427: WSH_EXTERNAL_INTERFACE_SV.RAISE_EVENT(l_txns_history_rec,
428: NULL,
429: x_return_status);
430: IF l_debug_on THEN
431: wsh_debug_sv.log (l_module_name,'RAISE_EVENT x_return_status: ',x_return_status);
432: END IF;
433: IF ( x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
434: raise wsh_raise_event_error;
435: END IF;
472: x_return_status);
473:
474: --commit;
475: IF l_debug_on THEN
476: wsh_debug_sv.log (l_module_name,'Update_Dlvy_Status-> x_return_status: ',x_return_status);
477: END IF;
478:
479: WSH_EXTERNAL_INTERFACE_SV.RAISE_EVENT(l_txns_history_rec,
480: NULL,
479: WSH_EXTERNAL_INTERFACE_SV.RAISE_EVENT(l_txns_history_rec,
480: NULL,
481: x_return_status);
482: IF l_debug_on THEN
483: wsh_debug_sv.log (l_module_name,'RAISE_EVENT x_return_status: ',x_return_status);
484: END IF;
485: IF ( x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
486: raise wsh_raise_event_error;
487: END IF;
498: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
499: END IF;
500:
501: IF l_debug_on THEN
502: wsh_debug_sv.pop (l_module_name);
503: END IF;
504: EXCEPTION
505: WHEN wsh_incorrect_org THEN
506: x_return_status := wsh_util_core.g_ret_sts_error;
507: FND_MESSAGE.Set_Name('WSH', 'WSH_INCORRECT_ORG');
508: FND_MESSAGE.Set_Token('ORG_CODE', l_org_code);
509: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
510: IF l_debug_on THEN
511: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_incorrect_org exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
512: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_incorrect_org');
513: END IF;
514: WHEN wsh_invalid_delivery THEN
515: x_return_status := wsh_util_core.g_ret_sts_error;
508: FND_MESSAGE.Set_Token('ORG_CODE', l_org_code);
509: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
510: IF l_debug_on THEN
511: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_incorrect_org exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
512: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_incorrect_org');
513: END IF;
514: WHEN wsh_invalid_delivery THEN
515: x_return_status := wsh_util_core.g_ret_sts_error;
516: FND_MESSAGE.Set_Name('WSH', 'WSH_INCOMPLETE_DELIVERY');
516: FND_MESSAGE.Set_Name('WSH', 'WSH_INCOMPLETE_DELIVERY');
517: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
518: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
519: IF l_debug_on THEN
520: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_delivery exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
521: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_delivery');
522: END IF;
523: WHEN wsh_details_not_packed THEN
524: x_return_status := wsh_util_core.g_ret_sts_error;
517: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
518: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
519: IF l_debug_on THEN
520: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_delivery exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
521: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_delivery');
522: END IF;
523: WHEN wsh_details_not_packed THEN
524: x_return_status := wsh_util_core.g_ret_sts_error;
525: FND_MESSAGE.Set_Name('WSH', 'WSH_DEL_PACK_ITEMS_UNPACKED');
525: FND_MESSAGE.Set_Name('WSH', 'WSH_DEL_PACK_ITEMS_UNPACKED');
526: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
527: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
528: IF l_debug_on THEN
529: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_not_packed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
530: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_not_packed');
531: END IF;
532: WHEN wsh_tpw_del_det_rel_stat THEN
533: x_return_status := wsh_util_core.g_ret_sts_error;
526: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
527: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
528: IF l_debug_on THEN
529: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_not_packed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
530: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_not_packed');
531: END IF;
532: WHEN wsh_tpw_del_det_rel_stat THEN
533: x_return_status := wsh_util_core.g_ret_sts_error;
534: FND_MESSAGE.Set_Name('WSH', 'WSH_TPW_DEL_DET_REL_STAT');
534: FND_MESSAGE.Set_Name('WSH', 'WSH_TPW_DEL_DET_REL_STAT');
535: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
536: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
537: IF l_debug_on THEN
538: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_tpw_del_det_rel_stat exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
539: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_tpw_del_det_rel_stat');
540: END IF;
541: WHEN wsh_cms_del_det_rel_stat THEN
542: x_return_status := wsh_util_core.g_ret_sts_error;
535: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
536: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
537: IF l_debug_on THEN
538: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_tpw_del_det_rel_stat exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
539: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_tpw_del_det_rel_stat');
540: END IF;
541: WHEN wsh_cms_del_det_rel_stat THEN
542: x_return_status := wsh_util_core.g_ret_sts_error;
543: FND_MESSAGE.Set_Name('WSH', 'WSH_CMS_DEL_DET_REL_STAT');
543: FND_MESSAGE.Set_Name('WSH', 'WSH_CMS_DEL_DET_REL_STAT');
544: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
545: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
546: IF l_debug_on THEN
547: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_cms_del_det_rel_stat exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
548: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_cms_del_det_rel_stat');
549: END IF;
550: WHEN wsh_insert_history_error THEN
551: IF ( p_action_type = 'A' ) THEN
544: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
545: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
546: IF l_debug_on THEN
547: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_cms_del_det_rel_stat exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
548: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_cms_del_det_rel_stat');
549: END IF;
550: WHEN wsh_insert_history_error THEN
551: IF ( p_action_type = 'A' ) THEN
552: WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
563: --commit;
564: x_return_status := wsh_util_core.g_ret_sts_error;
565: END IF;
566: IF l_debug_on THEN
567: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_insert_history_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
568: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_insert_history_error');
569: END IF;
570: WHEN wsh_raise_event_error THEN
571: IF ( p_action_type = 'A' ) THEN
564: x_return_status := wsh_util_core.g_ret_sts_error;
565: END IF;
566: IF l_debug_on THEN
567: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_insert_history_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
568: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_insert_history_error');
569: END IF;
570: WHEN wsh_raise_event_error THEN
571: IF ( p_action_type = 'A' ) THEN
572: WSH_DELIVERY_UTIL.Update_Dlvy_Status (p_entity_id,
585: ELSE
586: x_return_status := wsh_util_core.g_ret_sts_error;
587: END IF;
588: IF l_debug_on THEN
589: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_raise_event_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
590: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_raise_event_error');
591: END IF;
592: WHEN wsh_delivery_locked THEN
593: x_return_status := wsh_util_core.g_ret_sts_error;
586: x_return_status := wsh_util_core.g_ret_sts_error;
587: END IF;
588: IF l_debug_on THEN
589: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_raise_event_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
590: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_raise_event_error');
591: END IF;
592: WHEN wsh_delivery_locked THEN
593: x_return_status := wsh_util_core.g_ret_sts_error;
594: FND_MESSAGE.Set_Name('WSH', 'WSH_DELIVERY_LOCKED');
594: FND_MESSAGE.Set_Name('WSH', 'WSH_DELIVERY_LOCKED');
595: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
596: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
597: IF l_debug_on THEN
598: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_delivery_locked exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
599: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_delivery_locked');
600: END IF;
601: WHEN wsh_cancel_disallowed THEN
602: x_return_status := wsh_util_core.g_ret_sts_error;
595: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
596: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
597: IF l_debug_on THEN
598: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_delivery_locked exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
599: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_delivery_locked');
600: END IF;
601: WHEN wsh_cancel_disallowed THEN
602: x_return_status := wsh_util_core.g_ret_sts_error;
603: FND_MESSAGE.Set_Name('WSH', 'WSH_CANCEL_DISALLOWED');
603: FND_MESSAGE.Set_Name('WSH', 'WSH_CANCEL_DISALLOWED');
604: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
605: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
606: IF l_debug_on THEN
607: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_cancel_disallowed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
608: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_cancel_disallowed');
609: END IF;
610: WHEN wsh_del_assign_to_trip THEN
611: FND_MESSAGE.SET_NAME('WSH','WSH_DEL_OUTBOUND_FAILED_TRIP');
604: FND_MESSAGE.Set_Token('DEL_NAME', l_entity_number);
605: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
606: IF l_debug_on THEN
607: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_cancel_disallowed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
608: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_cancel_disallowed');
609: END IF;
610: WHEN wsh_del_assign_to_trip THEN
611: FND_MESSAGE.SET_NAME('WSH','WSH_DEL_OUTBOUND_FAILED_TRIP');
612: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_entity_id));
612: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_entity_id));
613: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
614: wsh_util_core.add_message(x_return_status,l_module_name);
615: IF l_debug_on THEN
616: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_assign_to_trip exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
617: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_assign_to_trip');
618: END IF;
619: WHEN wsh_details_exceptions THEN
620: FND_MESSAGE.SET_NAME('WSH','WSH_XC_EXIST_DET');
613: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
614: wsh_util_core.add_message(x_return_status,l_module_name);
615: IF l_debug_on THEN
616: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_assign_to_trip exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
617: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_assign_to_trip');
618: END IF;
619: WHEN wsh_details_exceptions THEN
620: FND_MESSAGE.SET_NAME('WSH','WSH_XC_EXIST_DET');
621: FND_MESSAGE.SET_TOKEN('DEL_DET_ID', to_char(l_delivery_detail_id));
621: FND_MESSAGE.SET_TOKEN('DEL_DET_ID', to_char(l_delivery_detail_id));
622: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
623: wsh_util_core.add_message(x_return_status,l_module_name);
624: IF l_debug_on THEN
625: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_exceptions exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
626: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_exceptions');
627: END IF;
628: WHEN wsh_details_credit_hold THEN
629: FND_MESSAGE.SET_NAME('WSH','WSH_SR_CREDIT_HOLD_ERR');
622: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
623: wsh_util_core.add_message(x_return_status,l_module_name);
624: IF l_debug_on THEN
625: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_exceptions exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
626: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_exceptions');
627: END IF;
628: WHEN wsh_details_credit_hold THEN
629: FND_MESSAGE.SET_NAME('WSH','WSH_SR_CREDIT_HOLD_ERR');
630: FND_MESSAGE.SET_TOKEN('DEL_NAME',l_entity_number);
631: FND_MESSAGE.SET_TOKEN('DET_NAME',to_char(l_delivery_detail_id));
632: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
633: wsh_util_core.add_message(x_return_status,l_module_name);
634: IF l_debug_on THEN
635: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_credit_hold exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
636: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_credit_hold ');
637: END IF;
638: WHEN wsh_invalid_customer THEN
639: FND_MESSAGE.SET_NAME('WSH','WSH_NO_CUST_DEF_ERROR');
632: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
633: wsh_util_core.add_message(x_return_status,l_module_name);
634: IF l_debug_on THEN
635: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_details_credit_hold exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
636: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_details_credit_hold ');
637: END IF;
638: WHEN wsh_invalid_customer THEN
639: FND_MESSAGE.SET_NAME('WSH','WSH_NO_CUST_DEF_ERROR');
640: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_entity_id));
640: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_entity_id));
641: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
642: wsh_util_core.add_message(x_return_status,l_module_name);
643: IF l_debug_on THEN
644: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_customer exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
645: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_customer');
646: END IF;
647: WHEN others THEN
648: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
641: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
642: wsh_util_core.add_message(x_return_status,l_module_name);
643: IF l_debug_on THEN
644: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_customer exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
645: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_customer');
646: END IF;
647: WHEN others THEN
648: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
649: IF l_debug_on THEN
646: END IF;
647: WHEN others THEN
648: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
649: IF l_debug_on THEN
650: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
651: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
652: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
653: END IF;
654: END Send_Shipment_Request;
647: WHEN others THEN
648: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
649: IF l_debug_on THEN
650: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
651: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
652: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
653: END IF;
654: END Send_Shipment_Request;
655:
648: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
649: IF l_debug_on THEN
650: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
651: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
652: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
653: END IF;
654: END Send_Shipment_Request;
655:
656: PROCEDURE Get_Event_Key(p_item_type IN VARCHAR2 DEFAULT NULL,
695: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
696: --
697: IF l_debug_on IS NULL
698: THEN
699: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
700: END IF;
701: --
702: IF l_debug_on THEN
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
699: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
700: END IF;
701: --
702: IF l_debug_on THEN
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
704: wsh_debug_sv.log (l_module_name, 'Event Name ' , p_event_name);
705: wsh_debug_sv.log (l_module_name, 'Organization Id ' , p_organization_id);
706: wsh_debug_sv.log (l_module_name, 'Delivery Name ' , p_delivery_name);
707: wsh_debug_sv.log (l_module_name, 'Event Code ' , l_event_code);
700: END IF;
701: --
702: IF l_debug_on THEN
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
704: wsh_debug_sv.log (l_module_name, 'Event Name ' , p_event_name);
705: wsh_debug_sv.log (l_module_name, 'Organization Id ' , p_organization_id);
706: wsh_debug_sv.log (l_module_name, 'Delivery Name ' , p_delivery_name);
707: wsh_debug_sv.log (l_module_name, 'Event Code ' , l_event_code);
708: END IF;
701: --
702: IF l_debug_on THEN
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
704: wsh_debug_sv.log (l_module_name, 'Event Name ' , p_event_name);
705: wsh_debug_sv.log (l_module_name, 'Organization Id ' , p_organization_id);
706: wsh_debug_sv.log (l_module_name, 'Delivery Name ' , p_delivery_name);
707: wsh_debug_sv.log (l_module_name, 'Event Code ' , l_event_code);
708: END IF;
709:
702: IF l_debug_on THEN
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
704: wsh_debug_sv.log (l_module_name, 'Event Name ' , p_event_name);
705: wsh_debug_sv.log (l_module_name, 'Organization Id ' , p_organization_id);
706: wsh_debug_sv.log (l_module_name, 'Delivery Name ' , p_delivery_name);
707: wsh_debug_sv.log (l_module_name, 'Event Code ' , l_event_code);
708: END IF;
709:
710: x_return_status := wsh_util_core.g_ret_sts_success;
703: wsh_debug_sv.push(l_module_name, 'Get_Event_Key');
704: wsh_debug_sv.log (l_module_name, 'Event Name ' , p_event_name);
705: wsh_debug_sv.log (l_module_name, 'Organization Id ' , p_organization_id);
706: wsh_debug_sv.log (l_module_name, 'Delivery Name ' , p_delivery_name);
707: wsh_debug_sv.log (l_module_name, 'Event Code ' , l_event_code);
708: END IF;
709:
710: x_return_status := wsh_util_core.g_ret_sts_success;
711: l_event_code := UPPER(SUBSTRB (p_event_name, INSTRB(p_event_name, '.', -1) + 1));
730: x_return_status => x_return_status,
731: p_delivery_id => l_delivery_id
732: );
733: IF l_debug_on THEN
734: wsh_debug_sv.log (l_module_name,'Get_Warehouse_Type l_wh_type,x_return_status',l_wh_type||','||x_return_status );
735: END IF;
736: ELSE
737: raise wsh_invalid_delivery_name;
738: END IF;
742: select wsh_transaction_s.nextval into l_temp from dual;
743: l_wh_type := WSH_EXTERNAL_INTERFACE_SV.Get_Warehouse_Type( p_organization_id => p_organization_id,
744: x_return_status => x_return_status);
745: IF l_debug_on THEN
746: wsh_debug_sv.log (l_module_name,'Get_Warehouse_Type l_wh_type,x_return_status',l_wh_type||','||x_return_status );
747: END IF;
748: ELSE
749: raise wsh_invalid_batch_name;
750: END IF;
759: l_wh_type := WSH_EXTERNAL_INTERFACE_SV.Get_Warehouse_Type(p_organization_id => p_organization_id,
760: x_return_status => x_return_status,
761: p_delivery_id => l_delivery_id);
762: IF l_debug_on THEN
763: wsh_debug_sv.log (l_module_name,'Get_Warehouse_Type l_wh_type,x_return_status',l_wh_type||','||x_return_status );
764: END IF;
765: x_event_key := l_wh_type || to_char(l_temp);
766: ELSE
767: raise wsh_invalid_event_name;
767: raise wsh_invalid_event_name;
768: END IF;
769:
770: IF l_debug_on THEN
771: WSH_DEBUG_SV.log(l_module_name, 'Event Key'|| x_event_key);
772: wsh_debug_sv.pop(l_module_name);
773: END IF;
774: EXCEPTION
775:
768: END IF;
769:
770: IF l_debug_on THEN
771: WSH_DEBUG_SV.log(l_module_name, 'Event Key'|| x_event_key);
772: wsh_debug_sv.pop(l_module_name);
773: END IF;
774: EXCEPTION
775:
776: WHEN wsh_invalid_event_name THEN
775:
776: WHEN wsh_invalid_event_name THEN
777: x_return_status := wsh_util_core.g_ret_sts_error;
778: IF l_debug_on THEN
779: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_event_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
780: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_event_name');
781: END IF;
782: WHEN wsh_invalid_delivery_name THEN
783: x_return_status := wsh_util_core.g_ret_sts_error;
776: WHEN wsh_invalid_event_name THEN
777: x_return_status := wsh_util_core.g_ret_sts_error;
778: IF l_debug_on THEN
779: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_event_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
780: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_event_name');
781: END IF;
782: WHEN wsh_invalid_delivery_name THEN
783: x_return_status := wsh_util_core.g_ret_sts_error;
784: IF l_debug_on THEN
781: END IF;
782: WHEN wsh_invalid_delivery_name THEN
783: x_return_status := wsh_util_core.g_ret_sts_error;
784: IF l_debug_on THEN
785: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_delivery_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
786: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_delivery_name');
787: END IF;
788: WHEN wsh_invalid_batch_name THEN--Fulfillment Batch XML Project
789: x_return_status := wsh_util_core.g_ret_sts_error;
782: WHEN wsh_invalid_delivery_name THEN
783: x_return_status := wsh_util_core.g_ret_sts_error;
784: IF l_debug_on THEN
785: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_delivery_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
786: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_delivery_name');
787: END IF;
788: WHEN wsh_invalid_batch_name THEN--Fulfillment Batch XML Project
789: x_return_status := wsh_util_core.g_ret_sts_error;
790: IF l_debug_on THEN
787: END IF;
788: WHEN wsh_invalid_batch_name THEN--Fulfillment Batch XML Project
789: x_return_status := wsh_util_core.g_ret_sts_error;
790: IF l_debug_on THEN
791: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_batch_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
792: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_batch_name ');
793: END IF;
794: WHEN others THEN
795: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
788: WHEN wsh_invalid_batch_name THEN--Fulfillment Batch XML Project
789: x_return_status := wsh_util_core.g_ret_sts_error;
790: IF l_debug_on THEN
791: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_batch_name exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
792: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_batch_name ');
793: END IF;
794: WHEN others THEN
795: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
796: IF l_debug_on THEN
793: END IF;
794: WHEN others THEN
795: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
796: IF l_debug_on THEN
797: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
798: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
799: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
800: END IF;
801: END Get_Event_Key;
794: WHEN others THEN
795: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
796: IF l_debug_on THEN
797: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
798: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
799: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
800: END IF;
801: END Get_Event_Key;
802:
795: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
796: IF l_debug_on THEN
797: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
798: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
799: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
800: END IF;
801: END Get_Event_Key;
802:
803:
833: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
834: --
835: IF l_debug_on IS NULL
836: THEN
837: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
838: END IF;
839: --
840: IF l_debug_on THEN
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
837: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
838: END IF;
839: --
840: IF l_debug_on THEN
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
842: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
843: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
844: wsh_debug_sv.log(l_module_name, 'actid',actid);
845: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
838: END IF;
839: --
840: IF l_debug_on THEN
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
842: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
843: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
844: wsh_debug_sv.log(l_module_name, 'actid',actid);
845: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
846: END IF;
839: --
840: IF l_debug_on THEN
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
842: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
843: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
844: wsh_debug_sv.log(l_module_name, 'actid',actid);
845: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
846: END IF;
847:
840: IF l_debug_on THEN
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
842: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
843: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
844: wsh_debug_sv.log(l_module_name, 'actid',actid);
845: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
846: END IF;
847:
848:
841: wsh_debug_sv.push(l_module_name, 'Unlock_Delivery_WF');
842: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
843: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
844: wsh_debug_sv.log(l_module_name, 'actid',actid);
845: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
846: END IF;
847:
848:
849: IF ( funcmode = 'RUN' ) THEN
860: NULL,
861: NULL,
862: l_return_status);
863: IF l_debug_on THEN
864: wsh_debug_sv.log(l_module_name, 'l_return_status',l_return_status);
865: END IF;
866:
867: IF ( l_return_status not in (WSH_UTIL_CORE.G_RET_STS_SUCCESS,WSH_UTIL_CORE.G_RET_STS_WARNING) ) THEN
868: raise wsh_unlock_error;
868: raise wsh_unlock_error;
869: ELSE
870: resultout := 'COMPLETE:SUCCESS';
871: IF l_debug_on THEN
872: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
873: wsh_debug_sv.pop (l_module_name,'RETURN');
874: END IF;
875: RETURN;
876: END IF;
869: ELSE
870: resultout := 'COMPLETE:SUCCESS';
871: IF l_debug_on THEN
872: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
873: wsh_debug_sv.pop (l_module_name,'RETURN');
874: END IF;
875: RETURN;
876: END IF;
877:
877:
878: END IF;
879:
880: IF l_debug_on THEN
881: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
882: wsh_debug_sv.pop (l_module_name);
883: END IF;
884: EXCEPTION
885: WHEN wsh_del_not_found THEN
878: END IF;
879:
880: IF l_debug_on THEN
881: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
882: wsh_debug_sv.pop (l_module_name);
883: END IF;
884: EXCEPTION
885: WHEN wsh_del_not_found THEN
886: resultout := 'COMPLETE:FAILURE';
884: EXCEPTION
885: WHEN wsh_del_not_found THEN
886: resultout := 'COMPLETE:FAILURE';
887: IF l_debug_on THEN
888: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_not_found exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
889: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_not_found');
890: END IF;
891: raise;
892: WHEN wsh_unlock_error THEN
885: WHEN wsh_del_not_found THEN
886: resultout := 'COMPLETE:FAILURE';
887: IF l_debug_on THEN
888: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_not_found exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
889: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_not_found');
890: END IF;
891: raise;
892: WHEN wsh_unlock_error THEN
893: resultout := 'COMPLETE:FAILURE';
891: raise;
892: WHEN wsh_unlock_error THEN
893: resultout := 'COMPLETE:FAILURE';
894: IF l_debug_on THEN
895: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_unlock_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
896: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_unlock_error');
897: END IF;
898: raise;
899: WHEN OTHERS THEN
892: WHEN wsh_unlock_error THEN
893: resultout := 'COMPLETE:FAILURE';
894: IF l_debug_on THEN
895: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_unlock_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
896: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_unlock_error');
897: END IF;
898: raise;
899: WHEN OTHERS THEN
900: resultout := 'COMPLETE:FAILURE';
898: raise;
899: WHEN OTHERS THEN
900: resultout := 'COMPLETE:FAILURE';
901: IF l_debug_on THEN
902: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
903: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
904: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
905: END IF;
906: raise;
899: WHEN OTHERS THEN
900: resultout := 'COMPLETE:FAILURE';
901: IF l_debug_on THEN
902: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
903: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
904: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
905: END IF;
906: raise;
907: END Unlock_Delivery_WF;
900: resultout := 'COMPLETE:FAILURE';
901: IF l_debug_on THEN
902: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
903: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
904: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
905: END IF;
906: raise;
907: END Unlock_Delivery_WF;
908:
921: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
922: --
923: IF l_debug_on IS NULL
924: THEN
925: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
926: END IF;
927: --
928: IF l_debug_on THEN
929: wsh_debug_sv.push(l_module_name);
925: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
926: END IF;
927: --
928: IF l_debug_on THEN
929: wsh_debug_sv.push(l_module_name);
930: wsh_debug_sv.log(l_module_name, 'p_transaction_id',p_transaction_id);
931: END IF;
932:
933: UPDATE wsh_transactions_history
926: END IF;
927: --
928: IF l_debug_on THEN
929: wsh_debug_sv.push(l_module_name);
930: wsh_debug_sv.log(l_module_name, 'p_transaction_id',p_transaction_id);
931: END IF;
932:
933: UPDATE wsh_transactions_history
934: SET transaction_status = 'ER'
934: SET transaction_status = 'ER'
935: WHERE transaction_id = p_transaction_id;
936:
937: IF l_debug_on THEN
938: wsh_debug_sv.log(l_module_name, 'ROWCOUNT', SQL%ROWCOUNT);
939: END IF;
940:
941: COMMIT;
942:
940:
941: COMMIT;
942:
943: IF l_debug_on THEN
944: wsh_debug_sv.pop (l_module_name);
945: END IF;
946:
947: EXCEPTION
948: WHEN OTHERS THEN
946:
947: EXCEPTION
948: WHEN OTHERS THEN
949: IF l_debug_on THEN
950: WSH_DEBUG_SV.logmsg(l_module_name,
951: 'Unexpected error has occured. Oracle error message is '
952: || SQLERRM, WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
953: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
954: END IF;
948: WHEN OTHERS THEN
949: IF l_debug_on THEN
950: WSH_DEBUG_SV.logmsg(l_module_name,
951: 'Unexpected error has occured. Oracle error message is '
952: || SQLERRM, WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
953: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
954: END IF;
955: raise;
956: END update_atnms;
949: IF l_debug_on THEN
950: WSH_DEBUG_SV.logmsg(l_module_name,
951: 'Unexpected error has occured. Oracle error message is '
952: || SQLERRM, WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
953: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
954: END IF;
955: raise;
956: END update_atnms;
957:
1051: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1052: --
1053: IF l_debug_on IS NULL
1054: THEN
1055: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1056: END IF;
1057: --
1058: IF l_debug_on THEN
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1055: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1056: END IF;
1057: --
1058: IF l_debug_on THEN
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1060: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1061: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1062: wsh_debug_sv.log(l_module_name, 'actid',actid);
1063: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1056: END IF;
1057: --
1058: IF l_debug_on THEN
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1060: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1061: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1062: wsh_debug_sv.log(l_module_name, 'actid',actid);
1063: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1064: END IF;
1057: --
1058: IF l_debug_on THEN
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1060: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1061: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1062: wsh_debug_sv.log(l_module_name, 'actid',actid);
1063: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1064: END IF;
1065:
1058: IF l_debug_on THEN
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1060: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1061: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1062: wsh_debug_sv.log(l_module_name, 'actid',actid);
1063: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1064: END IF;
1065:
1066:
1059: wsh_debug_sv.push(l_module_name, 'Process_Inbound_Delivery_WF');
1060: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1061: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1062: wsh_debug_sv.log(l_module_name, 'actid',actid);
1063: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1064: END IF;
1065:
1066:
1067: IF ( funcmode = 'RUN' ) THEN
1079: l_txns_history_rec,
1080: l_return_status
1081: );
1082: IF l_debug_on THEN
1083: wsh_debug_sv.log(l_module_name, 'Get_Txns_History l_return_status ',l_return_status);
1084: END IF;
1085: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1086: raise wsh_process_inbound;
1087: END IF;
1094: FETCH c_get_entity_number INTO l_enity_number, l_sr_trx_id;
1095: CLOSE c_get_entity_number;
1096:
1097: IF l_debug_on THEN
1098: wsh_debug_sv.log(l_module_name, 'l_enity_number ',l_enity_number);
1099: wsh_debug_sv.log(l_module_name, 'l_sr_trx_id ',l_sr_trx_id);
1100: END IF;
1101:
1102: IF l_txns_history_rec.transaction_status IN ('IP','ER') THEN --{
1095: CLOSE c_get_entity_number;
1096:
1097: IF l_debug_on THEN
1098: wsh_debug_sv.log(l_module_name, 'l_enity_number ',l_enity_number);
1099: wsh_debug_sv.log(l_module_name, 'l_sr_trx_id ',l_sr_trx_id);
1100: END IF;
1101:
1102: IF l_txns_history_rec.transaction_status IN ('IP','ER') THEN --{
1103:
1109: l_cancellation_in_progress,
1110: x_return_status => l_return_status
1111: );
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log(l_module_name, 'l_return_status ',
1114: l_return_status);
1115: wsh_debug_sv.log(l_module_name, 'l_cancellation_in_progress',
1116: l_cancellation_in_progress);
1117: END IF;
1111: );
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log(l_module_name, 'l_return_status ',
1114: l_return_status);
1115: wsh_debug_sv.log(l_module_name, 'l_cancellation_in_progress',
1116: l_cancellation_in_progress);
1117: END IF;
1118:
1119: IF l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS THEN
1132:
1133: WSH_PROCESS_INTERFACED_PKG.Process_Inbound(l_txns_history_rec,
1134: l_return_status);
1135: IF l_debug_on THEN
1136: wsh_debug_sv.log(l_module_name, 'Process_Inbound l_return_status ',l_return_status);
1137: END IF;
1138:
1139: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1140: --Fulfillment Batch XML Project
1169: END IF; --}
1170:
1171: resultout := 'COMPLETE:SUCCESS';
1172: IF l_debug_on THEN
1173: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1174: wsh_debug_sv.pop (l_module_name,'RETURN');
1175: END IF;
1176: RETURN;
1177: END IF;
1170:
1171: resultout := 'COMPLETE:SUCCESS';
1172: IF l_debug_on THEN
1173: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1174: wsh_debug_sv.pop (l_module_name,'RETURN');
1175: END IF;
1176: RETURN;
1177: END IF;
1178:
1178:
1179: END IF;
1180:
1181: IF l_debug_on THEN
1182: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1183: wsh_debug_sv.pop (l_module_name);
1184: END IF;
1185: EXCEPTION
1186: --Fulfillment Batch XML Project
1179: END IF;
1180:
1181: IF l_debug_on THEN
1182: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1183: wsh_debug_sv.pop (l_module_name);
1184: END IF;
1185: EXCEPTION
1186: --Fulfillment Batch XML Project
1187: WHEN wsh_batch_process_inbound THEN
1186: --Fulfillment Batch XML Project
1187: WHEN wsh_batch_process_inbound THEN
1188: resultout := 'COMPLETE:FAILURE';
1189: IF l_debug_on THEN
1190: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_batch_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1191: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_batch_process_inbound');
1192: END IF;
1193: WHEN wsh_process_inbound THEN
1194: resultout := 'COMPLETE:FAILURE';
1187: WHEN wsh_batch_process_inbound THEN
1188: resultout := 'COMPLETE:FAILURE';
1189: IF l_debug_on THEN
1190: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_batch_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1191: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_batch_process_inbound');
1192: END IF;
1193: WHEN wsh_process_inbound THEN
1194: resultout := 'COMPLETE:FAILURE';
1195: IF l_debug_on THEN
1192: END IF;
1193: WHEN wsh_process_inbound THEN
1194: resultout := 'COMPLETE:FAILURE';
1195: IF l_debug_on THEN
1196: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1197: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_process_inbound');
1198: END IF;
1199: raise;
1200: WHEN fnd_api.g_exc_error THEN
1193: WHEN wsh_process_inbound THEN
1194: resultout := 'COMPLETE:FAILURE';
1195: IF l_debug_on THEN
1196: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1197: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_process_inbound');
1198: END IF;
1199: raise;
1200: WHEN fnd_api.g_exc_error THEN
1201: resultout := 'COMPLETE:FAILURE';
1199: raise;
1200: WHEN fnd_api.g_exc_error THEN
1201: resultout := 'COMPLETE:FAILURE';
1202: IF l_debug_on THEN
1203: WSH_DEBUG_SV.logmsg(l_module_name,'fnd_api.g_exc_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1204: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:fnd_api.g_exc_error');
1205: END IF;
1206: raise;
1207: WHEN OTHERS THEN
1200: WHEN fnd_api.g_exc_error THEN
1201: resultout := 'COMPLETE:FAILURE';
1202: IF l_debug_on THEN
1203: WSH_DEBUG_SV.logmsg(l_module_name,'fnd_api.g_exc_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1204: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:fnd_api.g_exc_error');
1205: END IF;
1206: raise;
1207: WHEN OTHERS THEN
1208: resultout := 'COMPLETE:FAILURE';
1206: raise;
1207: WHEN OTHERS THEN
1208: resultout := 'COMPLETE:FAILURE';
1209: IF l_debug_on THEN
1210: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1211: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1212: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1213: END IF;
1214: raise;
1207: WHEN OTHERS THEN
1208: resultout := 'COMPLETE:FAILURE';
1209: IF l_debug_on THEN
1210: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1211: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1212: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1213: END IF;
1214: raise;
1215: END Process_Inbound_Delivery_WF;
1208: resultout := 'COMPLETE:FAILURE';
1209: IF l_debug_on THEN
1210: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1211: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1212: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1213: END IF;
1214: raise;
1215: END Process_Inbound_Delivery_WF;
1216:
1252: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1253: --
1254: IF l_debug_on IS NULL
1255: THEN
1256: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1257: END IF;
1258: --
1259: IF l_debug_on THEN
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1256: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1257: END IF;
1258: --
1259: IF l_debug_on THEN
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1261: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1262: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1263: wsh_debug_sv.log(l_module_name, 'actid',actid);
1264: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1257: END IF;
1258: --
1259: IF l_debug_on THEN
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1261: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1262: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1263: wsh_debug_sv.log(l_module_name, 'actid',actid);
1264: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1265: END IF;
1258: --
1259: IF l_debug_on THEN
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1261: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1262: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1263: wsh_debug_sv.log(l_module_name, 'actid',actid);
1264: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1265: END IF;
1266:
1259: IF l_debug_on THEN
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1261: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1262: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1263: wsh_debug_sv.log(l_module_name, 'actid',actid);
1264: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1265: END IF;
1266:
1267:
1260: wsh_debug_sv.push(l_module_name, 'Process_Inbound_SR_WF');
1261: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1262: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1263: wsh_debug_sv.log(l_module_name, 'actid',actid);
1264: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1265: END IF;
1266:
1267:
1268: IF ( funcmode = 'RUN' ) THEN
1276: l_txns_history_rec,
1277: l_return_status
1278: );
1279: IF l_debug_on THEN
1280: wsh_debug_sv.log(l_module_name, 'Get_Txns_History l_return_status ',l_return_status);
1281: END IF;
1282: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1283: raise wsh_process_inbound;
1284: END IF;
1285:
1286: WSH_PROCESS_INTERFACED_PKG.Process_Inbound(l_txns_history_rec,
1287: l_return_status);
1288: IF l_debug_on THEN
1289: wsh_debug_sv.log(l_module_name, 'Process_Inbound l_return_status ',l_return_status);
1290: END IF;
1291:
1292: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1293: raise wsh_process_inbound;
1293: raise wsh_process_inbound;
1294: ELSE
1295: resultout := 'COMPLETE:SUCCESS';
1296: IF l_debug_on THEN
1297: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1298: wsh_debug_sv.pop (l_module_name,'RETURN');
1299: END IF;
1300: RETURN;
1301: END IF;
1294: ELSE
1295: resultout := 'COMPLETE:SUCCESS';
1296: IF l_debug_on THEN
1297: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1298: wsh_debug_sv.pop (l_module_name,'RETURN');
1299: END IF;
1300: RETURN;
1301: END IF;
1302:
1302:
1303: END IF;
1304:
1305: IF l_debug_on THEN
1306: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1307: wsh_debug_sv.pop (l_module_name);
1308: END IF;
1309: EXCEPTION
1310: WHEN wsh_process_inbound THEN
1303: END IF;
1304:
1305: IF l_debug_on THEN
1306: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1307: wsh_debug_sv.pop (l_module_name);
1308: END IF;
1309: EXCEPTION
1310: WHEN wsh_process_inbound THEN
1311: resultout := 'COMPLETE:ERROR';
1309: EXCEPTION
1310: WHEN wsh_process_inbound THEN
1311: resultout := 'COMPLETE:ERROR';
1312: IF l_debug_on THEN
1313: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1314: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_process_inbound');
1315: END IF;
1316: -- raise;
1317: WHEN fnd_api.g_exc_error THEN
1310: WHEN wsh_process_inbound THEN
1311: resultout := 'COMPLETE:ERROR';
1312: IF l_debug_on THEN
1313: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_process_inbound exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1314: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_process_inbound');
1315: END IF;
1316: -- raise;
1317: WHEN fnd_api.g_exc_error THEN
1318: resultout := 'COMPLETE:ERROR';
1316: -- raise;
1317: WHEN fnd_api.g_exc_error THEN
1318: resultout := 'COMPLETE:ERROR';
1319: IF l_debug_on THEN
1320: WSH_DEBUG_SV.logmsg(l_module_name,'fnd_api.g_exc_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1321: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:fnd_api.g_exc_error');
1322: END IF;
1323: -- raise;
1324: WHEN OTHERS THEN
1317: WHEN fnd_api.g_exc_error THEN
1318: resultout := 'COMPLETE:ERROR';
1319: IF l_debug_on THEN
1320: WSH_DEBUG_SV.logmsg(l_module_name,'fnd_api.g_exc_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1321: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:fnd_api.g_exc_error');
1322: END IF;
1323: -- raise;
1324: WHEN OTHERS THEN
1325: resultout := 'COMPLETE:ERROR';
1323: -- raise;
1324: WHEN OTHERS THEN
1325: resultout := 'COMPLETE:ERROR';
1326: IF l_debug_on THEN
1327: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1328: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1329: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1330: END IF;
1331: -- raise;
1324: WHEN OTHERS THEN
1325: resultout := 'COMPLETE:ERROR';
1326: IF l_debug_on THEN
1327: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1328: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1329: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1330: END IF;
1331: -- raise;
1332: END Process_Inbound_SR_WF;
1325: resultout := 'COMPLETE:ERROR';
1326: IF l_debug_on THEN
1327: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1328: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1329: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1330: END IF;
1331: -- raise;
1332: END Process_Inbound_SR_WF;
1333:
1351: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1352: --
1353: IF l_debug_on IS NULL
1354: THEN
1355: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1356: END IF;
1357: --
1358: IF l_debug_on THEN
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1355: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1356: END IF;
1357: --
1358: IF l_debug_on THEN
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1360: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1361: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1362: wsh_debug_sv.log(l_module_name, 'actid',actid);
1363: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1356: END IF;
1357: --
1358: IF l_debug_on THEN
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1360: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1361: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1362: wsh_debug_sv.log(l_module_name, 'actid',actid);
1363: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1364: END IF;
1357: --
1358: IF l_debug_on THEN
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1360: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1361: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1362: wsh_debug_sv.log(l_module_name, 'actid',actid);
1363: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1364: END IF;
1365:
1358: IF l_debug_on THEN
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1360: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1361: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1362: wsh_debug_sv.log(l_module_name, 'actid',actid);
1363: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1364: END IF;
1365:
1366:
1359: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1360: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1361: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1362: wsh_debug_sv.log(l_module_name, 'actid',actid);
1363: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1364: END IF;
1365:
1366:
1367: IF ( funcmode = 'RUN' ) THEN
1370: 'ER',
1371: l_return_status
1372: );
1373: IF l_debug_on THEN
1374: wsh_debug_sv.log(l_module_name, 'Update_Txn_History l_return_status ',l_return_status);
1375: END IF;
1376:
1377: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1378: raise wsh_update_history;
1378: raise wsh_update_history;
1379: ELSE
1380: resultout := 'COMPLETE:SUCCESS';
1381: IF l_debug_on THEN
1382: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1383: wsh_debug_sv.pop(l_module_name, 'RETURN');
1384: END IF;
1385: RETURN;
1386: END IF;
1379: ELSE
1380: resultout := 'COMPLETE:SUCCESS';
1381: IF l_debug_on THEN
1382: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1383: wsh_debug_sv.pop(l_module_name, 'RETURN');
1384: END IF;
1385: RETURN;
1386: END IF;
1387:
1387:
1388: END IF;
1389:
1390: IF l_debug_on THEN
1391: wsh_debug_sv.pop (l_module_name);
1392: END IF;
1393: EXCEPTION
1394: WHEN wsh_update_history THEN
1395: resultout := 'COMPLETE:FAILURE';
1393: EXCEPTION
1394: WHEN wsh_update_history THEN
1395: resultout := 'COMPLETE:FAILURE';
1396: IF l_debug_on THEN
1397: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1398: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1399: END IF;
1400: raise;
1401: WHEN OTHERS THEN
1394: WHEN wsh_update_history THEN
1395: resultout := 'COMPLETE:FAILURE';
1396: IF l_debug_on THEN
1397: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1398: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1399: END IF;
1400: raise;
1401: WHEN OTHERS THEN
1402: resultout := 'COMPLETE:FAILURE';
1400: raise;
1401: WHEN OTHERS THEN
1402: resultout := 'COMPLETE:FAILURE';
1403: IF l_debug_on THEN
1404: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1405: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1406: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1407: END IF;
1408: raise;
1401: WHEN OTHERS THEN
1402: resultout := 'COMPLETE:FAILURE';
1403: IF l_debug_on THEN
1404: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1405: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1406: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1407: END IF;
1408: raise;
1409: END Update_Txn_Hist_Err_WF;
1402: resultout := 'COMPLETE:FAILURE';
1403: IF l_debug_on THEN
1404: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1405: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1406: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1407: END IF;
1408: raise;
1409: END Update_Txn_Hist_Err_WF;
1410:
1428: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1429: --
1430: IF l_debug_on IS NULL
1431: THEN
1432: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1433: END IF;
1434: --
1435: IF l_debug_on THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1432: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1433: END IF;
1434: --
1435: IF l_debug_on THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1437: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1438: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1439: wsh_debug_sv.log(l_module_name, 'actid',actid);
1440: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1433: END IF;
1434: --
1435: IF l_debug_on THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1437: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1438: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1439: wsh_debug_sv.log(l_module_name, 'actid',actid);
1440: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1441: END IF;
1434: --
1435: IF l_debug_on THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1437: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1438: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1439: wsh_debug_sv.log(l_module_name, 'actid',actid);
1440: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1441: END IF;
1442:
1435: IF l_debug_on THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1437: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1438: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1439: wsh_debug_sv.log(l_module_name, 'actid',actid);
1440: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1441: END IF;
1442:
1443: IF ( funcmode = 'RUN' ) THEN
1436: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Err_WF');
1437: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1438: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1439: wsh_debug_sv.log(l_module_name, 'actid',actid);
1440: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1441: END IF;
1442:
1443: IF ( funcmode = 'RUN' ) THEN
1444: Update_Txn_History ( Item_type,
1446: 'ST',
1447: l_return_status
1448: );
1449: IF l_debug_on THEN
1450: wsh_debug_sv.log(l_module_name, 'Update_Txn_History l_return_status ',l_return_status);
1451: END IF;
1452: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1453: raise wsh_update_history;
1454: ELSE
1453: raise wsh_update_history;
1454: ELSE
1455: resultout := 'COMPLETE:SUCCESS';
1456: IF l_debug_on THEN
1457: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1458: wsh_debug_sv.pop(l_module_name, 'RETURN');
1459: END IF;
1460: RETURN;
1461: END IF;
1454: ELSE
1455: resultout := 'COMPLETE:SUCCESS';
1456: IF l_debug_on THEN
1457: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1458: wsh_debug_sv.pop(l_module_name, 'RETURN');
1459: END IF;
1460: RETURN;
1461: END IF;
1462: END IF;
1460: RETURN;
1461: END IF;
1462: END IF;
1463: IF l_debug_on THEN
1464: wsh_debug_sv.pop (l_module_name);
1465: END IF;
1466: EXCEPTION
1467: WHEN wsh_update_history THEN
1468: resultout := 'COMPLETE:FAILURE';
1466: EXCEPTION
1467: WHEN wsh_update_history THEN
1468: resultout := 'COMPLETE:FAILURE';
1469: IF l_debug_on THEN
1470: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1471: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1472: END IF;
1473: raise;
1474: WHEN OTHERS THEN
1467: WHEN wsh_update_history THEN
1468: resultout := 'COMPLETE:FAILURE';
1469: IF l_debug_on THEN
1470: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1471: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1472: END IF;
1473: raise;
1474: WHEN OTHERS THEN
1475: resultout := 'COMPLETE:FAILURE';
1473: raise;
1474: WHEN OTHERS THEN
1475: resultout := 'COMPLETE:FAILURE';
1476: IF l_debug_on THEN
1477: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1478: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1479: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1480: END IF;
1481: raise;
1474: WHEN OTHERS THEN
1475: resultout := 'COMPLETE:FAILURE';
1476: IF l_debug_on THEN
1477: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1478: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1479: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1480: END IF;
1481: raise;
1482: END Update_Txn_Hist_Success_WF;
1475: resultout := 'COMPLETE:FAILURE';
1476: IF l_debug_on THEN
1477: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1478: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1479: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1480: END IF;
1481: raise;
1482: END Update_Txn_Hist_Success_WF;
1483:
1514: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1515: --
1516: IF l_debug_on IS NULL
1517: THEN
1518: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1519: END IF;
1520: --
1521: IF l_debug_on THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1518: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1519: END IF;
1520: --
1521: IF l_debug_on THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1523: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1524: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1525: wsh_debug_sv.log(l_module_name, 'actid',actid);
1526: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1519: END IF;
1520: --
1521: IF l_debug_on THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1523: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1524: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1525: wsh_debug_sv.log(l_module_name, 'actid',actid);
1526: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1527: END IF;
1520: --
1521: IF l_debug_on THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1523: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1524: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1525: wsh_debug_sv.log(l_module_name, 'actid',actid);
1526: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1527: END IF;
1528:
1521: IF l_debug_on THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1523: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1524: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1525: wsh_debug_sv.log(l_module_name, 'actid',actid);
1526: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1527: END IF;
1528:
1529: IF ( funcmode = 'RUN' ) THEN
1522: wsh_debug_sv.push(l_module_name, 'Update_Txn_Hist_Closed_WF');
1523: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
1524: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
1525: wsh_debug_sv.log(l_module_name, 'actid',actid);
1526: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
1527: END IF;
1528:
1529: IF ( funcmode = 'RUN' ) THEN
1530: Update_Txn_History ( Item_type,
1532: 'SC',
1533: l_return_status
1534: );
1535: IF l_debug_on THEN
1536: wsh_debug_sv.log(l_module_name, 'Update_Txn_History l_return_status ',l_return_status);
1537: END IF;
1538: IF ( l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1539: raise wsh_update_history;
1540: ELSE
1539: raise wsh_update_history;
1540: ELSE
1541: resultout := 'COMPLETE:SUCCESS';
1542: IF l_debug_on THEN
1543: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1544: wsh_debug_sv.pop(l_module_name, 'RETURN');
1545: END IF;
1546: RETURN;
1547: END IF;
1540: ELSE
1541: resultout := 'COMPLETE:SUCCESS';
1542: IF l_debug_on THEN
1543: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
1544: wsh_debug_sv.pop(l_module_name, 'RETURN');
1545: END IF;
1546: RETURN;
1547: END IF;
1548: END IF;
1546: RETURN;
1547: END IF;
1548: END IF;
1549: IF l_debug_on THEN
1550: wsh_debug_sv.pop (l_module_name);
1551: END IF;
1552: EXCEPTION
1553: WHEN wsh_update_history THEN
1554: resultout := 'COMPLETE:FAILURE';
1552: EXCEPTION
1553: WHEN wsh_update_history THEN
1554: resultout := 'COMPLETE:FAILURE';
1555: IF l_debug_on THEN
1556: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1557: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1558: END IF;
1559: raise;
1560: WHEN OTHERS THEN
1553: WHEN wsh_update_history THEN
1554: resultout := 'COMPLETE:FAILURE';
1555: IF l_debug_on THEN
1556: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1557: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1558: END IF;
1559: raise;
1560: WHEN OTHERS THEN
1561: resultout := 'COMPLETE:FAILURE';
1559: raise;
1560: WHEN OTHERS THEN
1561: resultout := 'COMPLETE:FAILURE';
1562: IF l_debug_on THEN
1563: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1564: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1565: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1566: END IF;
1567: raise;
1560: WHEN OTHERS THEN
1561: resultout := 'COMPLETE:FAILURE';
1562: IF l_debug_on THEN
1563: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1564: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1565: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1566: END IF;
1567: raise;
1568: END Update_Txn_Hist_Closed_WF;
1561: resultout := 'COMPLETE:FAILURE';
1562: IF l_debug_on THEN
1563: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1564: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1565: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1566: END IF;
1567: raise;
1568: END Update_Txn_Hist_Closed_WF;
1569:
1594: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1595: --
1596: IF l_debug_on IS NULL
1597: THEN
1598: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1599: END IF;
1600: --
1601: IF l_debug_on THEN
1602: wsh_debug_sv.push(l_module_name);
1598: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1599: END IF;
1600: --
1601: IF l_debug_on THEN
1602: wsh_debug_sv.push(l_module_name);
1603: wsh_debug_sv.log(l_module_name, 'p_item_type',p_item_type);
1604: wsh_debug_sv.log(l_module_name, 'p_item_key',p_item_key);
1605: wsh_debug_sv.log(l_module_name, 'p_transaction_status',p_transaction_status);
1606: END IF;
1599: END IF;
1600: --
1601: IF l_debug_on THEN
1602: wsh_debug_sv.push(l_module_name);
1603: wsh_debug_sv.log(l_module_name, 'p_item_type',p_item_type);
1604: wsh_debug_sv.log(l_module_name, 'p_item_key',p_item_key);
1605: wsh_debug_sv.log(l_module_name, 'p_transaction_status',p_transaction_status);
1606: END IF;
1607:
1600: --
1601: IF l_debug_on THEN
1602: wsh_debug_sv.push(l_module_name);
1603: wsh_debug_sv.log(l_module_name, 'p_item_type',p_item_type);
1604: wsh_debug_sv.log(l_module_name, 'p_item_key',p_item_key);
1605: wsh_debug_sv.log(l_module_name, 'p_transaction_status',p_transaction_status);
1606: END IF;
1607:
1608: IF ( p_item_type in ('WSHSUPI','WSHBATO')) THEN --Fulfillment Batch XML Project (Added WSHBATO)
1601: IF l_debug_on THEN
1602: wsh_debug_sv.push(l_module_name);
1603: wsh_debug_sv.log(l_module_name, 'p_item_type',p_item_type);
1604: wsh_debug_sv.log(l_module_name, 'p_item_key',p_item_key);
1605: wsh_debug_sv.log(l_module_name, 'p_transaction_status',p_transaction_status);
1606: END IF;
1607:
1608: IF ( p_item_type in ('WSHSUPI','WSHBATO')) THEN --Fulfillment Batch XML Project (Added WSHBATO)
1609: l_document_type := 'SR';
1626: l_document_type,
1627: l_txns_history_rec,
1628: x_return_status );
1629: IF l_debug_on THEN
1630: wsh_debug_sv.log(l_module_name, 'Get_Txns_History x_return_status',x_return_status);
1631: END IF;
1632:
1633: l_txns_history_rec.transaction_status := p_transaction_status;
1634: IF ( x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1638: WSH_TRANSACTIONS_HISTORY_PKG.Create_Update_Txns_History ( l_txns_history_rec,
1639: l_txn_id,
1640: x_return_status );
1641: IF l_debug_on THEN
1642: wsh_debug_sv.log(l_module_name, 'Create_Update_Txns_History x_return_status',x_return_status);
1643: END IF;
1644:
1645: IF ( x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS ) THEN
1646: raise wsh_update_history;
1654: COMMIT;
1655: END IF;
1656:
1657: IF l_debug_on THEN
1658: wsh_debug_sv.pop (l_module_name);
1659: END IF;
1660: EXCEPTION
1661: WHEN wsh_update_history THEN
1662: x_return_status := wsh_util_core.g_ret_sts_error;
1660: EXCEPTION
1661: WHEN wsh_update_history THEN
1662: x_return_status := wsh_util_core.g_ret_sts_error;
1663: IF l_debug_on THEN
1664: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1665: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1666: END IF;
1667: WHEN OTHERS THEN
1668: x_return_status := wsh_util_core.g_ret_sts_error;
1661: WHEN wsh_update_history THEN
1662: x_return_status := wsh_util_core.g_ret_sts_error;
1663: IF l_debug_on THEN
1664: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_history exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1665: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_history');
1666: END IF;
1667: WHEN OTHERS THEN
1668: x_return_status := wsh_util_core.g_ret_sts_error;
1669: IF l_debug_on THEN
1666: END IF;
1667: WHEN OTHERS THEN
1668: x_return_status := wsh_util_core.g_ret_sts_error;
1669: IF l_debug_on THEN
1670: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1671: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1672: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1673: END IF;
1674: END Update_Txn_History;
1667: WHEN OTHERS THEN
1668: x_return_status := wsh_util_core.g_ret_sts_error;
1669: IF l_debug_on THEN
1670: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1671: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1672: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1673: END IF;
1674: END Update_Txn_History;
1675:
1668: x_return_status := wsh_util_core.g_ret_sts_error;
1669: IF l_debug_on THEN
1670: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1671: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1672: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1673: END IF;
1674: END Update_Txn_History;
1675:
1676: PROCEDURE WSHSUPI_SELECTOR( Item_type IN VARCHAR2,
1695: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1696: --
1697: IF l_debug_on IS NULL
1698: THEN
1699: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1700: END IF;
1701: --
1702: wsh_debug_sv.start_debug('wf_context');
1703: IF l_debug_on THEN
1698: THEN
1699: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1700: END IF;
1701: --
1702: wsh_debug_sv.start_debug('wf_context');
1703: IF l_debug_on THEN
1704: wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
1705: wsh_debug_sv.log (l_module_name, 'Item Type', Item_type);
1706: wsh_debug_sv.log (l_module_name, 'Item_Key', Item_key);
1700: END IF;
1701: --
1702: wsh_debug_sv.start_debug('wf_context');
1703: IF l_debug_on THEN
1704: wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
1705: wsh_debug_sv.log (l_module_name, 'Item Type', Item_type);
1706: wsh_debug_sv.log (l_module_name, 'Item_Key', Item_key);
1707: wsh_debug_sv.log (l_module_name, 'Funcmode', Funcmode);
1708: END IF;
1701: --
1702: wsh_debug_sv.start_debug('wf_context');
1703: IF l_debug_on THEN
1704: wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
1705: wsh_debug_sv.log (l_module_name, 'Item Type', Item_type);
1706: wsh_debug_sv.log (l_module_name, 'Item_Key', Item_key);
1707: wsh_debug_sv.log (l_module_name, 'Funcmode', Funcmode);
1708: END IF;
1709:
1702: wsh_debug_sv.start_debug('wf_context');
1703: IF l_debug_on THEN
1704: wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
1705: wsh_debug_sv.log (l_module_name, 'Item Type', Item_type);
1706: wsh_debug_sv.log (l_module_name, 'Item_Key', Item_key);
1707: wsh_debug_sv.log (l_module_name, 'Funcmode', Funcmode);
1708: END IF;
1709:
1710: IF(funcmode = 'RUN') THEN
1703: IF l_debug_on THEN
1704: wsh_debug_sv.push(l_module_name, 'WSHSUPI_SELECTOR');
1705: wsh_debug_sv.log (l_module_name, 'Item Type', Item_type);
1706: wsh_debug_sv.log (l_module_name, 'Item_Key', Item_key);
1707: wsh_debug_sv.log (l_module_name, 'Funcmode', Funcmode);
1708: END IF;
1709:
1710: IF(funcmode = 'RUN') THEN
1711: Resultout := 'COMPLETE';
1739: 'USER_ID'
1740: );
1741:
1742: IF l_debug_on THEN
1743: wsh_debug_sv.log (l_module_name, 'l_user_id', l_user_id);
1744: wsh_debug_sv.log (l_module_name, 'FND_GLOBAL.USER_ID', FND_GLOBAL.USER_ID);
1745: END IF;
1746:
1747: IF l_user_id <> FND_GLOBAL.USER_ID THEN
1740: );
1741:
1742: IF l_debug_on THEN
1743: wsh_debug_sv.log (l_module_name, 'l_user_id', l_user_id);
1744: wsh_debug_sv.log (l_module_name, 'FND_GLOBAL.USER_ID', FND_GLOBAL.USER_ID);
1745: END IF;
1746:
1747: IF l_user_id <> FND_GLOBAL.USER_ID THEN
1748: Resultout := 'FALSE';
1751: END IF;
1752: END IF; -- if funcmode = run
1753:
1754: IF l_debug_on THEN
1755: wsh_debug_sv.log (l_module_name, 'Resultout', Resultout);
1756: wsh_debug_sv.pop(l_module_name);
1757: END IF;
1758: wsh_debug_sv.stop_debug;
1759: EXCEPTION
1752: END IF; -- if funcmode = run
1753:
1754: IF l_debug_on THEN
1755: wsh_debug_sv.log (l_module_name, 'Resultout', Resultout);
1756: wsh_debug_sv.pop(l_module_name);
1757: END IF;
1758: wsh_debug_sv.stop_debug;
1759: EXCEPTION
1760: WHEN OTHERS THEN
1754: IF l_debug_on THEN
1755: wsh_debug_sv.log (l_module_name, 'Resultout', Resultout);
1756: wsh_debug_sv.pop(l_module_name);
1757: END IF;
1758: wsh_debug_sv.stop_debug;
1759: EXCEPTION
1760: WHEN OTHERS THEN
1761: resultout := 'COMPLETE:FAILURE';
1762: IF l_debug_on THEN
1759: EXCEPTION
1760: WHEN OTHERS THEN
1761: resultout := 'COMPLETE:FAILURE';
1762: IF l_debug_on THEN
1763: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1764: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1765: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1766: END IF;
1767: wsh_debug_sv.stop_debug;
1760: WHEN OTHERS THEN
1761: resultout := 'COMPLETE:FAILURE';
1762: IF l_debug_on THEN
1763: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1764: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1765: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1766: END IF;
1767: wsh_debug_sv.stop_debug;
1768: RAISE;
1761: resultout := 'COMPLETE:FAILURE';
1762: IF l_debug_on THEN
1763: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1764: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1765: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1766: END IF;
1767: wsh_debug_sv.stop_debug;
1768: RAISE;
1769: END WSHSUPI_SELECTOR;
1763: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1764: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1765: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1766: END IF;
1767: wsh_debug_sv.stop_debug;
1768: RAISE;
1769: END WSHSUPI_SELECTOR;
1770:
1771: --k proj
1799: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1800: --
1801: IF l_debug_on IS NULL
1802: THEN
1803: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1804: END IF;
1805: --
1806: IF l_debug_on THEN
1807: wsh_debug_sv.push(l_module_name);
1803: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1804: END IF;
1805: --
1806: IF l_debug_on THEN
1807: wsh_debug_sv.push(l_module_name);
1808: wsh_debug_sv.log(l_module_name, 'p_event_key',p_event_key);
1809: END IF;
1810:
1811: IF p_event_key LIKE 'CMS%' THEN
1804: END IF;
1805: --
1806: IF l_debug_on THEN
1807: wsh_debug_sv.push(l_module_name);
1808: wsh_debug_sv.log(l_module_name, 'p_event_key',p_event_key);
1809: END IF;
1810:
1811: IF p_event_key LIKE 'CMS%' THEN
1812: l_cms_flow := TRUE;
1812: l_cms_flow := TRUE;
1813: END IF;
1814:
1815: IF l_debug_on THEN
1816: wsh_debug_sv.log(l_module_name, 'l_cms_flow',l_cms_flow);
1817: wsh_debug_sv.pop(l_module_name);
1818: END IF;
1819:
1820: RETURN l_cms_flow;
1813: END IF;
1814:
1815: IF l_debug_on THEN
1816: wsh_debug_sv.log(l_module_name, 'l_cms_flow',l_cms_flow);
1817: wsh_debug_sv.pop(l_module_name);
1818: END IF;
1819:
1820: RETURN l_cms_flow;
1821:
1823:
1824: WHEN OTHERS THEN
1825: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.branch_cms_tpw_flow');
1826: IF l_debug_on THEN
1827: WSH_DEBUG_SV.logmsg(l_module_name,
1828: 'Unexpected error has occured. Oracle error message is '||
1829: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1830: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1831: END IF;
1825: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.branch_cms_tpw_flow');
1826: IF l_debug_on THEN
1827: WSH_DEBUG_SV.logmsg(l_module_name,
1828: 'Unexpected error has occured. Oracle error message is '||
1829: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1830: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1831: END IF;
1832:
1833: END branch_cms_tpw_flow;
1826: IF l_debug_on THEN
1827: WSH_DEBUG_SV.logmsg(l_module_name,
1828: 'Unexpected error has occured. Oracle error message is '||
1829: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1830: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1831: END IF;
1832:
1833: END branch_cms_tpw_flow;
1834:
1887: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
1888: --
1889: IF l_debug_on IS NULL
1890: THEN
1891: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1892: END IF;
1893: --
1894: IF l_debug_on THEN
1895: wsh_debug_sv.push(l_module_name);
1891: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
1892: END IF;
1893: --
1894: IF l_debug_on THEN
1895: wsh_debug_sv.push(l_module_name);
1896: wsh_debug_sv.log(l_module_name, 'p_delivery_name',p_delivery_name);
1897: END IF;
1898:
1899: x_cancellation_in_progress := FALSE;
1892: END IF;
1893: --
1894: IF l_debug_on THEN
1895: wsh_debug_sv.push(l_module_name);
1896: wsh_debug_sv.log(l_module_name, 'p_delivery_name',p_delivery_name);
1897: END IF;
1898:
1899: x_cancellation_in_progress := FALSE;
1900:
1901: OPEN c_del_status(p_delivery_name);
1902: FETCH c_del_status INTO l_status;
1903: IF c_del_status%NOTFOUND THEN
1904: IF l_debug_on THEN
1905: wsh_debug_sv.logmsg(l_module_name, 'ERROR Invalid delivery');
1906: END IF;
1907: FND_MESSAGE.Set_Name('WSH', 'WSH_DEL_NOT_FOUND');
1908: WSH_UTIL_CORE.add_message (wsh_util_core.g_ret_sts_error,l_module_name);
1909: CLOSE c_del_status;
1909: CLOSE c_del_status;
1910: RAISE fnd_api.g_exc_error;
1911: END IF;
1912: IF l_debug_on THEN
1913: wsh_debug_sv.log(l_module_name, 'l_status',l_status);
1914: END IF;
1915:
1916: IF l_status <> 'SC' THEN
1917: x_cancellation_in_progress := FALSE;
1927: FETCH c_get_event_key INTO l_event_key;
1928: IF c_get_event_key%NOTFOUND THEN
1929:
1930: IF l_debug_on THEN
1931: wsh_debug_sv.logmsg(l_module_name, 'Cannot find the transaction history record');
1932: END IF;
1933:
1934: x_cancellation_in_progress := FALSE;
1935: CLOSE c_get_event_key;
1938:
1939: CLOSE c_get_event_key;
1940:
1941: IF l_debug_on THEN
1942: wsh_debug_sv.log(l_module_name, 'l_event_key',l_event_key);
1943: wsh_debug_sv.logmsg(l_module_name, 'calling program WF_ENGINE.ItemStatus',WSH_DEBUG_SV.C_PROC_LEVEL);
1944: END IF;
1945: WF_ENGINE.ItemStatus(
1946: itemtype => 'WSHSUPI',
1939: CLOSE c_get_event_key;
1940:
1941: IF l_debug_on THEN
1942: wsh_debug_sv.log(l_module_name, 'l_event_key',l_event_key);
1943: wsh_debug_sv.logmsg(l_module_name, 'calling program WF_ENGINE.ItemStatus',WSH_DEBUG_SV.C_PROC_LEVEL);
1944: END IF;
1945: WF_ENGINE.ItemStatus(
1946: itemtype => 'WSHSUPI',
1947: itemkey => l_event_key,
1963:
1964: x_return_status := wsh_util_core.g_ret_sts_success;
1965:
1966: IF l_debug_on THEN
1967: wsh_debug_sv.log(l_module_name, 'x_cancellation_in_progress',
1968: x_cancellation_in_progress);
1969: wsh_debug_sv.pop(l_module_name);
1970: END IF;
1971:
1965:
1966: IF l_debug_on THEN
1967: wsh_debug_sv.log(l_module_name, 'x_cancellation_in_progress',
1968: x_cancellation_in_progress);
1969: wsh_debug_sv.pop(l_module_name);
1970: END IF;
1971:
1972:
1973: EXCEPTION
1975: WHEN e_success THEN
1976: x_return_status := wsh_util_core.g_ret_sts_success;
1977: --
1978: IF l_debug_on THEN
1979: wsh_debug_sv.log(l_module_name, 'x_cancellation_in_progress',
1980: x_cancellation_in_progress);
1981: wsh_debug_sv.pop(l_module_name);
1982: END IF;
1983:
1977: --
1978: IF l_debug_on THEN
1979: wsh_debug_sv.log(l_module_name, 'x_cancellation_in_progress',
1980: x_cancellation_in_progress);
1981: wsh_debug_sv.pop(l_module_name);
1982: END IF;
1983:
1984: WHEN fnd_api.g_exc_error THEN
1985: x_return_status := fnd_api.g_ret_sts_error;
1984: WHEN fnd_api.g_exc_error THEN
1985: x_return_status := fnd_api.g_ret_sts_error;
1986: --
1987: IF l_debug_on THEN
1988: wsh_debug_sv.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured.', wsh_debug_sv.c_excep_level);
1989: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
1990: END IF;
1991: WHEN OTHERS THEN
1992: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
1985: x_return_status := fnd_api.g_ret_sts_error;
1986: --
1987: IF l_debug_on THEN
1988: wsh_debug_sv.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured.', wsh_debug_sv.c_excep_level);
1989: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
1990: END IF;
1991: WHEN OTHERS THEN
1992: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
1993: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.check_cancellation_inprogress',l_module_name);
1991: WHEN OTHERS THEN
1992: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
1993: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.check_cancellation_inprogress',l_module_name);
1994: IF l_debug_on THEN
1995: WSH_DEBUG_SV.logmsg(l_module_name,
1996: 'Unexpected error has occured. Oracle error message is '||
1997: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1998: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1999: END IF;
1993: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.check_cancellation_inprogress',l_module_name);
1994: IF l_debug_on THEN
1995: WSH_DEBUG_SV.logmsg(l_module_name,
1996: 'Unexpected error has occured. Oracle error message is '||
1997: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1998: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1999: END IF;
2000:
2001: END Check_cancellation_inprogress;
1994: IF l_debug_on THEN
1995: WSH_DEBUG_SV.logmsg(l_module_name,
1996: 'Unexpected error has occured. Oracle error message is '||
1997: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1998: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1999: END IF;
2000:
2001: END Check_cancellation_inprogress;
2002:
2067: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
2068: --
2069: IF l_debug_on IS NULL
2070: THEN
2071: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
2072: END IF;
2073: --
2074: SAVEPOINT s_Check_cancellation_wf ;
2075:
2074: SAVEPOINT s_Check_cancellation_wf ;
2075:
2076: IF l_debug_on THEN
2077: --bmso do we need to start the debugger
2078: wsh_debug_sv.push(l_module_name);
2079: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2080: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2081: wsh_debug_sv.log(l_module_name, 'actid',actid);
2082: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2075:
2076: IF l_debug_on THEN
2077: --bmso do we need to start the debugger
2078: wsh_debug_sv.push(l_module_name);
2079: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2080: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2081: wsh_debug_sv.log(l_module_name, 'actid',actid);
2082: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2083: END IF;
2076: IF l_debug_on THEN
2077: --bmso do we need to start the debugger
2078: wsh_debug_sv.push(l_module_name);
2079: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2080: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2081: wsh_debug_sv.log(l_module_name, 'actid',actid);
2082: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2083: END IF;
2084:
2077: --bmso do we need to start the debugger
2078: wsh_debug_sv.push(l_module_name);
2079: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2080: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2081: wsh_debug_sv.log(l_module_name, 'actid',actid);
2082: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2083: END IF;
2084:
2085: IF ( funcmode = 'RUN' ) THEN --{
2078: wsh_debug_sv.push(l_module_name);
2079: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2080: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2081: wsh_debug_sv.log(l_module_name, 'actid',actid);
2082: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2083: END IF;
2084:
2085: IF ( funcmode = 'RUN' ) THEN --{
2086: IF branch_cms_tpw_flow(p_event_key => item_key) THEN --{
2088: OPEN c_del_name_cur(item_key, item_type);
2089: FETCH c_del_name_cur INTO l_delivery_name, l_transaction_id;
2090: IF c_del_name_cur%NOTFOUND THEN
2091: IF l_debug_on THEN
2092: wsh_debug_sv.logmsg(l_module_name, 'Error, invalid interface delivery');
2093: END IF;
2094: CLOSE c_del_name_cur;
2095: RAISE fnd_api.g_exc_error;
2096: END IF;
2096: END IF;
2097: CLOSE c_del_name_cur;
2098:
2099: IF l_debug_on THEN
2100: wsh_debug_sv.log(l_module_name, 'l_delivery_name',l_delivery_name);
2101: wsh_debug_sv.log(l_module_name, 'l_transaction_id',l_transaction_id);
2102: END IF;
2103: -- see if there is any cancelation pending
2104: Check_cancellation_inprogress (
2097: CLOSE c_del_name_cur;
2098:
2099: IF l_debug_on THEN
2100: wsh_debug_sv.log(l_module_name, 'l_delivery_name',l_delivery_name);
2101: wsh_debug_sv.log(l_module_name, 'l_transaction_id',l_transaction_id);
2102: END IF;
2103: -- see if there is any cancelation pending
2104: Check_cancellation_inprogress (
2105: p_delivery_name => l_delivery_name,
2121:
2122: IF SQL%ROWCOUNT <> 1 THEN
2123:
2124: IF l_debug_on THEN
2125: wsh_debug_sv.log(l_module_name, 'Error in updating the transaction hsitory record to status AP',SQL%ROWCOUNT);
2126: END IF;
2127: RAISE FND_API.g_exc_error;
2128: END IF;
2129: RAISE e_send_yes;
2140:
2141: END IF; --}
2142:
2143: IF l_debug_on THEN
2144: wsh_debug_sv.pop(l_module_name);
2145: END IF;
2146:
2147:
2148: EXCEPTION
2150:
2151: WHEN e_send_no THEN
2152: resultout := 'COMPLETE:N';
2153: IF l_debug_on THEN
2154: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2155: wsh_debug_sv.pop(l_module_name);
2156: END IF;
2157:
2158: WHEN e_send_yes THEN
2151: WHEN e_send_no THEN
2152: resultout := 'COMPLETE:N';
2153: IF l_debug_on THEN
2154: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2155: wsh_debug_sv.pop(l_module_name);
2156: END IF;
2157:
2158: WHEN e_send_yes THEN
2159: resultout := 'COMPLETE:Y';
2157:
2158: WHEN e_send_yes THEN
2159: resultout := 'COMPLETE:Y';
2160: IF l_debug_on THEN
2161: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2162: wsh_debug_sv.pop(l_module_name);
2163: END IF;
2164:
2165: WHEN fnd_api.g_exc_unexpected_error THEN
2158: WHEN e_send_yes THEN
2159: resultout := 'COMPLETE:Y';
2160: IF l_debug_on THEN
2161: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2162: wsh_debug_sv.pop(l_module_name);
2163: END IF;
2164:
2165: WHEN fnd_api.g_exc_unexpected_error THEN
2166: --bmso how do we rollback;
2168: rollback to s_Check_cancellation_wf;
2169: resultout := 'COMPLETE:FAILURE';
2170: --
2171: IF l_debug_on THEN
2172: wsh_debug_sv.logmsg(l_module_name, 'fnd_api.g_exc_unexpected_error exception has occured.', wsh_debug_sv.c_excep_level);
2173: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:fnd_api.g_exc_unexpected_error');
2174: END IF;
2175: RAISE;
2176:
2169: resultout := 'COMPLETE:FAILURE';
2170: --
2171: IF l_debug_on THEN
2172: wsh_debug_sv.logmsg(l_module_name, 'fnd_api.g_exc_unexpected_error exception has occured.', wsh_debug_sv.c_excep_level);
2173: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:fnd_api.g_exc_unexpected_error');
2174: END IF;
2175: RAISE;
2176:
2177: WHEN fnd_api.g_exc_error THEN
2178: rollback to s_Check_cancellation_wf;
2179: resultout := 'COMPLETE:FAILURE';
2180: --
2181: IF l_debug_on THEN
2182: wsh_debug_sv.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured.', wsh_debug_sv.c_excep_level);
2183: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
2184: END IF;
2185:
2186: RAISE;
2179: resultout := 'COMPLETE:FAILURE';
2180: --
2181: IF l_debug_on THEN
2182: wsh_debug_sv.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured.', wsh_debug_sv.c_excep_level);
2183: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
2184: END IF;
2185:
2186: RAISE;
2187: WHEN OTHERS THEN
2187: WHEN OTHERS THEN
2188: resultout := 'COMPLETE:FAILURE';
2189: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.check_cancellation_wf');
2190: IF l_debug_on THEN
2191: WSH_DEBUG_SV.logmsg(l_module_name,
2192: 'Unexpected error has occured. Oracle error message is '||
2193: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2194: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2195: END IF;
2189: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.check_cancellation_wf');
2190: IF l_debug_on THEN
2191: WSH_DEBUG_SV.logmsg(l_module_name,
2192: 'Unexpected error has occured. Oracle error message is '||
2193: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2194: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2195: END IF;
2196: RAISE;
2197:
2190: IF l_debug_on THEN
2191: WSH_DEBUG_SV.logmsg(l_module_name,
2192: 'Unexpected error has occured. Oracle error message is '||
2193: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2194: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2195: END IF;
2196: RAISE;
2197:
2198: END check_cancellation_wf;
2342: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
2343: --
2344: IF l_debug_on IS NULL
2345: THEN
2346: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
2347: END IF;
2348: --
2349: SAVEPOINT s_process_cbod ;
2350:
2348: --
2349: SAVEPOINT s_process_cbod ;
2350:
2351: IF l_debug_on THEN
2352: wsh_debug_sv.push(l_module_name);
2353: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2354: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2355: wsh_debug_sv.log(l_module_name, 'actid',actid);
2356: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2349: SAVEPOINT s_process_cbod ;
2350:
2351: IF l_debug_on THEN
2352: wsh_debug_sv.push(l_module_name);
2353: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2354: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2355: wsh_debug_sv.log(l_module_name, 'actid',actid);
2356: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2357: END IF;
2350:
2351: IF l_debug_on THEN
2352: wsh_debug_sv.push(l_module_name);
2353: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2354: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2355: wsh_debug_sv.log(l_module_name, 'actid',actid);
2356: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2357: END IF;
2358:
2351: IF l_debug_on THEN
2352: wsh_debug_sv.push(l_module_name);
2353: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2354: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2355: wsh_debug_sv.log(l_module_name, 'actid',actid);
2356: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2357: END IF;
2358:
2359: IF ( funcmode = 'RUN' ) THEN --{
2352: wsh_debug_sv.push(l_module_name);
2353: wsh_debug_sv.log(l_module_name, 'item_type',item_type);
2354: wsh_debug_sv.log(l_module_name, 'item_key',item_key);
2355: wsh_debug_sv.log(l_module_name, 'actid',actid);
2356: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2357: END IF;
2358:
2359: IF ( funcmode = 'RUN' ) THEN --{
2360: IF branch_cms_tpw_flow(p_event_key => item_key) THEN --{
2376: OPEN c_sr_instance(item_type, item_key);
2377: FETCH c_sr_instance INTO l_dummy;
2378: IF c_sr_instance%NOTFOUND THEN --{
2379: IF l_debug_on THEN
2380: wsh_debug_sv.logmsg(l_module_name,
2381: 'Error: Could not find record in transaction history');
2382: END IF;
2383: CLOSE c_sr_instance;
2384: RAISE e_send_false;
2407: CLOSE c_get_del_status;
2408:
2409: IF l_status IN ('CO','IT','CL','SA') THEN --{
2410: IF l_debug_on THEN
2411: wsh_debug_sv.logmsg(l_module_name, 'Calling wf_engine.setItemAttribute');
2412: END IF;
2413: wf_engine.setItemAttrText
2414: (
2415: itemType => item_type,
2425: OPEN c_get_sr_record(l_entity_number);
2426: FETCH c_get_sr_record INTO l_sr_hist_record;
2427: IF c_get_sr_record%NOTFOUND THEN
2428: IF l_debug_on THEN
2429: wsh_debug_sv.log(l_module_name,
2430: 'Error: Could not find Shipment Request record for ',
2431: l_entity_number);
2432: END IF;
2433: CLOSE c_get_sr_record;
2442: l_del_interface_id;
2443: IF c_get_trx_id%NOTFOUND THEN
2444: l_sa_exist := FALSE;
2445: IF l_debug_on THEN
2446: wsh_debug_sv.log(l_module_name,
2447: 'No SA record exist for ',
2448: l_entity_number);
2449: END IF;
2450: ELSE
2452: END IF;
2453: CLOSE c_get_trx_id;
2454:
2455: IF l_debug_on THEN
2456: wsh_debug_sv.log(l_module_name,'l_sa_exist',l_sa_exist);
2457: wsh_debug_sv.log(l_module_name,'l_transaction_status',
2458: l_transaction_status);
2459: wsh_debug_sv.log(l_module_name,'l_trx_id',l_trx_id);
2460: wsh_debug_sv.log(l_module_name,'l_del_interface_id',
2453: CLOSE c_get_trx_id;
2454:
2455: IF l_debug_on THEN
2456: wsh_debug_sv.log(l_module_name,'l_sa_exist',l_sa_exist);
2457: wsh_debug_sv.log(l_module_name,'l_transaction_status',
2458: l_transaction_status);
2459: wsh_debug_sv.log(l_module_name,'l_trx_id',l_trx_id);
2460: wsh_debug_sv.log(l_module_name,'l_del_interface_id',
2461: l_del_interface_id);
2455: IF l_debug_on THEN
2456: wsh_debug_sv.log(l_module_name,'l_sa_exist',l_sa_exist);
2457: wsh_debug_sv.log(l_module_name,'l_transaction_status',
2458: l_transaction_status);
2459: wsh_debug_sv.log(l_module_name,'l_trx_id',l_trx_id);
2460: wsh_debug_sv.log(l_module_name,'l_del_interface_id',
2461: l_del_interface_id);
2462: END IF;
2463:
2456: wsh_debug_sv.log(l_module_name,'l_sa_exist',l_sa_exist);
2457: wsh_debug_sv.log(l_module_name,'l_transaction_status',
2458: l_transaction_status);
2459: wsh_debug_sv.log(l_module_name,'l_trx_id',l_trx_id);
2460: wsh_debug_sv.log(l_module_name,'l_del_interface_id',
2461: l_del_interface_id);
2462: END IF;
2463:
2464: l_cbod_status := wf_engine.GetItemAttrText(
2465: 'WSHSUPI',
2466: Item_key,
2467: 'PARAMETER6');
2468: IF l_debug_on THEN
2469: wsh_debug_sv.log(l_module_name,'l_cbod_status',l_cbod_status);
2470: END IF;
2471: IF l_cbod_status = '00' THEN --{ confirmation
2472:
2473:
2506: WSH_EXTERNAL_INTERFACE_SV.Raise_Event ( l_sr_hist_record, '99',
2507: l_Return_Status );
2508:
2509: IF l_debug_on THEN
2510: wsh_debug_sv.log (l_module_name, 'Return status after Raise_Event ', l_Return_Status);
2511: END IF;
2512:
2513: IF (l_Return_Status <> WSH_UTIL_CORE.g_ret_sts_success ) THEN
2514: RAISE e_send_false;
2544:
2545: END IF; --}
2546:
2547: IF l_debug_on THEN
2548: wsh_debug_sv.pop(l_module_name);
2549: END IF;
2550:
2551:
2552: EXCEPTION
2554:
2555: WHEN e_send_true THEN
2556: resultout := 'COMPLETE:T';
2557: IF l_debug_on THEN
2558: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2559: wsh_debug_sv.pop(l_module_name);
2560: END IF;
2561:
2562: WHEN e_send_false THEN
2555: WHEN e_send_true THEN
2556: resultout := 'COMPLETE:T';
2557: IF l_debug_on THEN
2558: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2559: wsh_debug_sv.pop(l_module_name);
2560: END IF;
2561:
2562: WHEN e_send_false THEN
2563: resultout := 'COMPLETE:F';
2561:
2562: WHEN e_send_false THEN
2563: resultout := 'COMPLETE:F';
2564: IF l_debug_on THEN
2565: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2566: wsh_debug_sv.pop(l_module_name);
2567: END IF;
2568:
2569: WHEN OTHERS THEN
2562: WHEN e_send_false THEN
2563: resultout := 'COMPLETE:F';
2564: IF l_debug_on THEN
2565: wsh_debug_sv.log(l_module_name, 'resultout', resultout);
2566: wsh_debug_sv.pop(l_module_name);
2567: END IF;
2568:
2569: WHEN OTHERS THEN
2570: resultout := 'COMPLETE:FAILURE';
2569: WHEN OTHERS THEN
2570: resultout := 'COMPLETE:FAILURE';
2571: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.process_cbod_wf');
2572: IF l_debug_on THEN
2573: WSH_DEBUG_SV.logmsg(l_module_name,
2574: 'Unexpected error has occured. Oracle error message is '||
2575: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2576: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2577: END IF;
2571: wsh_util_core.default_handler('WSH_TRANSACTIONS_UTIL.process_cbod_wf');
2572: IF l_debug_on THEN
2573: WSH_DEBUG_SV.logmsg(l_module_name,
2574: 'Unexpected error has occured. Oracle error message is '||
2575: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2576: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2577: END IF;
2578: RAISE;
2579: END process_cbod_wf;
2572: IF l_debug_on THEN
2573: WSH_DEBUG_SV.logmsg(l_module_name,
2574: 'Unexpected error has occured. Oracle error message is '||
2575: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2576: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2577: END IF;
2578: RAISE;
2579: END process_cbod_wf;
2580:
2621: --
2622: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
2623: --
2624: IF l_debug_on IS NULL THEN
2625: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
2626: END IF;
2627: l_resultout := wf_engine.eng_null;
2628: --
2629: IF l_debug_on THEN
2626: END IF;
2627: l_resultout := wf_engine.eng_null;
2628: --
2629: IF l_debug_on THEN
2630: wsh_debug_sv.push(l_module_name);
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2627: l_resultout := wf_engine.eng_null;
2628: --
2629: IF l_debug_on THEN
2630: wsh_debug_sv.push(l_module_name);
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2635: wsh_debug_sv.log(l_module_name, 'l_resultout',l_resultout);
2628: --
2629: IF l_debug_on THEN
2630: wsh_debug_sv.push(l_module_name);
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2635: wsh_debug_sv.log(l_module_name, 'l_resultout',l_resultout);
2636: END IF;
2629: IF l_debug_on THEN
2630: wsh_debug_sv.push(l_module_name);
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2635: wsh_debug_sv.log(l_module_name, 'l_resultout',l_resultout);
2636: END IF;
2637: ecx_standard.isDeliveryRequired(itemtype,itemkey,actid,funcmode,l_resultout);
2630: wsh_debug_sv.push(l_module_name);
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2635: wsh_debug_sv.log(l_module_name, 'l_resultout',l_resultout);
2636: END IF;
2637: ecx_standard.isDeliveryRequired(itemtype,itemkey,actid,funcmode,l_resultout);
2638: resultout := l_resultout;
2631: wsh_debug_sv.log(l_module_name, 'itemtype',itemtype);
2632: wsh_debug_sv.log(l_module_name, 'itemkey',itemkey);
2633: wsh_debug_sv.log(l_module_name, 'actid',actid);
2634: wsh_debug_sv.log(l_module_name, 'funcmode',funcmode);
2635: wsh_debug_sv.log(l_module_name, 'l_resultout',l_resultout);
2636: END IF;
2637: ecx_standard.isDeliveryRequired(itemtype,itemkey,actid,funcmode,l_resultout);
2638: resultout := l_resultout;
2639: IF l_debug_on THEN
2636: END IF;
2637: ecx_standard.isDeliveryRequired(itemtype,itemkey,actid,funcmode,l_resultout);
2638: resultout := l_resultout;
2639: IF l_debug_on THEN
2640: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
2641: END IF;
2642: IF nvl(resultout,'COMPLETE:F') <> 'COMPLETE:T' THEN
2643: RAISE COMPLETE_F;
2644: END IF;
2642: IF nvl(resultout,'COMPLETE:F') <> 'COMPLETE:T' THEN
2643: RAISE COMPLETE_F;
2644: END IF;
2645: IF l_debug_on THEN
2646: wsh_debug_sv.pop(l_module_name);
2647: END IF;
2648:
2649: EXCEPTION
2650: WHEN COMPLETE_F THEN
2648:
2649: EXCEPTION
2650: WHEN COMPLETE_F THEN
2651: IF l_debug_on THEN
2652: wsh_debug_sv.pop(l_module_name,'EXCEPTION:COMPLETE:F');
2653: END IF;
2654: RAISE;
2655: WHEN OTHERS THEN
2656: IF l_debug_on THEN
2653: END IF;
2654: RAISE;
2655: WHEN OTHERS THEN
2656: IF l_debug_on THEN
2657: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
2658: WSH_DEBUG_SV.logmsg(l_module_name,
2659: 'Unexpected error has occured. Oracle error message is '||
2660: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2661: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2654: RAISE;
2655: WHEN OTHERS THEN
2656: IF l_debug_on THEN
2657: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
2658: WSH_DEBUG_SV.logmsg(l_module_name,
2659: 'Unexpected error has occured. Oracle error message is '||
2660: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2661: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2662: END IF;
2656: IF l_debug_on THEN
2657: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
2658: WSH_DEBUG_SV.logmsg(l_module_name,
2659: 'Unexpected error has occured. Oracle error message is '||
2660: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2661: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2662: END IF;
2663: RAISE;
2664: END isDeliveryRequired;
2657: wsh_debug_sv.log(l_module_name, 'resultout',resultout);
2658: WSH_DEBUG_SV.logmsg(l_module_name,
2659: 'Unexpected error has occured. Oracle error message is '||
2660: substr(SQLERRM,1,200), WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2661: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2662: END IF;
2663: RAISE;
2664: END isDeliveryRequired;
2665: