46: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
47: --
48: IF l_debug_on IS NULL
49: THEN
50: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
51: END IF;
52: --
53: IF l_debug_on THEN
54: wsh_debug_sv.push(l_module_name, 'Update_Dlvy_Status');
50: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
51: END IF;
52: --
53: IF l_debug_on THEN
54: wsh_debug_sv.push(l_module_name, 'Update_Dlvy_Status');
55: wsh_debug_sv.log(l_module_name, 'p_delivery_id',p_delivery_id);
56: wsh_debug_sv.log(l_module_name, 'p_action_code',p_action_code);
57: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
58: END IF;
51: END IF;
52: --
53: IF l_debug_on THEN
54: wsh_debug_sv.push(l_module_name, 'Update_Dlvy_Status');
55: wsh_debug_sv.log(l_module_name, 'p_delivery_id',p_delivery_id);
56: wsh_debug_sv.log(l_module_name, 'p_action_code',p_action_code);
57: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
58: END IF;
59:
52: --
53: IF l_debug_on THEN
54: wsh_debug_sv.push(l_module_name, 'Update_Dlvy_Status');
55: wsh_debug_sv.log(l_module_name, 'p_delivery_id',p_delivery_id);
56: wsh_debug_sv.log(l_module_name, 'p_action_code',p_action_code);
57: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
58: END IF;
59:
60: l_return_status :=wsh_util_core.g_ret_sts_success;
53: IF l_debug_on THEN
54: wsh_debug_sv.push(l_module_name, 'Update_Dlvy_Status');
55: wsh_debug_sv.log(l_module_name, 'p_delivery_id',p_delivery_id);
56: wsh_debug_sv.log(l_module_name, 'p_action_code',p_action_code);
57: wsh_debug_sv.log(l_module_name, 'p_document_type',p_document_type);
58: END IF;
59:
60: l_return_status :=wsh_util_core.g_ret_sts_success;
61:
74: WSH_NEW_DELIVERY_ACTIONS.Unplan(p_del_rows => l_del_rows,
75: x_return_status => l_return_status);
76:
77: IF l_debug_on THEN
78: wsh_debug_sv.log (l_module_name,'Unplan->x_return_status: ',l_return_status);
79: END IF;
80:
81: IF ( l_return_status not in (wsh_util_core.g_ret_sts_success,wsh_util_core.g_ret_sts_warning) ) THEN
82: raise wsh_unplan_error;
85: WSH_DELIVERY_VALIDATIONS.check_smc(p_delivery_id => p_delivery_id,
86: x_valid_flag => l_valid_flag,
87: x_return_status => l_return_status);
88: IF l_debug_on THEN
89: wsh_debug_sv.log (l_module_name,'check_smc->x_return_status: ',l_return_status);
90: END IF;
91:
92: IF (l_return_status <> wsh_util_core.g_ret_sts_success) THEN
93: raise wsh_plan_error;
111: WSH_NEW_DELIVERY_ACTIONS.Plan( p_del_rows => l_del_rows,
112: x_return_status => l_return_status);
113:
114: IF l_debug_on THEN
115: wsh_debug_sv.log (l_module_name,'plan->x_return_status: ',l_return_status);
116: END IF;
117:
118: IF ( l_return_status not in (wsh_util_core.g_ret_sts_success,wsh_util_core.g_ret_sts_warning) ) THEN
119: raise wsh_plan_error;
122: WSH_DELIVERY_VALIDATIONS.check_smc(p_delivery_id => p_delivery_id,
123: x_valid_flag => l_valid_flag,
124: x_return_status => l_return_status);
125: IF l_debug_on THEN
126: wsh_debug_sv.log (l_module_name,'check_smc->x_return_status: ',l_return_status);
127: END IF;
128:
129: IF (l_return_status <> wsh_util_core.g_ret_sts_success) THEN
130: raise wsh_plan_error;
155: raise wsh_invalid_action_type;
156: END IF;
157:
158: IF l_debug_on THEN
159: wsh_debug_sv.log (l_module_name,'l_return_status: ',l_return_status);
160: END IF;
161:
162: IF (l_warning_count > 0 ) THEN
163: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING ;
165: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
166: END IF;
167:
168: IF l_debug_on THEN
169: wsh_debug_sv.pop (l_module_name);
170: END IF;
171: --commit;
172:
173: EXCEPTION
173: EXCEPTION
174: WHEN wsh_plan_error THEN
175: x_return_status := l_return_status;
176: IF l_debug_on THEN
177: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_plan_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
178: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_plan_error');
179: END IF;
180: WHEN wsh_unplan_error THEN
181: x_return_status := l_return_status;
174: WHEN wsh_plan_error THEN
175: x_return_status := l_return_status;
176: IF l_debug_on THEN
177: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_plan_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
178: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_plan_error');
179: END IF;
180: WHEN wsh_unplan_error THEN
181: x_return_status := l_return_status;
182: IF l_debug_on THEN
179: END IF;
180: WHEN wsh_unplan_error THEN
181: x_return_status := l_return_status;
182: IF l_debug_on THEN
183: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_unplan_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
184: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_unplan_error');
185: END IF;
186: WHEN wsh_invalid_doc_type THEN
187: x_return_status := wsh_util_core.g_ret_sts_error;
180: WHEN wsh_unplan_error THEN
181: x_return_status := l_return_status;
182: IF l_debug_on THEN
183: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_unplan_error exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
184: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_unplan_error');
185: END IF;
186: WHEN wsh_invalid_doc_type THEN
187: x_return_status := wsh_util_core.g_ret_sts_error;
188: IF l_debug_on THEN
185: END IF;
186: WHEN wsh_invalid_doc_type THEN
187: x_return_status := wsh_util_core.g_ret_sts_error;
188: IF l_debug_on THEN
189: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_doc_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
190: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_doc_type');
191: END IF;
192: WHEN wsh_invalid_action_type THEN
193: x_return_status := wsh_util_core.g_ret_sts_error;
186: WHEN wsh_invalid_doc_type THEN
187: x_return_status := wsh_util_core.g_ret_sts_error;
188: IF l_debug_on THEN
189: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_doc_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
190: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_doc_type');
191: END IF;
192: WHEN wsh_invalid_action_type THEN
193: x_return_status := wsh_util_core.g_ret_sts_error;
194: IF l_debug_on THEN
191: END IF;
192: WHEN wsh_invalid_action_type THEN
193: x_return_status := wsh_util_core.g_ret_sts_error;
194: IF l_debug_on THEN
195: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_action_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
196: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_action_type');
197: END IF;
198: WHEN others THEN
199: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
192: WHEN wsh_invalid_action_type THEN
193: x_return_status := wsh_util_core.g_ret_sts_error;
194: IF l_debug_on THEN
195: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_action_type exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
196: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_action_type');
197: END IF;
198: WHEN others THEN
199: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
200: IF l_debug_on THEN
197: END IF;
198: WHEN others THEN
199: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
200: IF l_debug_on THEN
201: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
202: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
203: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
204: END IF;
205: END Update_Dlvy_Status;
198: WHEN others THEN
199: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
200: IF l_debug_on THEN
201: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
202: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
203: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
204: END IF;
205: END Update_Dlvy_Status;
206:
199: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
200: IF l_debug_on THEN
201: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
202: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
203: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
204: END IF;
205: END Update_Dlvy_Status;
206:
207:
269: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
270: --
271: IF l_debug_on IS NULL
272: THEN
273: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
274: END IF;
275: --
276: IF l_debug_on THEN
277: wsh_debug_sv.push(l_module_name, 'Is_SendDoc_Allowed');
273: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
274: END IF;
275: --
276: IF l_debug_on THEN
277: wsh_debug_sv.push(l_module_name, 'Is_SendDoc_Allowed');
278: wsh_debug_sv.log (l_module_name, 'p_delivery_id',p_delivery_id);
279: wsh_debug_sv.log (l_module_name, 'p_action_code',p_action_code);
280: END IF;
281:
274: END IF;
275: --
276: IF l_debug_on THEN
277: wsh_debug_sv.push(l_module_name, 'Is_SendDoc_Allowed');
278: wsh_debug_sv.log (l_module_name, 'p_delivery_id',p_delivery_id);
279: wsh_debug_sv.log (l_module_name, 'p_action_code',p_action_code);
280: END IF;
281:
282: open del_status_cur;
275: --
276: IF l_debug_on THEN
277: wsh_debug_sv.push(l_module_name, 'Is_SendDoc_Allowed');
278: wsh_debug_sv.log (l_module_name, 'p_delivery_id',p_delivery_id);
279: wsh_debug_sv.log (l_module_name, 'p_action_code',p_action_code);
280: END IF;
281:
282: open del_status_cur;
283: Fetch del_status_cur into l_status_code, l_planned_flag;
288: IF del_status_cur%ISOPEN THEN
289: close del_status_cur;
290: END IF;
291: IF l_debug_on THEN
292: wsh_debug_sv.log (l_module_name, ' Status Code',l_status_code);
293: wsh_debug_sv.log (l_module_name, ' Planned Flag', l_planned_flag);
294: END IF;
295:
296: IF ( p_action_code = 'A' ) THEN
289: close del_status_cur;
290: END IF;
291: IF l_debug_on THEN
292: wsh_debug_sv.log (l_module_name, ' Status Code',l_status_code);
293: wsh_debug_sv.log (l_module_name, ' Planned Flag', l_planned_flag);
294: END IF;
295:
296: IF ( p_action_code = 'A' ) THEN
297:
300: fetch det_tpw_cur into l_det_temp;
301: close det_tpw_cur;
302: IF l_det_temp is null THEN
303: IF l_debug_on THEN
304: wsh_debug_sv.pop (l_module_name,'RETURN-TRUE');
305: END IF;
306: RETURN TRUE;
307: ELSE
308: IF l_debug_on THEN
305: END IF;
306: RETURN TRUE;
307: ELSE
308: IF l_debug_on THEN
309: wsh_debug_sv.pop (l_module_name,'RETURN-FALSE');
310: END IF;
311: RETURN FALSE;
312: END IF;
313: ELSE
311: RETURN FALSE;
312: END IF;
313: ELSE
314: IF l_debug_on THEN
315: wsh_debug_sv.pop (l_module_name,'RETURN-FALSE');
316: END IF;
317: RETURN FALSE;
318: END IF;
319: ELSIF ( p_action_code = 'D' ) THEN
328: FETCH c_get_event_key INTO l_event_key, l_item_type;
329: CLOSE c_get_event_key;
330:
331: IF l_debug_on THEN
332: wsh_debug_sv.log (l_module_name, 'l_event_key',l_event_key);
333: wsh_debug_sv.log (l_module_name, 'l_item_type',l_item_type);
334: END IF;
335:
336: OPEN c_inbound_txn_csr(l_event_key,l_item_type);
329: CLOSE c_get_event_key;
330:
331: IF l_debug_on THEN
332: wsh_debug_sv.log (l_module_name, 'l_event_key',l_event_key);
333: wsh_debug_sv.log (l_module_name, 'l_item_type',l_item_type);
334: END IF;
335:
336: OPEN c_inbound_txn_csr(l_event_key,l_item_type);
337: FETCH c_inbound_txn_csr INTO l_sa_exist;
337: FETCH c_inbound_txn_csr INTO l_sa_exist;
338: CLOSE c_inbound_txn_csr;
339:
340: IF l_debug_on THEN
341: wsh_debug_sv.log (l_module_name, 'l_sa_exist',l_sa_exist);
342: END IF;
343:
344: IF l_sa_exist = 'X' THEN
345: IF l_debug_on THEN
342: END IF;
343:
344: IF l_sa_exist = 'X' THEN
345: IF l_debug_on THEN
346: wsh_debug_sv.pop (l_module_name,'RETURN-FALSE');
347: END IF;
348: RETURN FALSE;
349: ELSE
350: IF l_debug_on THEN
347: END IF;
348: RETURN FALSE;
349: ELSE
350: IF l_debug_on THEN
351: wsh_debug_sv.pop (l_module_name,'RETURN-TRUE');
352: END IF;
353: RETURN TRUE;
354: END IF;
355:
354: END IF;
355:
356: ELSE
357: IF l_debug_on THEN
358: wsh_debug_sv.pop (l_module_name,'RETURN-FALSE');
359: END IF;
360: RETURN FALSE;
361: END IF;
362: ELSE
364: END IF;
365: x_return_status := wsh_util_core.g_ret_sts_success;
366:
367: IF l_debug_on THEN
368: wsh_debug_sv.pop (l_module_name);
369: END IF;
370: EXCEPTION
371: WHEN wsh_del_not_found THEN
372: x_return_status := wsh_util_core.g_ret_sts_error;
372: x_return_status := wsh_util_core.g_ret_sts_error;
373: FND_MESSAGE.Set_Name('WSH', 'WSH_DEL_NOT_FOUND');
374: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
375: IF l_debug_on THEN
376: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_not_found exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
377: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_not_found');
378: END IF;
379: RETURN FALSE;
380: WHEN wsh_invalid_action_code THEN
373: FND_MESSAGE.Set_Name('WSH', 'WSH_DEL_NOT_FOUND');
374: WSH_UTIL_CORE.add_message (x_return_status,l_module_name);
375: IF l_debug_on THEN
376: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_del_not_found exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
377: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_del_not_found');
378: END IF;
379: RETURN FALSE;
380: WHEN wsh_invalid_action_code THEN
381: x_return_status := wsh_util_core.g_ret_sts_error;
379: RETURN FALSE;
380: WHEN wsh_invalid_action_code THEN
381: x_return_status := wsh_util_core.g_ret_sts_error;
382: IF l_debug_on THEN
383: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_action_code exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
384: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_action_code');
385: END IF;
386: RETURN FALSE;
387: WHEN others THEN
380: WHEN wsh_invalid_action_code THEN
381: x_return_status := wsh_util_core.g_ret_sts_error;
382: IF l_debug_on THEN
383: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_action_code exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
384: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_action_code');
385: END IF;
386: RETURN FALSE;
387: WHEN others THEN
388: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
386: RETURN FALSE;
387: WHEN others THEN
388: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
389: IF l_debug_on THEN
390: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
391: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
392: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
393: END IF;
394: RETURN FALSE;
387: WHEN others THEN
388: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
389: IF l_debug_on THEN
390: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
391: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
392: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
393: END IF;
394: RETURN FALSE;
395: END Is_SendDoc_Allowed;
388: x_return_status := wsh_util_core.g_ret_sts_unexp_error;
389: IF l_debug_on THEN
390: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
391: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
392: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
393: END IF;
394: RETURN FALSE;
395: END Is_SendDoc_Allowed;
396:
447: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
448: --
449: IF l_debug_on IS NULL
450: THEN
451: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
452: END IF;
453: --
454: IF l_debug_on THEN
455: wsh_debug_sv.push(l_module_name, 'Check_Updates_Allowed');
451: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
452: END IF;
453: --
454: IF l_debug_on THEN
455: wsh_debug_sv.push(l_module_name, 'Check_Updates_Allowed');
456: wsh_debug_sv.log (l_module_name, 'p_source_code',p_source_code);
457: END IF;
458:
459: l_return_status := wsh_util_core.g_ret_sts_success;
452: END IF;
453: --
454: IF l_debug_on THEN
455: wsh_debug_sv.push(l_module_name, 'Check_Updates_Allowed');
456: wsh_debug_sv.log (l_module_name, 'p_source_code',p_source_code);
457: END IF;
458:
459: l_return_status := wsh_util_core.g_ret_sts_success;
460:
462:
463: FOR l_counter IN p_changed_attributes.FIRST ..p_changed_attributes.LAST LOOP
464:
465: IF l_debug_on THEN
466: wsh_debug_sv.log(l_module_name,'original_source_line_id:',p_changed_attributes(l_counter).original_source_line_id);
467: wsh_debug_sv.log (l_module_name, 'source_line_id: ',p_changed_attributes(l_counter).source_line_id);
468: wsh_debug_sv.log (l_module_name, 'action_flag',p_changed_attributes(l_counter).action_flag);
469: END IF;
470:
463: FOR l_counter IN p_changed_attributes.FIRST ..p_changed_attributes.LAST LOOP
464:
465: IF l_debug_on THEN
466: wsh_debug_sv.log(l_module_name,'original_source_line_id:',p_changed_attributes(l_counter).original_source_line_id);
467: wsh_debug_sv.log (l_module_name, 'source_line_id: ',p_changed_attributes(l_counter).source_line_id);
468: wsh_debug_sv.log (l_module_name, 'action_flag',p_changed_attributes(l_counter).action_flag);
469: END IF;
470:
471: IF (p_changed_attributes(l_counter).action_flag <> 'I' ) THEN
464:
465: IF l_debug_on THEN
466: wsh_debug_sv.log(l_module_name,'original_source_line_id:',p_changed_attributes(l_counter).original_source_line_id);
467: wsh_debug_sv.log (l_module_name, 'source_line_id: ',p_changed_attributes(l_counter).source_line_id);
468: wsh_debug_sv.log (l_module_name, 'action_flag',p_changed_attributes(l_counter).action_flag);
469: END IF;
470:
471: IF (p_changed_attributes(l_counter).action_flag <> 'I' ) THEN
472: --bug 2320115 fixed
487: x_return_status => l_return_status,
488: p_delivery_detail_id => l_delivery_detail_id);
489:
490: IF l_debug_on THEN
491: wsh_debug_sv.log(l_module_name,'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
492: END IF;
493:
494: IF ( l_return_status <> wsh_util_core.g_ret_sts_success ) THEN
495: raise wsh_invalid_org;
514: x_update_allowed := 'Y';
515: END IF;
516: x_return_status := l_return_status;
517: IF l_debug_on THEN
518: wsh_debug_sv.pop (l_module_name);
519: END IF;
520: EXCEPTION
521: WHEN wsh_update_not_allowed THEN
522: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
523: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_NOT_ALLOWED');
524: WSH_UTIL_CORE.Add_Message(x_return_status,l_module_name);
525: x_update_allowed := 'N';
526: IF l_debug_on THEN
527: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_not_allowed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
528: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_not_allowed');
529: END IF;
530: WHEN wsh_invalid_org THEN
531: x_return_status := l_return_status;
524: WSH_UTIL_CORE.Add_Message(x_return_status,l_module_name);
525: x_update_allowed := 'N';
526: IF l_debug_on THEN
527: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_update_not_allowed exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
528: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_update_not_allowed');
529: END IF;
530: WHEN wsh_invalid_org THEN
531: x_return_status := l_return_status;
532: x_update_allowed := 'N';
530: WHEN wsh_invalid_org THEN
531: x_return_status := l_return_status;
532: x_update_allowed := 'N';
533: IF l_debug_on THEN
534: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_org exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
535: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_org');
536: END IF;
537: WHEN OTHERS THEN
538: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
531: x_return_status := l_return_status;
532: x_update_allowed := 'N';
533: IF l_debug_on THEN
534: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_invalid_org exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
535: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_invalid_org');
536: END IF;
537: WHEN OTHERS THEN
538: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
539: x_update_allowed := 'N';
538: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
539: x_update_allowed := 'N';
540: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_DELIVERY_UTIL.Check_Updates_Allowed',l_module_name);
541: IF l_debug_on THEN
542: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
543: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
544: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
545: END IF;
546: END Check_Updates_Allowed;
539: x_update_allowed := 'N';
540: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_DELIVERY_UTIL.Check_Updates_Allowed',l_module_name);
541: IF l_debug_on THEN
542: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
543: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
544: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
545: END IF;
546: END Check_Updates_Allowed;
547:
540: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_DELIVERY_UTIL.Check_Updates_Allowed',l_module_name);
541: IF l_debug_on THEN
542: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
543: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
544: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
545: END IF;
546: END Check_Updates_Allowed;
547:
548: PROCEDURE Check_Actions_Allowed(x_entity_ids IN OUT NOCOPY WSH_UTIL_CORE.Id_Tab_Type,
712: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
713: --
714: IF l_debug_on IS NULL
715: THEN
716: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
717: END IF;
718: --
719: IF l_debug_on THEN
720: wsh_debug_sv.push(l_module_name, 'Check_Actions_Allowed');
716: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
717: END IF;
718: --
719: IF l_debug_on THEN
720: wsh_debug_sv.push(l_module_name, 'Check_Actions_Allowed');
721: wsh_debug_sv.log (l_module_name, 'Entity Name',p_entity_name);
722: wsh_debug_sv.log (l_module_name, 'Action Code',p_action);
723: END IF;
724:
717: END IF;
718: --
719: IF l_debug_on THEN
720: wsh_debug_sv.push(l_module_name, 'Check_Actions_Allowed');
721: wsh_debug_sv.log (l_module_name, 'Entity Name',p_entity_name);
722: wsh_debug_sv.log (l_module_name, 'Action Code',p_action);
723: END IF;
724:
725: IF ( p_action = 'ASSIGN_TO_DELIVERY') THEN
718: --
719: IF l_debug_on THEN
720: wsh_debug_sv.push(l_module_name, 'Check_Actions_Allowed');
721: wsh_debug_sv.log (l_module_name, 'Entity Name',p_entity_name);
722: wsh_debug_sv.log (l_module_name, 'Action Code',p_action);
723: END IF;
724:
725: IF ( p_action = 'ASSIGN_TO_DELIVERY') THEN
726: open det_stat_cur(p_delivery_id);
732: open del_cur(p_delivery_id);
733: Fetch del_cur into l_organization_id, l_status_code, l_planned_flag;
734: close del_cur;
735: IF l_debug_on THEN
736: wsh_debug_sv.log (l_module_name, 'Organization_id',l_organization_id);
737: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
738: END IF;
739:
740: IF ( l_status_code IN ('SR','SC') and l_planned_flag IN ('Y','F') ) THEN
733: Fetch del_cur into l_organization_id, l_status_code, l_planned_flag;
734: close del_cur;
735: IF l_debug_on THEN
736: wsh_debug_sv.log (l_module_name, 'Organization_id',l_organization_id);
737: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
738: END IF;
739:
740: IF ( l_status_code IN ('SR','SC') and l_planned_flag IN ('Y','F') ) THEN
741: raise wsh_delivery_locked;
765: fetch trip_to_del_cur into l_organization_id, l_status_code, l_planned_flag,l_delivery_id;
766: close trip_to_del_cur;
767:
768: IF l_debug_on THEN
769: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
770: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
771: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
772: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
773: END IF;
766: close trip_to_del_cur;
767:
768: IF l_debug_on THEN
769: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
770: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
771: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
772: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
773: END IF;
774:
767:
768: IF l_debug_on THEN
769: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
770: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
771: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
772: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
773: END IF;
774:
775: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y', 'F') ) THEN
768: IF l_debug_on THEN
769: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
770: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
771: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
772: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
773: END IF;
774:
775: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y', 'F') ) THEN
776: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
779: x_return_status => l_return_status,
780: p_delivery_id => l_delivery_id,
781: p_msg_display => 'N');
782: IF l_debug_on THEN
783: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
784: END IF;
785:
786: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
787: open trip_to_det_cur(x_entity_ids(l_counter));
808: fetch stop_to_del_cur into l_organization_id, l_status_code, l_planned_flag, l_delivery_id;
809: close stop_to_del_cur;
810:
811: IF l_debug_on THEN
812: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
813: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
814: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
815: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
816: END IF;
809: close stop_to_del_cur;
810:
811: IF l_debug_on THEN
812: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
813: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
814: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
815: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
816: END IF;
817:
810:
811: IF l_debug_on THEN
812: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
813: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
814: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
815: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
816: END IF;
817:
818: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y', 'F') ) THEN
811: IF l_debug_on THEN
812: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
813: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
814: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
815: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
816: END IF;
817:
818: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y', 'F') ) THEN
819: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
823: p_delivery_id => l_delivery_id,
824: p_msg_display => 'N');
825:
826: IF l_debug_on THEN
827: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
828: END IF;
829:
830: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
831: open stop_to_det_cur(x_entity_ids(l_counter));
851: fetch stop_to_del_cur into l_organization_id, l_status_code, l_planned_flag, l_delivery_id;
852: close stop_to_del_cur;
853:
854: IF l_debug_on THEN
855: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
856: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
857: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
858: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
859: END IF;
852: close stop_to_del_cur;
853:
854: IF l_debug_on THEN
855: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
856: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
857: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
858: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
859: END IF;
860:
853:
854: IF l_debug_on THEN
855: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
856: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
857: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
858: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
859: END IF;
860:
861: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y','F') ) THEN
854: IF l_debug_on THEN
855: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
856: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
857: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
858: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
859: END IF;
860:
861: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y','F') ) THEN
862: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
864: l_wh_type := WSH_EXTERNAL_INTERFACE_SV.Get_Warehouse_Type(p_organization_id => l_organization_id,
865: x_return_status => l_return_status,
866: p_delivery_id => l_delivery_id);
867: IF l_debug_on THEN
868: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
869: END IF;
870:
871: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) IN ('TPW','CMS') ) THEN
872: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
886: Fetch del_cur into l_organization_id, l_status_code, l_planned_flag;
887: close del_cur;
888:
889: IF l_debug_on THEN
890: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
891: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
892: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
893: END IF;
894:
887: close del_cur;
888:
889: IF l_debug_on THEN
890: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
891: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
892: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
893: END IF;
894:
895: IF ( p_action IN ('LAUNCH_PICK_RELEASE','AUTO_PACK','AUTO_PACK_MASTER','PACK') ) THEN
888:
889: IF l_debug_on THEN
890: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
891: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
892: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
893: END IF;
894:
895: IF ( p_action IN ('LAUNCH_PICK_RELEASE','AUTO_PACK','AUTO_PACK_MASTER','PACK') ) THEN
896:
901: x_return_status => l_return_status,
902: p_delivery_id => x_entity_ids(l_counter),
903: p_msg_display => 'N');
904: IF l_debug_on THEN
905: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
906: END IF;
907: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
908: open del_to_det_cur(x_entity_ids(l_counter));
909: Fetch del_to_det_cur into l_tpw_temp;
929: x_return_status => l_return_status,
930: p_delivery_id => x_entity_ids(l_counter),
931: p_msg_display => 'N');
932: IF l_debug_on THEN
933: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
934: END IF;
935: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
936: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
937: ELSE
950: x_return_status => l_return_status,
951: p_delivery_id => x_entity_ids(l_counter),
952: p_msg_display => 'N');
953: IF l_debug_on THEN
954: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
955: END IF;
956: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'CMS' ) THEN
957: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
958: ELSE
967: x_return_status => l_return_status,
968: p_delivery_id => x_entity_ids(l_counter),
969: p_msg_display => 'N');
970: IF l_debug_on THEN
971: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
972: END IF;
973: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'CMS' ) THEN
974: l_err_entity_ids(l_err_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
975: ELSE
984: x_return_status => l_return_status,
985: p_delivery_id => x_entity_ids(l_counter),
986: p_msg_display => 'N');
987: IF l_debug_on THEN
988: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
989: END IF;
990: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'CMS' ) THEN
991: open del_to_det_cur(x_entity_ids(l_counter));
992: Fetch del_to_det_cur into l_tpw_temp;
1015: l_wh_type := WSH_EXTERNAL_INTERFACE_SV.Get_Warehouse_Type(p_organization_id => l_organization_id,
1016: x_return_status => l_return_status,
1017: p_delivery_id => x_entity_ids(l_counter));
1018: IF l_debug_on THEN
1019: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1020: END IF;
1021: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR ) THEN
1022: open det_stat_cur(x_entity_ids(l_counter));
1023: fetch det_stat_cur into l_atd_tpw_temp;
1052: p_delivery_id => x_entity_ids(l_counter),
1053: p_msg_display => 'N');
1054:
1055: IF l_debug_on THEN
1056: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1057: END IF;
1058: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) in ( 'CMS','TPW') ) THEN
1059: open del_to_det_cur(x_entity_ids(l_counter));
1060: fetch del_to_det_cur into l_tpw_temp;
1079: open del_cur(p_delivery_id);
1080: Fetch del_cur into l_organization_id, l_status_code, l_planned_flag;
1081: close del_cur;
1082: IF l_debug_on THEN
1083: wsh_debug_sv.log (l_module_name, 'Organization_id',l_organization_id);
1084: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1085: END IF;
1086: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y','F') ) THEN
1087: raise wsh_delivery_locked;
1080: Fetch del_cur into l_organization_id, l_status_code, l_planned_flag;
1081: close del_cur;
1082: IF l_debug_on THEN
1083: wsh_debug_sv.log (l_module_name, 'Organization_id',l_organization_id);
1084: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1085: END IF;
1086: IF ( l_status_code IN ('SR', 'SC') AND l_planned_flag IN ('Y','F') ) THEN
1087: raise wsh_delivery_locked;
1088: ELSE
1090: x_return_status => l_return_status,
1091: p_delivery_id => x_entity_ids(l_counter),
1092: p_msg_display => 'N');
1093: IF l_debug_on THEN
1094: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1095: END IF;
1096: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) IN ('TPW','CMS') ) THEN
1097: raise wsh_delivery_locked;
1098: ELSE
1109: open det_to_del_cur(x_entity_ids(l_counter));
1110: Fetch det_to_del_cur into l_organization_id, l_status_code, l_planned_flag, l_delivery_id;
1111:
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
1114: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1115: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
1116: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
1117: END IF;
1110: Fetch det_to_del_cur into l_organization_id, l_status_code, l_planned_flag, l_delivery_id;
1111:
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
1114: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1115: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
1116: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
1117: END IF;
1118:
1111:
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
1114: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1115: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
1116: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
1117: END IF;
1118:
1119: IF ( p_action IN ('CYCLE_COUNT','LAUNCH_PICK_RELEASE','AUTO_PACK','AUTO_PACK_MASTER',
1112: IF l_debug_on THEN
1113: wsh_debug_sv.log (l_module_name, 'Organization Id',l_organization_id);
1114: wsh_debug_sv.log (l_module_name, 'Status Code',l_status_code);
1115: wsh_debug_sv.log (l_module_name, 'Planned Flag',l_planned_flag);
1116: wsh_debug_sv.log (l_module_name, 'Delivery Id',l_delivery_id);
1117: END IF;
1118:
1119: IF ( p_action IN ('CYCLE_COUNT','LAUNCH_PICK_RELEASE','AUTO_PACK','AUTO_PACK_MASTER',
1120: 'PACK','UNPACK','PACKING_WORKBENCH') ) THEN
1128: p_delivery_id => l_delivery_id,
1129: p_delivery_detail_id => x_entity_ids(l_counter),
1130: p_msg_display => 'N');
1131: IF l_debug_on THEN
1132: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1133: END IF;
1134: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
1135: IF ( l_source_code = 'WSH' and l_cnt_flag = 'N' ) THEN
1136: l_entity_ids(l_entity_ids.COUNT + 1) := x_entity_ids(l_counter);
1149: p_delivery_id => l_delivery_id,
1150: p_delivery_detail_id => x_entity_ids(l_counter),
1151: p_msg_display => 'N');
1152: IF l_debug_on THEN
1153: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1154: END IF;
1155: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) = 'TPW' ) THEN
1156: open det_cur(x_entity_ids(l_counter));
1157: Fetch det_cur into l_organization_id, l_source_code, l_cnt_flag;
1203: p_delivery_id => l_delivery_id,
1204: p_delivery_detail_id => x_entity_ids(l_counter),
1205: p_msg_display => 'N');
1206: IF l_debug_on THEN
1207: wsh_debug_sv.log (l_module_name, 'l_wh_type,l_return_status',l_wh_type||','||l_return_status);
1208: END IF;
1209: IF ( nvl(l_wh_type, FND_API.G_MISS_CHAR) in ('CMS','TPW')) THEN
1210: open det_cur(x_entity_ids(l_counter));
1211: Fetch det_cur into l_organization_id, l_source_code, l_cnt_flag;
1244: l_return_status := wsh_util_core.g_ret_sts_warning;
1245: END IF;
1246: x_return_status := l_return_status;
1247: IF l_debug_on THEN
1248: wsh_debug_sv.pop (l_module_name);
1249: END IF;
1250: EXCEPTION
1251: WHEN wsh_delivery_locked THEN
1252: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1250: EXCEPTION
1251: WHEN wsh_delivery_locked THEN
1252: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1253: IF l_debug_on THEN
1254: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_delivery_locked exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1255: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_delivery_locked');
1256: END IF;
1257: WHEN others THEN
1258: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1251: WHEN wsh_delivery_locked THEN
1252: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1253: IF l_debug_on THEN
1254: WSH_DEBUG_SV.logmsg(l_module_name,'wsh_delivery_locked exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
1255: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:wsh_delivery_locked');
1256: END IF;
1257: WHEN others THEN
1258: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1259: IF l_debug_on THEN
1256: END IF;
1257: WHEN others THEN
1258: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1259: IF l_debug_on THEN
1260: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1261: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1262: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1263: END IF;
1264: END Check_Actions_Allowed;
1257: WHEN others THEN
1258: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1259: IF l_debug_on THEN
1260: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1261: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1262: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1263: END IF;
1264: END Check_Actions_Allowed;
1265:
1258: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1259: IF l_debug_on THEN
1260: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,
1261: WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1262: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1263: END IF;
1264: END Check_Actions_Allowed;
1265:
1266: END WSH_DELIVERY_UTIL;