[Home] [Help]
354: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
355: --
356: IF l_debug_on IS NULL
357: THEN
358: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
359: END IF;
360: --
361: SAVEPOINT DELIVERY_ACTION_GRP;
362: --
386: END IF;
387: END IF;
388: --
389: IF l_debug_on THEN
390: wsh_debug_sv.push (l_module_name);
391: wsh_debug_sv.log (l_module_name,'action_code',p_action_prms.action_code);
392: wsh_debug_sv.log (l_module_name,'caller',p_action_prms.caller);
393: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
394: END IF;
387: END IF;
388: --
389: IF l_debug_on THEN
390: wsh_debug_sv.push (l_module_name);
391: wsh_debug_sv.log (l_module_name,'action_code',p_action_prms.action_code);
392: wsh_debug_sv.log (l_module_name,'caller',p_action_prms.caller);
393: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
394: END IF;
395:
388: --
389: IF l_debug_on THEN
390: wsh_debug_sv.push (l_module_name);
391: wsh_debug_sv.log (l_module_name,'action_code',p_action_prms.action_code);
392: wsh_debug_sv.log (l_module_name,'caller',p_action_prms.caller);
393: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
394: END IF;
395:
396: --Fix for bug 3636800
389: IF l_debug_on THEN
390: wsh_debug_sv.push (l_module_name);
391: wsh_debug_sv.log (l_module_name,'action_code',p_action_prms.action_code);
392: wsh_debug_sv.log (l_module_name,'caller',p_action_prms.caller);
393: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
394: END IF;
395:
396: --Fix for bug 3636800
397: --Initialize l_num_warning, l_num_error so that when dcp code re-runs this procedure,
453: --
454: l_delivery_rec_tab(i).client_id := p_rec_attr_tab(i).client_id; -- LSP PROJECT
455: --
456: IF l_debug_on THEN
457: wsh_debug_sv.log (l_module_name,'client_id',p_rec_attr_tab(i).client_id); -- LSP PROJECT
458: END IF;
459: --
460: IF p_action_prms.action_code = 'CONFIRM' THEN
461: --
465: l_ship_method_code_tab(i) := p_rec_attr_tab(i).ship_method_code;
466: l_client_id_tab(i) := p_rec_attr_tab(i).client_id; -- Modified R12.1.1 LSP PROJECT
467: --
468: IF l_debug_on THEN
469: wsh_debug_sv.log (l_module_name,' Ship Method Code ' || p_rec_attr_tab(i).ship_method_code );
470: END IF;
471: --
472: END IF;
473: --
471: --
472: END IF;
473: --
474: IF l_debug_on THEN
475: wsh_debug_sv.log (l_module_name,'delivery_id',p_rec_attr_tab(i).delivery_id);
476: wsh_debug_sv.log (l_module_name,'status_code',p_rec_attr_tab(i).status_code);
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
472: END IF;
473: --
474: IF l_debug_on THEN
475: wsh_debug_sv.log (l_module_name,'delivery_id',p_rec_attr_tab(i).delivery_id);
476: wsh_debug_sv.log (l_module_name,'status_code',p_rec_attr_tab(i).status_code);
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
473: --
474: IF l_debug_on THEN
475: wsh_debug_sv.log (l_module_name,'delivery_id',p_rec_attr_tab(i).delivery_id);
476: wsh_debug_sv.log (l_module_name,'status_code',p_rec_attr_tab(i).status_code);
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
474: IF l_debug_on THEN
475: wsh_debug_sv.log (l_module_name,'delivery_id',p_rec_attr_tab(i).delivery_id);
476: wsh_debug_sv.log (l_module_name,'status_code',p_rec_attr_tab(i).status_code);
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
482: wsh_debug_sv.log (l_module_name,'tms_interface_flag',p_rec_attr_tab(i).tms_interface_flag);
475: wsh_debug_sv.log (l_module_name,'delivery_id',p_rec_attr_tab(i).delivery_id);
476: wsh_debug_sv.log (l_module_name,'status_code',p_rec_attr_tab(i).status_code);
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
482: wsh_debug_sv.log (l_module_name,'tms_interface_flag',p_rec_attr_tab(i).tms_interface_flag);
483: --
477: wsh_debug_sv.log (l_module_name,'planned_flag',p_rec_attr_tab(i).planned_flag);
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
482: wsh_debug_sv.log (l_module_name,'tms_interface_flag',p_rec_attr_tab(i).tms_interface_flag);
483: --
484: wsh_debug_sv.log (l_module_name,'client_id',p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
485: END IF;
478: wsh_debug_sv.log (l_module_name,'organization_id',p_rec_attr_tab(i).organization_id);
479: wsh_debug_sv.log (l_module_name,'shipment_direction',p_rec_attr_tab(i).shipment_direction);
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
482: wsh_debug_sv.log (l_module_name,'tms_interface_flag',p_rec_attr_tab(i).tms_interface_flag);
483: --
484: wsh_debug_sv.log (l_module_name,'client_id',p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
485: END IF;
486: --
480: --OTM R12
481: wsh_debug_sv.log (l_module_name,'ignore_for_planning',p_rec_attr_tab(i).ignore_for_planning);
482: wsh_debug_sv.log (l_module_name,'tms_interface_flag',p_rec_attr_tab(i).tms_interface_flag);
483: --
484: wsh_debug_sv.log (l_module_name,'client_id',p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
485: END IF;
486: --
487: END IF;
488: --
486: --
487: END IF;
488: --
489: IF l_debug_on THEN
490: wsh_debug_sv.log (l_module_name,'delivery_id tab( ' || i || ')' ,l_delivery_id_tab(i));
491: END IF;
492: --
493: i := p_rec_attr_tab.NEXT(i);
494: END LOOP;
515: p_action => l_action_code,
516: x_return_status => l_return_status);
517: --
518: IF l_debug_on THEN
519: wsh_debug_sv.log(l_module_name,'Return Status After Calling set_validation_level',l_return_status);
520: END IF;
521: --
522: wsh_util_core.api_post_call(
523: p_return_status => l_return_status,
525: x_num_errors => l_num_errors);
526: --
527: IF WSH_ACTIONS_LEVELS.g_validation_level_tab(WSH_ACTIONS_LEVELS.C_ACTION_ENABLED_LVL) = 1 THEN
528: IF l_debug_on THEN
529: wsh_debug_sv.logmsg(l_module_name,'Calling IS_Action_Enabled');
530: END IF;
531:
532: WSH_DELIVERY_VALIDATIONS.Is_Action_Enabled(
533: p_dlvy_rec_tab => l_delivery_rec_tab,
539: x_error_ids => l_error_ids ,
540: x_valid_index_tab => l_valid_index_tab);
541:
542: IF l_debug_on THEN
543: wsh_debug_sv.log(l_module_name,'Return Status After Calling IS_Action_Enabled',l_return_status);
544: END IF;
545: --
546: wsh_util_core.api_post_call(
547: p_return_status => l_return_status,
571: x_return_status => l_return_status,
572: p_action => p_action_prms.action_code);
573: --
574: IF l_debug_on THEN
575: wsh_debug_sv.log(l_module_name,'Return Status After Calling Lock_Delivery',l_return_status);
576: END IF;
577: --
578: wsh_util_core.api_post_call(
579: p_return_status => l_return_status,
597: wsh_util_core.add_message(x_return_status,l_module_name);
598: END IF;
599: --
600: IF l_debug_on THEN
601: wsh_debug_sv.logmsg(l_module_name, 'WSH_DISABLE_ACTION');
602: END IF;
603: --
604: RAISE FND_API.G_EXC_ERROR;
605: --}
618: --
619: l_delivery_id_tab(i) := p_rec_attr_tab(i).delivery_id;
620: --
621: IF l_debug_on THEN
622: wsh_debug_sv.log (l_module_name,'delivery_id',l_delivery_id_tab(i));
623: END IF;
624: --
625: IF p_action_prms.action_code = 'CONFIRM' THEN
626: --
628: l_ship_method_code_tab(i) := p_rec_attr_tab(i).ship_method_code;
629: l_client_id_tab(i) := p_rec_attr_tab(i).client_id; -- Modified R12.1.1 LSP PROJECT
630: --
631: IF l_debug_on THEN
632: wsh_debug_sv.log (l_module_name,' Ship Method Code ' || p_rec_attr_tab(i).ship_method_code );
633: wsh_debug_sv.log (l_module_name,' Organization_Id ' || p_rec_attr_tab(i).organization_id );
634: wsh_debug_sv.log (l_module_name,' Client_Id ' || p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
635:
636: END IF;
629: l_client_id_tab(i) := p_rec_attr_tab(i).client_id; -- Modified R12.1.1 LSP PROJECT
630: --
631: IF l_debug_on THEN
632: wsh_debug_sv.log (l_module_name,' Ship Method Code ' || p_rec_attr_tab(i).ship_method_code );
633: wsh_debug_sv.log (l_module_name,' Organization_Id ' || p_rec_attr_tab(i).organization_id );
634: wsh_debug_sv.log (l_module_name,' Client_Id ' || p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
635:
636: END IF;
637: --
630: --
631: IF l_debug_on THEN
632: wsh_debug_sv.log (l_module_name,' Ship Method Code ' || p_rec_attr_tab(i).ship_method_code );
633: wsh_debug_sv.log (l_module_name,' Organization_Id ' || p_rec_attr_tab(i).organization_id );
634: wsh_debug_sv.log (l_module_name,' Client_Id ' || p_rec_attr_tab(i).client_id); -- Modified R12.1.1 LSP PROJECT
635:
636: END IF;
637: --
638: END IF;
661: x_sc_rule_name => x_defaults_rec.sc_rule_name
662: );
663: --
664: IF l_debug_on THEN
665: wsh_debug_sv.log(l_module_name,'Return Status After Calling Get_Delivery_Defaults',l_return_status);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
662: );
663: --
664: IF l_debug_on THEN
665: wsh_debug_sv.log(l_module_name,'Return Status After Calling Get_Delivery_Defaults',l_return_status);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
663: --
664: IF l_debug_on THEN
665: wsh_debug_sv.log(l_module_name,'Return Status After Calling Get_Delivery_Defaults',l_return_status);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
664: IF l_debug_on THEN
665: wsh_debug_sv.log(l_module_name,'Return Status After Calling Get_Delivery_Defaults',l_return_status);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
665: wsh_debug_sv.log(l_module_name,'Return Status After Calling Get_Delivery_Defaults',l_return_status);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
666: wsh_debug_sv.log(l_module_name,' Default AutoIntransit_Flag ',x_defaults_rec.autointransit_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
674: wsh_debug_sv.log(l_module_name,' DI flag ',x_defaults_rec.defer_interface_flag);
667: wsh_debug_sv.log(l_module_name,' Default Autoclose_flag ',x_defaults_rec.autoclose_flag);
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
674: wsh_debug_sv.log(l_module_name,' DI flag ',x_defaults_rec.defer_interface_flag);
675:
668: wsh_debug_sv.log(l_module_name,' Default report_set_id ',x_defaults_rec.report_set_id);
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
674: wsh_debug_sv.log(l_module_name,' DI flag ',x_defaults_rec.defer_interface_flag);
675:
676: END IF;
669: wsh_debug_sv.log(l_module_name,' Default report_set_name ',x_defaults_rec.report_set_name);
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
674: wsh_debug_sv.log(l_module_name,' DI flag ',x_defaults_rec.defer_interface_flag);
675:
676: END IF;
677: --
670: wsh_debug_sv.log(l_module_name,' Default ship_method_name ',x_defaults_rec.ship_method_name);
671: wsh_debug_sv.log(l_module_name,' Sc Rule ',x_defaults_rec.sc_rule_id);
672: wsh_debug_sv.log(l_module_name,' Sc RuleName ',x_defaults_rec.sc_rule_name);
673: wsh_debug_sv.log(l_module_name,' BOL ',x_defaults_rec.ac_bol_flag);
674: wsh_debug_sv.log(l_module_name,' DI flag ',x_defaults_rec.defer_interface_flag);
675:
676: END IF;
677: --
678: wsh_util_core.api_post_call(
697: x_trip_rows => x_defaults_rec.trip_id_tab,
698: x_return_status => l_return_status);
699: --
700: IF l_debug_on THEN
701: wsh_debug_sv.log(l_module_name,'Return Status After Calling check_unassign_trip',l_return_status);
702: END IF;
703: --
704: wsh_util_core.api_post_call(
705: p_return_status => l_return_status,
713: FND_MESSAGE.SET_NAME('WSH', 'WSH_DISABLE_ACTION_WARN');
714: x_return_status := wsh_util_core.g_ret_sts_warning;
715: wsh_util_core.add_message(x_return_status,l_module_name);
716: IF l_debug_on THEN
717: wsh_debug_sv.logmsg(l_module_name, 'WSH_DISABLE_ACTION_WARN');
718: wsh_debug_sv.log(l_module_name, 'x_delivery_out_rec.valid_ids_tab count is', l_valid_ids_tab.count);
719: END IF;
720: --
721: IF p_action_prms.caller IN ('WSH_FSTRX', 'WSH_TRCON') THEN
714: x_return_status := wsh_util_core.g_ret_sts_warning;
715: wsh_util_core.add_message(x_return_status,l_module_name);
716: IF l_debug_on THEN
717: wsh_debug_sv.logmsg(l_module_name, 'WSH_DISABLE_ACTION_WARN');
718: wsh_debug_sv.log(l_module_name, 'x_delivery_out_rec.valid_ids_tab count is', l_valid_ids_tab.count);
719: END IF;
720: --
721: IF p_action_prms.caller IN ('WSH_FSTRX', 'WSH_TRCON') THEN
722: x_delivery_out_rec.selection_issue_flag := 'Y';
735:
736: l_caller_module := SUBSTR(p_action_prms.caller,1,3);
737: --
738: IF l_debug_on THEN
739: wsh_debug_sv.log (l_module_name,'l_caller_module : '||l_caller_module);
740: wsh_debug_sv.log (l_module_name,'p_action_prms.pickup_loc_id : '||p_action_prms.pickup_loc_id);
741: wsh_debug_sv.log (l_module_name,'p_action_prms.dropoff_loc_id : '||p_action_prms.dropoff_loc_id);
742: wsh_debug_sv.log (l_module_name,'p_action_prms.ship_method_code : '||p_action_prms.ship_method_code);
743: END IF;
736: l_caller_module := SUBSTR(p_action_prms.caller,1,3);
737: --
738: IF l_debug_on THEN
739: wsh_debug_sv.log (l_module_name,'l_caller_module : '||l_caller_module);
740: wsh_debug_sv.log (l_module_name,'p_action_prms.pickup_loc_id : '||p_action_prms.pickup_loc_id);
741: wsh_debug_sv.log (l_module_name,'p_action_prms.dropoff_loc_id : '||p_action_prms.dropoff_loc_id);
742: wsh_debug_sv.log (l_module_name,'p_action_prms.ship_method_code : '||p_action_prms.ship_method_code);
743: END IF;
744: --
737: --
738: IF l_debug_on THEN
739: wsh_debug_sv.log (l_module_name,'l_caller_module : '||l_caller_module);
740: wsh_debug_sv.log (l_module_name,'p_action_prms.pickup_loc_id : '||p_action_prms.pickup_loc_id);
741: wsh_debug_sv.log (l_module_name,'p_action_prms.dropoff_loc_id : '||p_action_prms.dropoff_loc_id);
742: wsh_debug_sv.log (l_module_name,'p_action_prms.ship_method_code : '||p_action_prms.ship_method_code);
743: END IF;
744: --
745:
738: IF l_debug_on THEN
739: wsh_debug_sv.log (l_module_name,'l_caller_module : '||l_caller_module);
740: wsh_debug_sv.log (l_module_name,'p_action_prms.pickup_loc_id : '||p_action_prms.pickup_loc_id);
741: wsh_debug_sv.log (l_module_name,'p_action_prms.dropoff_loc_id : '||p_action_prms.dropoff_loc_id);
742: wsh_debug_sv.log (l_module_name,'p_action_prms.ship_method_code : '||p_action_prms.ship_method_code);
743: END IF;
744: --
745:
746: i := p_rec_attr_tab.FIRST;
755:
756: END IF;
757: --
758: IF l_debug_on THEN
759: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp index '|| i);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
756: END IF;
757: --
758: IF l_debug_on THEN
759: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp index '|| i);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
757: --
758: IF l_debug_on THEN
759: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp index '|| i);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
758: IF l_debug_on THEN
759: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp index '|| i);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
759: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp index '|| i);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
760: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_id '|| l_rec_attr_tab_temp(i).delivery_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
761: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp name '|| l_rec_attr_tab_temp(i).name);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
769: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ship_method_code '|| l_rec_attr_tab_temp(i).ship_method_code);
762: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp status_code '|| l_rec_attr_tab_temp(i).status_code);
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
769: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ship_method_code '|| l_rec_attr_tab_temp(i).ship_method_code);
770: END IF;
763: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp planned_flag '|| l_rec_attr_tab_temp(i).planned_flag);
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
769: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ship_method_code '|| l_rec_attr_tab_temp(i).ship_method_code);
770: END IF;
771: --
764: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp organization_id '|| l_rec_attr_tab_temp(i).organization_id);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
769: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ship_method_code '|| l_rec_attr_tab_temp(i).ship_method_code);
770: END IF;
771: --
772: i := p_rec_attr_tab.NEXT(i);
765: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp customer_id '|| l_rec_attr_tab_temp(i).customer_id);
766: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp delivery_type '|| l_rec_attr_tab_temp(i).delivery_type);
767: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp initial_pickup_location_id '|| l_rec_attr_tab_temp(i).initial_pickup_location_id);
768: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ultimate_dropoff_location_id '|| l_rec_attr_tab_temp(i).ultimate_dropoff_location_id);
769: wsh_debug_sv.log (l_module_name,'l_rec_attr_tab_temp ship_method_code '|| l_rec_attr_tab_temp(i).ship_method_code);
770: END IF;
771: --
772: i := p_rec_attr_tab.NEXT(i);
773: END LOOP;
773: END LOOP;
774: i := 0;
775: --
776: IF l_debug_on THEN
777: wsh_debug_sv.log (l_module_name,'Calling validate_constraint_main ');
778: END IF;
779: --
780:
781: WSH_FTE_COMP_CONSTRAINT_PKG.validate_constraint_main(
810: x_return_status => l_return_status);
811:
812:
813: IF l_debug_on THEN
814: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_main',l_return_status);
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
811:
812:
813: IF l_debug_on THEN
814: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_main',l_return_status);
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
812:
813: IF l_debug_on THEN
814: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_main',l_return_status);
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
820: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
813: IF l_debug_on THEN
814: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_main',l_return_status);
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
820: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
821: END IF;
814: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_main',l_return_status);
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
820: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
821: END IF;
822: --
815: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
820: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
821: END IF;
822: --
823:
816: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
817: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
818: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
819: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
820: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
821: END IF;
822: --
823:
824: IF l_return_status=wsh_util_core.g_ret_sts_error THEN
825: --fix l_rec_attr_tab to have only successful records
826: l_cc_count_success:=1;
827:
828: IF l_debug_on THEN
829: wsh_debug_sv.log(l_module_name,'p_rec_attr_tab.count before removing failed lines',p_rec_attr_tab.COUNT);
830: END IF;
831:
832: IF l_cc_failed_records.COUNT = 0 AND p_rec_attr_tab.COUNT>0 THEN
833: l_return_status := wsh_util_core.g_ret_sts_success;
860: END LOOP;
861: --
862: IF l_debug_on
863: THEN
864: WSH_DEBUG_SV.logmsg(l_module_name,'Value of ctrl rec After constraints check');
865: END IF;
866:
867: --bsadri for assign-trip, if one line fails, then fail all lines {
868: IF l_action_code = 'ASSIGN-TRIP'
876: IF l_delivery_id_tab_t.COUNT>0 THEN
877: l_delivery_id_tab:=l_delivery_id_tab_t;
878: ELSE
879: IF l_debug_on THEN
880: wsh_debug_sv.logmsg(l_module_name,'all lines errored in compatibility check');
881: END IF;
882: wsh_util_core.api_post_call(
883: p_return_status => l_return_status,
884: x_num_warnings => l_num_warnings,
886:
887: END IF;
888:
889: IF l_debug_on THEN
890: wsh_debug_sv.log(l_module_name,'l_delivery_id_tab.count before removing failed lines',l_delivery_id_tab.COUNT);
891: END IF;
892: END IF;
893:
894: ELSIF l_return_status=wsh_util_core.g_ret_sts_unexp_error THEN
923: --Bugfix 4070732 {
924: IF upper(WSH_UTIL_CORE.G_START_OF_SESSION_API) = upper(l_api_session_name) THEN
925: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
926: IF l_debug_on THEN
927: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
928: END IF;
929:
930: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
931: x_return_status => x_return_status);
930: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
931: x_return_status => x_return_status);
932:
933: IF l_debug_on THEN
934: WSH_DEBUG_SV.log(l_module_name,'x_return_status',x_return_status);
935: END IF;
936:
937: END IF;
938: END IF;
939: --}
940: -- End of bug 4070732
941:
942: IF l_debug_on THEN
943: wsh_debug_sv.logmsg(l_module_name, 'Returning back to the Form');
944: WSH_DEBUG_SV.pop(l_module_name);
945: END IF;
946: RETURN; -- Non-Generic Actions.
947: END IF;
940: -- End of bug 4070732
941:
942: IF l_debug_on THEN
943: wsh_debug_sv.logmsg(l_module_name, 'Returning back to the Form');
944: WSH_DEBUG_SV.pop(l_module_name);
945: END IF;
946: RETURN; -- Non-Generic Actions.
947: END IF;
948: --
978: FND_MESSAGE.SET_TOKEN('ACTION_CODE' , p_action_prms.action_code);
979: l_return_status := wsh_util_core.g_ret_sts_error;
980: wsh_util_core.add_message(l_return_status,l_module_name);
981: IF l_debug_on THEN
982: wsh_debug_sv.log (l_module_name,'Trip_id or Trip_name is required for this action');
983: END IF;
984: RAISE FND_API.G_EXC_ERROR;
985: END IF;
986: END IF;
990: IF p_action_prms.action_code = 'GENERATE-ROUTING-RESPONSE' THEN
991: --
992: --
993: IF l_debug_on THEN
994: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERY_ACTIONS.generate_routing_response',WSH_DEBUG_SV.C_PROC_LEVEL);
995: END IF;
996: --
997: WSH_ROUTING_RESPONSE_PKG.GenerateRoutingResponse
998: (
1002: );
1003:
1004: --
1005: IF l_debug_on THEN
1006: wsh_debug_sv.log(l_module_name,'Return Status After Calling generate_routing_response',l_return_status);
1007: END IF;
1008: --
1009: wsh_util_core.api_post_call(
1010: p_return_status => l_return_status,
1019: p_del_rows => l_delivery_id_tab,
1020: x_return_status => l_return_status);
1021: --
1022: IF l_debug_on THEN
1023: wsh_debug_sv.log(l_module_name,'Return Status After Calling Plan',l_return_status);
1024: END IF;
1025: --
1026: wsh_util_core.api_post_call(
1027: p_return_status => l_return_status,
1035: p_del_rows => l_delivery_id_tab,
1036: x_return_status => l_return_status);
1037: --
1038: IF l_debug_on THEN
1039: wsh_debug_sv.log(l_module_name,'Return Status After Calling Unplan',l_return_status);
1040: END IF;
1041: --
1042: wsh_util_core.api_post_call(
1043: p_return_status => l_return_status,
1051: p_del_rows => l_delivery_id_tab,
1052: x_return_status => l_return_status);
1053: --
1054: IF l_debug_on THEN
1055: wsh_debug_sv.log(l_module_name,'Return Status After Calling firm',l_return_status);
1056: END IF;
1057: --
1058: wsh_util_core.api_post_call(
1059: p_return_status => l_return_status,
1068: p_action_code => p_action_prms.action_code,
1069: x_return_status => l_return_status);
1070: --
1071: IF l_debug_on THEN
1072: wsh_debug_sv.log(l_module_name,'Return Status After Calling change_ignoreplan_status ',l_return_status);
1073: END IF;
1074: --
1075: wsh_util_core.api_post_call(
1076: p_return_status => l_return_status,
1088: x_request_ids => x_delivery_out_rec.result_id_tab,
1089: x_return_status => l_return_status);
1090: --
1091: IF l_debug_on THEN
1092: wsh_debug_sv.log(l_module_name,'Return Status After Calling Launch_Pick_Release',l_return_status);
1093: END IF;
1094: --
1095: wsh_util_core.api_post_call(
1096: p_return_status => l_return_status,
1108: x_return_status => l_return_status,
1109: p_auto_pack_ship => 'PS');
1110: --
1111: IF l_debug_on THEN
1112: wsh_debug_sv.log(l_module_name,'Return Status After Calling Launch_Pick_Release',l_return_status);
1113: END IF;
1114: --
1115: wsh_util_core.api_post_call(
1116: p_return_status => l_return_status,
1128: x_return_status => l_return_status,
1129: p_auto_pack_ship => 'SC');
1130: --
1131: IF l_debug_on THEN
1132: wsh_debug_sv.log(l_module_name,'Return Status After Calling Launch_Pick_Release',l_return_status);
1133: END IF;
1134: --
1135: wsh_util_core.api_post_call(
1136: p_return_status => l_return_status,
1146: p_report_set_name => p_action_prms.report_set_name,
1147: x_return_status => l_return_status);
1148: --
1149: IF l_debug_on THEN
1150: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Report_Set',l_return_status);
1151: END IF;
1152: --
1153: wsh_util_core.api_post_call(
1154: p_return_status => l_return_status,
1166: FETCH c_delv_trip_id_cursor INTO l_dummy_doc_set_params(i).p_trip_id;
1167: EXIT WHEN c_delv_trip_id_cursor%NOTFOUND;
1168: --
1169: IF l_debug_on THEN
1170: WSH_DEBUG_SV.log(l_module_name, 'Trip Id : ', l_dummy_doc_set_params(i).p_trip_id );
1171: END IF;
1172: --
1173: END LOOP;
1174: CLOSE c_delv_trip_id_cursor;
1184: p_document_param_info => l_dummy_doc_set_params,
1185: x_return_status => l_return_status);
1186: --
1187: IF l_debug_on THEN
1188: wsh_debug_sv.log(l_module_name,'Return Status After Calling Print_Document_Sets',l_return_status);
1189: END IF;
1190: --
1191: wsh_util_core.api_post_call(
1192: p_return_status => l_return_status,
1210: p_update_flag => p_action_prms.override_flag,
1211: x_return_status => l_return_status);
1212: --
1213: IF l_debug_on THEN
1214: wsh_debug_sv.log(l_module_name,'Return Status After Calling Delivery_Weight_Volume',l_return_status);
1215: END IF;
1216: --
1217: wsh_util_core.api_post_call(
1218: p_return_status => l_return_status,
1255: p_pack_cont_flag => 'N',
1256: x_cont_inst_tab => x_delivery_out_rec.result_id_tab);
1257: --
1258: IF l_debug_on THEN
1259: wsh_debug_sv.log(l_module_name,'Return Status After Calling Auto_Pack for Action Auto_Pack',l_return_status);
1260: END IF;
1261: --
1262: wsh_util_core.api_post_call(
1263: p_return_status => l_return_status,
1295: p_pack_cont_flag => 'Y',
1296: x_cont_inst_tab => x_delivery_out_rec.result_id_tab);
1297: --
1298: IF l_debug_on THEN
1299: wsh_debug_sv.log(l_module_name,'Return Status After Calling Auto_Pack for Action Auto_Pack_Master',l_return_status);
1300: END IF;
1301: --
1302: wsh_util_core.api_post_call(
1303: p_return_status => l_return_status,
1312: p_del_rows => l_delivery_id_tab,
1313: x_return_status => l_return_status);
1314: --
1315: IF l_debug_on THEN
1316: wsh_debug_sv.log(l_module_name,'Return Status After Calling Generate_Loading_Seq',l_return_status);
1317: END IF;
1318: --
1319: wsh_util_core.api_post_call(
1320: p_return_status => l_return_status,
1330: x_parent_trip_id => x_delivery_out_rec.valid_ids_tab(1),
1331: x_return_status => l_return_status);
1332:
1333: IF l_debug_on THEN
1334: wsh_debug_sv.log(l_module_name,'Return Status After Calling WSH_DELIVERY_AUTOCREATE.Autocreate_Consol_Delivery',l_return_status);
1335: END IF;
1336: --
1337: wsh_util_core.api_post_call(
1338: p_return_status => l_return_status,
1360: OPEN c_unconfirmed_del_exist(l_delivery_id_tab(1));
1361: FETCH c_unconfirmed_del_exist into l_unconfirmed_del_exist;
1362:
1363: IF l_debug_on THEN
1364: wsh_debug_sv.log(l_module_name,'l_unconfirmed_del_exist : ',l_unconfirmed_del_exist);
1365: END IF;
1366: IF l_unconfirmed_del_exist IS NULL THEN
1367:
1368: DECLARE
1374: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
1375: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
1376: x_return_status := l_return_status;
1377: IF l_debug_on THEN
1378: WSH_DEBUG_SV.pop(l_module_name,'get_global_parameters failed');
1379: END IF;
1380: RETURN;
1381: END IF;
1382:
1384: FND_MESSAGE.SET_NAME('WSH','WSH_SC_SM_REQUIRED');
1385: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1386: wsh_util_core.add_message(x_return_status,l_module_name);
1387: IF l_debug_on THEN
1388: WSH_DEBUG_SV.pop(l_module_name,'ship method is required');
1389: END IF;
1390: RETURN;
1391: END IF;
1392: END;
1466: p_report_set_name => p_action_prms.report_set_name,
1467: x_return_status => l_return_status);
1468: --
1469: IF l_debug_on THEN
1470: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Report_Set',l_return_status);
1471: END IF;
1472: --
1473: wsh_util_core.api_post_call(
1474: p_return_status => l_return_status,
1518: x_return_status => l_return_status);
1519: END IF;
1520: --
1521: IF l_debug_on THEN
1522: wsh_debug_sv.log(l_module_name,'Return Status After Calling Confirm_Delivery',l_return_status);
1523: END IF;
1524: --
1525: wsh_util_core.api_post_call(
1526: p_return_status => l_return_status,
1532: -- Bug#5864517: Needs to call Print_Label API irrespective of p_intransit_flag and p_close_flag
1533: -- flag values.
1534: --
1535: IF l_debug_on THEN
1536: WSH_DEBUG_SV.log(l_module_name,'Calling WSH_UTIL_CORE.Print_Label');
1537: END IF;
1538:
1539: WSH_UTIL_CORE.Print_Label(
1540: p_stop_ids => l_dummy_id_tab,
1541: p_delivery_ids => l_delivery_id_tab,
1542: x_return_status => l_return_status);
1543: --
1544: IF l_debug_on THEN
1545: wsh_debug_sv.log(l_module_name,'Return Status After Calling Print_Label',l_return_status);
1546: END IF;
1547: --
1548: wsh_util_core.api_post_call(
1549: p_return_status => l_return_status,
1562: p_actual_date => NULL,
1563: x_return_status => l_return_status);
1564: --
1565: IF l_debug_on THEN
1566: wsh_debug_sv.log(l_module_name,'Return Status After Calling Change_Status',l_return_status);
1567: END IF;
1568: --
1569: wsh_util_core.api_post_call(
1570: p_return_status => l_return_status,
1580: p_trip_name => p_action_prms.trip_name,
1581: x_return_status => l_return_status);
1582: --
1583: IF l_debug_on THEN
1584: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Trip_Name',l_return_status);
1585: END IF;
1586: --
1587: wsh_util_core.api_post_call(
1588: p_return_status => l_return_status,
1599: p_action => p_action_prms.action_code,
1600: x_return_status => l_return_status);
1601: --
1602: IF l_debug_on THEN
1603: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Trip_Status',l_return_status);
1604: END IF;
1605: --
1606: wsh_util_core.api_post_call(
1607: p_return_status => l_return_status,
1618: x_return_status => l_return_status,
1619: p_isWshLocation => l_isWshLocation);
1620: --
1621: IF l_debug_on THEN
1622: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Location',l_return_status);
1623: END IF;
1624: --
1625: wsh_util_core.api_post_call(
1626: p_return_status => l_return_status,
1633: x_return_status => l_return_status,
1634: p_isWshLocation => l_isWshLocation);
1635: --
1636: IF l_debug_on THEN
1637: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Location',l_return_status);
1638: END IF;
1639: --
1640: wsh_util_core.api_post_call(
1641: p_return_status => l_return_status,
1657: p_planned_dep_date => NULL, -- not needed
1658: x_return_status => l_return_status);
1659: --
1660: IF l_debug_on THEN
1661: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Stop_Name for pickup',l_return_status);
1662: END IF;
1663: --
1664: wsh_util_core.api_post_call(
1665: p_return_status => l_return_status,
1677: p_planned_dep_date => NULL, -- not needed
1678: x_return_status => l_return_status);
1679: --
1680: IF l_debug_on THEN
1681: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Stop_Name for drop off',l_return_status);
1682: END IF;
1683: --
1684: wsh_util_core.api_post_call(
1685: p_return_status => l_return_status,
1706: p_status_code => NVL(p_action_prms.pickup_stop_status, 'OP'),
1707: x_return_status => l_return_status);
1708: --
1709: IF l_debug_on THEN
1710: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Sequence_Number',l_return_status);
1711: END IF;
1712: --
1713: wsh_util_core.api_post_call(
1714: p_return_status => l_return_status,
1722: p_status_code => NVL(p_action_prms.dropoff_stop_status, 'OP'),
1723: x_return_status => l_return_status);
1724: --
1725: IF l_debug_on THEN
1726: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Sequence_Number',l_return_status);
1727: END IF;
1728: --
1729: wsh_util_core.api_post_call(
1730: p_return_status => l_return_status,
1769: --OTM R12, check for allowed assign trip
1770: IF (l_gc3_is_installed = 'Y' AND p_action_prms.caller <> 'FTE_TMS_INTEGRATION') THEN
1771:
1772: IF l_debug_on THEN
1773: WSH_DEBUG_SV.logmsg(l_module_name,'checking for include for planning trip');
1774: END IF;
1775:
1776: --check for include for planning, delivery should have same ignore for planning flag as trip
1777: --if any delivery is include for planning, cannot assign to trip
1778: i := p_rec_attr_tab.FIRST;
1779: WHILE i IS NOT NULL LOOP
1780:
1781: IF l_debug_on THEN
1782: WSH_DEBUG_SV.log(l_module_name,'ignore for planning for delivery ' || i, p_rec_attr_tab(i).ignore_for_planning);
1783: END IF;
1784:
1785: IF (NVL(p_rec_attr_tab(i).ignore_for_planning, 'N') = 'N') THEN
1786:
1784:
1785: IF (NVL(p_rec_attr_tab(i).ignore_for_planning, 'N') = 'N') THEN
1786:
1787: IF l_debug_on THEN
1788: WSH_DEBUG_SV.log(l_module_name,'GC3 IS INSTALLED, AND TRIP IS INCLUDE FOR PLANNING, CANNOT ASSIGN');
1789: END IF;
1790:
1791: FND_MESSAGE.SET_NAME('WSH', 'WSH_OTM_ASSIGN_TRIP');
1792:
1822: x_return_status => l_return_status
1823: );
1824: --
1825: IF l_debug_on THEN
1826: wsh_debug_sv.log(l_module_name,'Return Status After Calling Assign_Trip',l_return_status);
1827: END IF;
1828: --
1829: wsh_util_core.api_post_call(
1830: p_return_status => l_return_status,
1841: p_trip_name => p_action_prms.trip_name,
1842: x_return_status => l_return_status);
1843: --
1844: IF l_debug_on THEN
1845: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Trip_Name',l_return_status);
1846: END IF;
1847: --
1848: wsh_util_core.api_post_call(
1849: p_return_status => l_return_status,
1857: p_trip_id => l_trip_id,
1858: x_return_status => l_return_status);
1859: --
1860: IF l_debug_on THEN
1861: wsh_debug_sv.log(l_module_name,'Return Status After Calling Unassign_Trip',l_return_status);
1862: END IF;
1863: --
1864: wsh_util_core.api_post_call(
1865: p_return_status => l_return_status,
1880:
1881: IF (p_action_prms.caller <> 'FTE_TMS_INTEGRATION') THEN
1882:
1883: IF l_debug_on THEN
1884: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TP_RELEASE.CHANGE_IGNOREPLAN_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
1885: END IF;
1886:
1887: WSH_TP_RELEASE.change_ignoreplan_status
1888: (p_entity => 'DLVY',
1890: p_action_code => 'IGNORE_PLAN',
1891: x_return_status => l_return_status);
1892:
1893: IF l_debug_on THEN
1894: wsh_debug_sv.log(l_module_name,'Return Status After Calling change_ignoreplan_sttatus',l_return_status);
1895: END IF;
1896:
1897: WSH_UTIL_CORE.api_post_call(
1898: p_return_status => l_return_status,
1905: --table is default NULL, so if no delivery found then the table stay empty
1906: CLOSE c_get_delivery_id;
1907:
1908: IF l_debug_on THEN
1909: wsh_debug_sv.log(l_module_name,'l_trip_id', l_trip_id);
1910: wsh_debug_sv.log(l_module_name,'delivery id count', l_new_delivery_id_tab.COUNT);
1911: END IF;
1912:
1913: IF (l_new_delivery_id_tab.COUNT > 0) THEN
1906: CLOSE c_get_delivery_id;
1907:
1908: IF l_debug_on THEN
1909: wsh_debug_sv.log(l_module_name,'l_trip_id', l_trip_id);
1910: wsh_debug_sv.log(l_module_name,'delivery id count', l_new_delivery_id_tab.COUNT);
1911: END IF;
1912:
1913: IF (l_new_delivery_id_tab.COUNT > 0) THEN
1914:
1912:
1913: IF (l_new_delivery_id_tab.COUNT > 0) THEN
1914:
1915: IF l_debug_on THEN
1916: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG',WSH_DEBUG_SV.C_PROC_LEVEL);
1917: END IF;
1918:
1919: WSH_NEW_DELIVERIES_PVT.update_tms_interface_flag(
1920: p_delivery_id_tab => l_new_delivery_id_tab,
1921: p_tms_interface_flag_tab => l_new_interface_flag_tab,
1922: x_return_status => l_return_status);
1923:
1924: IF l_debug_on THEN
1925: wsh_debug_sv.log(l_module_name,'Return Status After Calling update_tms_interface_flag',l_return_status);
1926: END IF;
1927:
1928: WSH_UTIL_CORE.api_post_call(
1929: p_return_status => l_return_status,
1983: END IF;
1984: END LOOP;
1985:
1986: IF l_debug_on THEN
1987: wsh_debug_sv.log(l_module_name,'l_delivery_id_tab_temp count ',l_delivery_id_tab_temp.COUNT);
1988: END IF;
1989:
1990: /* J TP Release */
1991: WSH_TRIPS_ACTIONS.autocreate_trip_multi( p_del_rows => l_delivery_id_tab_temp,
1993: x_trip_names => l_trip_names,
1994: x_return_status => l_return_status);
1995:
1996: IF l_debug_on THEN
1997: wsh_debug_sv.log(l_module_name,'return from autocreate_trip_multi '
1998: ,l_return_status);
1999: END IF;
2000:
2001: --set the ship method to null if group rec from constraint validation has this as 'N'
2008: END LOOP;
2009: END IF;
2010:
2011: IF l_debug_on THEN
2012: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2013: IF (x_delivery_out_rec.result_id_tab.count > 0) THEN
2014: wsh_debug_sv.log(l_module_name,'l_trip_id ', x_delivery_out_rec.result_id_tab(1));
2015: ELSE
2016: wsh_debug_sv.log(l_module_name,'l_trip_id ', 'not created');
2010:
2011: IF l_debug_on THEN
2012: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2013: IF (x_delivery_out_rec.result_id_tab.count > 0) THEN
2014: wsh_debug_sv.log(l_module_name,'l_trip_id ', x_delivery_out_rec.result_id_tab(1));
2015: ELSE
2016: wsh_debug_sv.log(l_module_name,'l_trip_id ', 'not created');
2017: END IF;
2018: IF (l_trip_names.count > 0) THEN
2012: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2013: IF (x_delivery_out_rec.result_id_tab.count > 0) THEN
2014: wsh_debug_sv.log(l_module_name,'l_trip_id ', x_delivery_out_rec.result_id_tab(1));
2015: ELSE
2016: wsh_debug_sv.log(l_module_name,'l_trip_id ', 'not created');
2017: END IF;
2018: IF (l_trip_names.count > 0) THEN
2019: wsh_debug_sv.log(l_module_name,'l_trip_name ',l_trip_names(1));
2020: ELSE
2015: ELSE
2016: wsh_debug_sv.log(l_module_name,'l_trip_id ', 'not created');
2017: END IF;
2018: IF (l_trip_names.count > 0) THEN
2019: wsh_debug_sv.log(l_module_name,'l_trip_name ',l_trip_names(1));
2020: ELSE
2021: wsh_debug_sv.log(l_module_name,'l_trip_name ', 'not created');
2022: END IF;
2023: wsh_debug_sv.log(l_module_name,'l_return_status after calling autocreate_trip in comp ',l_return_status);
2017: END IF;
2018: IF (l_trip_names.count > 0) THEN
2019: wsh_debug_sv.log(l_module_name,'l_trip_name ',l_trip_names(1));
2020: ELSE
2021: wsh_debug_sv.log(l_module_name,'l_trip_name ', 'not created');
2022: END IF;
2023: wsh_debug_sv.log(l_module_name,'l_return_status after calling autocreate_trip in comp ',l_return_status);
2024: END IF;
2025:
2019: wsh_debug_sv.log(l_module_name,'l_trip_name ',l_trip_names(1));
2020: ELSE
2021: wsh_debug_sv.log(l_module_name,'l_trip_name ', 'not created');
2022: END IF;
2023: wsh_debug_sv.log(l_module_name,'l_return_status after calling autocreate_trip in comp ',l_return_status);
2024: END IF;
2025:
2026: /* J TP Release */
2027: IF x_delivery_out_rec.result_id_tab is not null AND x_delivery_out_rec.result_id_tab.COUNT>0 THEN
2057: x_delivery_out_rec.result_id_tab := l_cc_trip_id;
2058: l_return_status:=l_cc_return_status;
2059:
2060: IF l_debug_on THEN
2061: wsh_debug_sv.log(l_module_name,'x_delivery_out_rec.result_id_tab.COUNT after loop ',x_delivery_out_rec.result_id_tab.COUNT);
2062: END IF;
2063:
2064: ELSE
2065: /* J TP Release */
2070:
2071: END IF;
2072: --
2073: IF l_debug_on THEN
2074: wsh_debug_sv.log(l_module_name,'Return Status After Calling Autocreate_Trip',l_return_status);
2075: END IF;
2076: --
2077: wsh_util_core.api_post_call(
2078: p_return_status => l_return_status,
2119: END IF;
2120: END LOOP;
2121: --
2122: IF l_debug_on THEN
2123: wsh_debug_sv.log(l_module_name,'Number of delivs. in this group',l_delivery_id_tab_temp.COUNT);
2124: END IF;
2125: --
2126: l_DelivGrpRec.deliv_IDTab := l_delivery_id_tab_temp;
2127: l_delivGrpRec.max_Delivs := p_action_prms.maxDelivs;
2141: END LOOP;
2142: END IF;
2143: --
2144: IF l_debug_on THEN
2145: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2146: wsh_debug_sv.log(l_module_name, '# of trips', x_delivery_out_rec.result_id_tab.COUNT);
2147: wsh_debug_sv.log(l_module_name,'l_return_status after GroupDelivsIntoTrips',l_return_status);
2148: END IF;
2149: --
2142: END IF;
2143: --
2144: IF l_debug_on THEN
2145: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2146: wsh_debug_sv.log(l_module_name, '# of trips', x_delivery_out_rec.result_id_tab.COUNT);
2147: wsh_debug_sv.log(l_module_name,'l_return_status after GroupDelivsIntoTrips',l_return_status);
2148: END IF;
2149: --
2150: j := x_delivery_out_rec.result_id_tab.FIRST;
2143: --
2144: IF l_debug_on THEN
2145: wsh_debug_sv.log(l_module_name,'l_cc_upd_dlvy_ship_method ',l_cc_upd_dlvy_ship_method);
2146: wsh_debug_sv.log(l_module_name, '# of trips', x_delivery_out_rec.result_id_tab.COUNT);
2147: wsh_debug_sv.log(l_module_name,'l_return_status after GroupDelivsIntoTrips',l_return_status);
2148: END IF;
2149: --
2150: j := x_delivery_out_rec.result_id_tab.FIRST;
2151: WHILE j IS NOT NULL LOOP
2150: j := x_delivery_out_rec.result_id_tab.FIRST;
2151: WHILE j IS NOT NULL LOOP
2152: --{
2153: IF l_debug_on THEN
2154: wsh_debug_sv.log(l_module_name, 'Trip Name', x_delivery_out_rec.result_id_tab(j));
2155: END IF;
2156: --
2157: l_tripID := x_delivery_out_rec.result_id_tab(j);
2158: --
2189: --
2190: l_return_status:=l_cc_return_status;
2191: --
2192: IF l_debug_on THEN
2193: wsh_debug_sv.log(l_module_name,'Total number of trips',x_delivery_out_rec.result_id_tab.COUNT);
2194: END IF;
2195: --}
2196: ELSE
2197: --{
2195: --}
2196: ELSE
2197: --{
2198: IF l_debug_on THEN
2199: wsh_debug_sv.logmsg(l_module_name, 'No constraints, calling GroupDelivsIntoTrips');
2200: wsh_debug_sv.log(l_module_name, 'Number of delivs', l_delivery_id_tab.COUNT);
2201: END IF;
2202: --
2203: l_delivGrpRec.deliv_IDTab := l_delivery_id_tab;
2196: ELSE
2197: --{
2198: IF l_debug_on THEN
2199: wsh_debug_sv.logmsg(l_module_name, 'No constraints, calling GroupDelivsIntoTrips');
2200: wsh_debug_sv.log(l_module_name, 'Number of delivs', l_delivery_id_tab.COUNT);
2201: END IF;
2202: --
2203: l_delivGrpRec.deliv_IDTab := l_delivery_id_tab;
2204: l_delivGrpRec.max_Delivs := p_action_prms.maxDelivs;
2208: x_delOutRec => x_delivery_out_rec,
2209: x_return_status => l_return_status);
2210: --
2211: IF l_debug_on THEN
2212: wsh_debug_sv.log(l_module_name,'Total number of trips',x_delivery_out_rec.result_id_tab.COUNT);
2213: END IF;
2214: --}
2215: END IF;
2216: --
2214: --}
2215: END IF;
2216: --
2217: IF l_debug_on THEN
2218: wsh_debug_sv.log(l_module_name,'Return Status After GroupDelivsIntoTrips',l_return_status);
2219: END IF;
2220: --
2221: wsh_util_core.api_post_call(
2222: p_return_status => l_return_status,
2229: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2230: x_return_status := wsh_util_core.g_ret_sts_error;
2231: wsh_util_core.add_message(x_return_status,l_module_name);
2232: IF l_debug_on THEN
2233: wsh_debug_sv.log (l_module_name,'WSH_UI_MULTI_SELECTION');
2234: END IF;
2235: RAISE FND_API.G_EXC_ERROR;
2236: END IF;
2237: --
2249: --
2250: IF ( (l_standalone_mode = 'D' OR (l_standalone_mode = 'L' AND l_client_id IS NOT NULL)) AND ( p_action_prms.caller = 'WSH_PUB' )) THEN
2251: --{
2252: IF l_debug_on THEN
2253: wsh_debug_sv.log (l_module_name,'Action_type is', 'A');
2254: wsh_debug_sv.log (l_module_name,'Document_type is', 'SA');
2255: wsh_debug_sv.log (l_module_name,'Organization_id is', p_rec_attr_tab(1).organization_id);
2256: END IF;
2257:
2250: IF ( (l_standalone_mode = 'D' OR (l_standalone_mode = 'L' AND l_client_id IS NOT NULL)) AND ( p_action_prms.caller = 'WSH_PUB' )) THEN
2251: --{
2252: IF l_debug_on THEN
2253: wsh_debug_sv.log (l_module_name,'Action_type is', 'A');
2254: wsh_debug_sv.log (l_module_name,'Document_type is', 'SA');
2255: wsh_debug_sv.log (l_module_name,'Organization_id is', p_rec_attr_tab(1).organization_id);
2256: END IF;
2257:
2258: WSH_TRANSACTIONS_UTIL.Send_Document(
2251: --{
2252: IF l_debug_on THEN
2253: wsh_debug_sv.log (l_module_name,'Action_type is', 'A');
2254: wsh_debug_sv.log (l_module_name,'Document_type is', 'SA');
2255: wsh_debug_sv.log (l_module_name,'Organization_id is', p_rec_attr_tab(1).organization_id);
2256: END IF;
2257:
2258: WSH_TRANSACTIONS_UTIL.Send_Document(
2259: p_entity_id => l_delivery_id_tab(1),
2276: --}
2277: END IF;
2278: --
2279: IF l_debug_on THEN
2280: wsh_debug_sv.log(l_module_name,'Return Status After Calling Send_Document',l_return_status);
2281: END IF;
2282: --
2283: wsh_util_core.api_post_call(
2284: p_return_status => l_return_status,
2294: x_return_status := wsh_util_core.g_ret_sts_error;
2295: wsh_util_core.add_message(x_return_status,l_module_name);
2296: FND_MSG_PUB.ADD;
2297: IF l_debug_on THEN
2298: wsh_debug_sv.logmsg(l_module_name,'WSH_UI_MULTI_SELECTION');
2299: END IF;
2300: RAISE FND_API.G_EXC_ERROR;
2301: END IF;
2302:
2326: x_return_message => l_msg_data,
2327: x_return_status => l_return_status);
2328:
2329: IF l_debug_on THEN
2330: wsh_debug_sv.log(l_module_name,'Return Status After Calling Process_Carrier_Selection',l_return_status);
2331: END IF;
2332: --
2333: ELSE
2334: l_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
2345: FND_MESSAGE.SET_NAME('FTE', 'FTE_NOT_INSTALLED');
2346: x_return_status := wsh_util_core.g_ret_sts_error;
2347: wsh_util_core.add_message(x_return_status,l_module_name);
2348: IF l_debug_on THEN
2349: wsh_debug_sv.logmsg(l_module_name,'FTE_NOT_INSTALLED');
2350: END IF;
2351: RAISE FND_API.G_EXC_ERROR;
2352: END IF;
2353: --
2371: --add a message for the delivery that cannot be deleted.
2372: l_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
2373:
2374: IF l_debug_on THEN
2375: wsh_debug_sv.logmsg(l_module_name,'ERROR: delivery ' || l_delivery_id_tab(i) || ' cannot be deleted when it is not NS status');
2376: END IF;
2377:
2378: FND_MESSAGE.SET_NAME('WSH','WSH_OTM_DEL_DELETE_ERROR');
2379: FND_MESSAGE.SET_TOKEN('DEL_NAME',WSH_NEW_DELIVERIES_PVT.get_name(l_delivery_id_tab(i)));
2392: IF (l_new_delivery_id_tab.COUNT = 0) THEN
2393: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2394:
2395: IF l_debug_on THEN
2396: WSH_DEBUG_SV.log(l_module_name,'0 deliveries to delete');
2397: END IF;
2398:
2399: wsh_util_core.api_post_call(
2400: p_return_status => l_return_status,
2413: p_rows => l_delivery_id_tab,
2414: x_return_status => l_return_status);
2415: --
2416: IF l_debug_on THEN
2417: wsh_debug_sv.log(l_module_name,'Return Status After Calling Delete',l_return_status);
2418: END IF;
2419: --
2420: wsh_util_core.api_post_call(
2421: p_return_status => l_return_status,
2430: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2431: x_return_status := wsh_util_core.g_ret_sts_error;
2432: wsh_util_core.add_message(x_return_status,l_module_name);
2433: IF l_debug_on THEN
2434: wsh_debug_sv.log (l_module_name,'WSH_UI_MULTI_SELECTION');
2435: END IF;
2436: RAISE FND_API.G_EXC_ERROR;
2437: END IF;
2438: --
2450: p_description => p_action_prms.description,
2451: x_document_number => x_delivery_out_rec.packing_slip_number);
2452: --
2453: IF l_debug_on THEN
2454: wsh_debug_sv.log(l_module_name,'Return Status After Calling Insert_Row',l_return_status);
2455: END IF;
2456: --
2457: wsh_util_core.api_post_call(
2458: p_return_status => l_return_status,
2468: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2469: x_return_status := wsh_util_core.g_ret_sts_error;
2470: wsh_util_core.add_message(x_return_status,l_module_name);
2471: IF l_debug_on THEN
2472: wsh_debug_sv.log (l_module_name,'WSH_UI_MULTI_SELECTION');
2473: END IF;
2474: RAISE FND_API.G_EXC_ERROR;
2475: END IF;
2476: --
2490: FETCH c_dlvy_pack_slip_cur INTO l_dlvy_doc_seq_num;
2491: CLOSE c_dlvy_pack_slip_cur;
2492:
2493: IF l_debug_on THEN
2494: wsh_debug_sv.log(l_module_name, 'Delivery id', p_rec_attr_tab(i).delivery_id);
2495: wsh_debug_sv.log(l_module_name, 'Doc seq num', l_dlvy_doc_seq_num);
2496: END IF;
2497:
2498: /* IF p_rec_attr_tab.COUNT > 1 THEN
2491: CLOSE c_dlvy_pack_slip_cur;
2492:
2493: IF l_debug_on THEN
2494: wsh_debug_sv.log(l_module_name, 'Delivery id', p_rec_attr_tab(i).delivery_id);
2495: wsh_debug_sv.log(l_module_name, 'Doc seq num', l_dlvy_doc_seq_num);
2496: END IF;
2497:
2498: /* IF p_rec_attr_tab.COUNT > 1 THEN
2499: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2499: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2500: x_return_status := wsh_util_core.g_ret_sts_error;
2501: wsh_util_core.add_message(x_return_status,l_module_name);
2502: IF l_debug_on THEN
2503: wsh_debug_sv.log (l_module_name,'WSH_UI_MULTI_SELECTION');
2504: END IF;
2505: RAISE FND_API.G_EXC_ERROR;
2506: END IF;*/
2507:
2527: p_description => p_rec_attr_tab(i).DESCRIPTION,
2528: x_document_number => x_delivery_out_rec.packing_slip_number);
2529: --
2530: IF l_debug_on THEN
2531: wsh_debug_sv.log(l_module_name,'Return Status After Calling Insert_Row',l_return_status);
2532: END IF;
2533: --
2534: wsh_util_core.api_post_call(
2535: p_return_status => l_return_status,
2566: FND_MESSAGE.SET_NAME('WSH','WSH_UI_MULTI_SELECTION');
2567: x_return_status := wsh_util_core.g_ret_sts_error;
2568: wsh_util_core.add_message(x_return_status,l_module_name);
2569: IF l_debug_on THEN
2570: wsh_debug_sv.log (l_module_name,'WSH_UI_MULTI_SELECTION');
2571: END IF;
2572: RAISE FND_API.G_EXC_ERROR;
2573: END IF;
2574: --
2583: x_return_status := wsh_util_core.g_ret_sts_error;
2584: wsh_util_core.add_message(x_return_status,l_module_name);
2585: FND_MSG_PUB.ADD;
2586: IF l_debug_on THEN
2587: wsh_debug_sv.logmsg(l_module_name,'WSH_UI_MULTI_SELECTION');
2588: END IF;
2589: RAISE FND_API.G_EXC_ERROR;
2590: END IF;
2591:
2614: x_msg_count => l_msg_count,
2615: x_msg_data => l_msg_data);
2616: --
2617: IF l_debug_on THEN
2618: wsh_debug_sv.log(l_module_name,'Return Status from WSH_FTE_INTEGRATION.Rate_Delivery' ,l_return_status);
2619: END IF;
2620:
2621:
2622: IF p_action_prms.caller = 'WSH_DLMG' AND
2667: FND_MESSAGE.SET_NAME('FTE', 'FTE_NOT_INSTALLED');
2668: x_return_status := wsh_util_core.g_ret_sts_error;
2669: wsh_util_core.add_message(x_return_status,l_module_name);
2670: IF l_debug_on THEN
2671: wsh_debug_sv.logmsg(l_module_name,'FTE_NOT_INSTALLED');
2672: END IF;
2673: RAISE FND_API.G_EXC_ERROR;
2674: END IF;
2675:
2686: x_msg_data => l_msg_data );
2687:
2688:
2689: IF l_debug_on THEN
2690: wsh_debug_sv.log(l_module_name,'Return Status After Cancel Ship Method',l_return_status);
2691: END IF;
2692:
2693: wsh_util_core.api_post_call(
2694: p_return_status => l_return_status,
2707: p_event => p_action_prms.event,
2708: x_return_status => l_return_status);
2709:
2710: IF l_debug_on THEN
2711: wsh_debug_sv.log(l_module_name,'Return Status from WSH_NEW_DELIVERY_ACTIONS.Adjust_Planned_Flag',l_return_status);
2712: END IF;
2713:
2714: wsh_util_core.api_post_call(
2715: p_return_status => l_return_status,
2731: FETCH c_dlvy_pack_slip_cur INTO l_dlvy_doc_seq_num;
2732: CLOSE c_dlvy_pack_slip_cur;
2733:
2734: if l_debug_on then
2735: wsh_debug_sv.log(l_module_name, 'Doc seq num', l_dlvy_doc_seq_num);
2736: end if;
2737: IF l_dlvy_doc_seq_num IS NULL THEN
2738: --{
2739: --Pack slip does not exist. Call Group API for action Generate Pack Slip
2871: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(dlvy_leg_rec.trip_id));
2872: l_return_status := wsh_util_core.g_ret_sts_error;
2873: wsh_util_core.add_message(l_return_status,l_module_name);
2874: IF l_debug_on THEN
2875: wsh_debug_sv.log (l_module_name,'No Ship Method for the trip'||dlvy_leg_rec.trip_id);
2876: END IF;
2877: exit leg_loop;
2878: END IF;
2879: -- End of Bug 3311273
2878: END IF;
2879: -- End of Bug 3311273
2880:
2881: IF l_debug_on THEN
2882: wsh_debug_sv.log(l_module_name, 'Processing delivery leg', dlvy_leg_rec.delivery_leg_id);
2883: END IF;
2884:
2885: l_dleg_tab.delete;
2886: wsh_delivery_legs_pvt.populate_record(
2975: l_num_errors := l_num_errors + 1;
2976: l_return_status := wsh_util_core.g_ret_sts_error;
2977: wsh_util_core.add_message(l_return_status,l_module_name);
2978: IF l_debug_on THEN
2979: wsh_debug_sv.log (l_module_name,'WSH_NO_DELIVERY_LEG_FOUND');
2980: END IF;
2981: END IF;
2982: -- End of Bug 3311273
2983:
2985: --} loop for delivery
2986: END LOOP dlvy_loop;
2987:
2988: IF l_debug_on THEN
2989: wsh_debug_sv.log(l_module_name, 'result id tab count', x_delivery_out_rec.result_id_tab.count);
2990: END IF;
2991:
2992: IF l_submitted_docs > 0 THEN
2993: fnd_message.set_name('WSH', 'WSH_PRINT_BOL_REQUEST');
3002: FND_MESSAGE.SET_TOKEN('SUCC_COUNT',p_rec_attr_tab.count - l_num_errors );
3003: l_return_status := wsh_util_core.g_ret_sts_error;
3004: wsh_util_core.add_message(l_return_status,l_module_name);
3005: IF l_debug_on THEN
3006: wsh_debug_sv.log (l_module_name,'Error processing deliveries-'||l_num_errors);
3007: END IF;
3008: -- End of 3311273
3009: IF l_num_errors = p_rec_attr_tab.count THEN
3010: RAISE FND_API.G_EXC_ERROR;
3022: FND_MESSAGE.SET_TOKEN('ACT_CODE',p_action_prms.action_code );
3023: x_return_status := wsh_util_core.g_ret_sts_error;
3024: wsh_util_core.add_message(x_return_status,l_module_name);
3025: IF l_debug_on THEN
3026: wsh_debug_sv.log (l_module_name,'WSH_INVALID_ACTION_CODE');
3027: END IF;
3028: RAISE FND_API.G_EXC_ERROR;
3029: --
3030: END IF;
3029: --
3030: END IF;
3031: --
3032: IF l_debug_on THEN
3033: wsh_debug_sv.log(l_module_name, 'l_num_errors', l_num_errors);
3034: wsh_debug_sv.log(l_module_name, 'l_num_warnings', l_num_warnings);
3035: END IF;
3036:
3037:
3030: END IF;
3031: --
3032: IF l_debug_on THEN
3033: wsh_debug_sv.log(l_module_name, 'l_num_errors', l_num_errors);
3034: wsh_debug_sv.log(l_module_name, 'l_num_warnings', l_num_warnings);
3035: END IF;
3036:
3037:
3038: -- K LPN CONV. rv
3041: THEN
3042: --{
3043:
3044: IF l_debug_on THEN
3045: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS',WSH_DEBUG_SV.C_PROC_LEVEL);
3046: END IF;
3047: --
3048: WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS
3049: (
3052: x_out_rec => l_lpn_out_sync_comm_rec
3053: );
3054: --
3055: IF l_debug_on THEN
3056: WSH_DEBUG_SV.log(l_module_name, 'Return status after calling WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS', l_return_status);
3057: END IF;
3058: --
3059: WSH_UTIL_CORE.API_POST_CALL
3060: (
3071: --If profile is turned on.
3072: BEGIN
3073: --{
3074: IF l_debug_on THEN
3075: wsh_debug_sv.log(l_module_name, 'l_check_dcp', l_check_dcp);
3076: wsh_debug_sv.log(l_module_name, 'g_call_dcp_check', WSH_DCP_PVT.G_CALL_DCP_CHECK);
3077: END IF;
3078:
3079: IF NVL(l_check_dcp, -99) IN (1,2)
3072: BEGIN
3073: --{
3074: IF l_debug_on THEN
3075: wsh_debug_sv.log(l_module_name, 'l_check_dcp', l_check_dcp);
3076: wsh_debug_sv.log(l_module_name, 'g_call_dcp_check', WSH_DCP_PVT.G_CALL_DCP_CHECK);
3077: END IF;
3078:
3079: IF NVL(l_check_dcp, -99) IN (1,2)
3080: AND NVL(WSH_DCP_PVT.G_CALL_DCP_CHECK, 'Y') = 'Y'
3082: --{
3083: IF p_action_prms.action_code IN ('AUTO-PACK', 'CONFIRM') THEN
3084:
3085: IF l_debug_on THEN
3086: WSH_DEBUG_SV.LOGMSG(L_MODULE_NAME, 'CALLING DCP ');
3087: END IF;
3088:
3089: wsh_dcp_pvt.check_delivery(
3090: p_action_code => p_action_prms.action_code,
3095:
3096: EXCEPTION
3097: WHEN wsh_dcp_pvt.data_inconsistency_exception THEN
3098: if NOT l_debug_on OR l_debug_on is null then
3099: l_debug_on := wsh_debug_sv.is_debug_enabled;
3100: end if;
3101: IF l_debug_on THEN
3102: WSH_DEBUG_SV.logmsg(l_module_name,'data_inconsistency_exception');
3103: END IF;
3098: if NOT l_debug_on OR l_debug_on is null then
3099: l_debug_on := wsh_debug_sv.is_debug_enabled;
3100: end if;
3101: IF l_debug_on THEN
3102: WSH_DEBUG_SV.logmsg(l_module_name,'data_inconsistency_exception');
3103: END IF;
3104: ROLLBACK TO DELIVERY_ACTION_GRP;
3105: GOTO api_start;
3106: WHEN OTHERS THEN
3104: ROLLBACK TO DELIVERY_ACTION_GRP;
3105: GOTO api_start;
3106: WHEN OTHERS THEN
3107: IF l_debug_on THEN
3108: WSH_DEBUG_SV.logmsg(l_module_name,'When Others');
3109: END IF;
3110: null;
3111: --}
3112: END;
3112: END;
3113:
3114:
3115: IF l_debug_on THEN
3116: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3117: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3118: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3119: END IF;
3120:
3113:
3114:
3115: IF l_debug_on THEN
3116: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3117: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3118: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3119: END IF;
3120:
3121:
3114:
3115: IF l_debug_on THEN
3116: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3117: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3118: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3119: END IF;
3120:
3121:
3122: IF l_num_warnings > 0 THEN
3120:
3121:
3122: IF l_num_warnings > 0 THEN
3123: IF l_debug_on THEN
3124: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3125: END IF;
3126: RAISE WSH_UTIL_CORE.G_EXC_WARNING;
3127: ELSE
3128: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
3128: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
3129: END IF;
3130: --
3131: IF l_debug_on THEN
3132: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3133: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3134: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3135: END IF;
3136:
3129: END IF;
3130: --
3131: IF l_debug_on THEN
3132: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3133: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3134: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3135: END IF;
3136:
3137: -- Standard check of p_commit.
3130: --
3131: IF l_debug_on THEN
3132: WSH_DEBUG_SV.log(l_module_name, 'Return status ', l_return_status);
3133: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3134: WSH_DEBUG_SV.log(l_module_name, 'l_num_warnings', l_num_warnings);
3135: END IF;
3136:
3137: -- Standard check of p_commit.
3138: IF FND_API.To_Boolean( p_commit ) THEN
3143:
3144: l_reset_flags := FALSE;
3145:
3146: IF l_debug_on THEN
3147: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3148: END IF;
3149:
3150: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => l_reset_flags,
3151: x_return_status => l_return_status);
3150: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => l_reset_flags,
3151: x_return_status => l_return_status);
3152:
3153: IF l_debug_on THEN
3154: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3155: END IF;
3156:
3157: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR THEN
3158: RAISE FND_API.G_EXC_ERROR;
3176: --{
3177:
3178: IF FND_API.To_Boolean( p_commit ) THEN
3179: IF l_debug_on THEN
3180: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3181: END IF;
3182:
3183: WSH_UTIL_CORE.reset_stops_for_load_tender(p_reset_flags => TRUE,
3184: x_return_status => l_return_status);
3186: ELSE
3187:
3188:
3189: IF l_debug_on THEN
3190: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3191: END IF;
3192:
3193: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => TRUE,
3194: x_return_status => l_return_status);
3194: x_return_status => l_return_status);
3195: END IF;
3196:
3197: IF l_debug_on THEN
3198: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3199: END IF;
3200:
3201: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
3202: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR,
3211:
3212: --bug 4070732
3213: --
3214: IF l_debug_on THEN
3215: WSH_DEBUG_SV.log(l_module_name, 'before calling FND_MSG_PUB.Count_And_Get', l_num_warnings);
3216: END IF;
3217: FND_MSG_PUB.Count_And_Get
3218: (
3219: p_count => x_msg_count,
3221: p_encoded => FND_API.G_FALSE
3222: );
3223: --
3224: IF l_debug_on THEN
3225: WSH_DEBUG_SV.log(l_module_name, 'FND_MSG_PUB.Count_And_Get, count: ', x_msg_count);
3226: END IF;
3227: IF l_debug_on THEN
3228: WSH_DEBUG_SV.pop(l_module_name);
3229: END IF;
3224: IF l_debug_on THEN
3225: WSH_DEBUG_SV.log(l_module_name, 'FND_MSG_PUB.Count_And_Get, count: ', x_msg_count);
3226: END IF;
3227: IF l_debug_on THEN
3228: WSH_DEBUG_SV.pop(l_module_name);
3229: END IF;
3230: --
3231: EXCEPTION
3232: WHEN FND_API.G_EXC_ERROR THEN
3246: THEN
3247: --{
3248:
3249: IF l_debug_on THEN
3250: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS',WSH_DEBUG_SV.C_PROC_LEVEL);
3251: END IF;
3252: --
3253: WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS
3254: (
3257: x_out_rec => l_lpn_out_sync_comm_rec
3258: );
3259: --
3260: IF l_debug_on THEN
3261: WSH_DEBUG_SV.log(l_module_name, 'Return status after calling WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS', l_return_status);
3262: END IF;
3263: --
3264: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3265: x_return_status := l_return_status;
3276: --{
3277: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
3278: --{
3279: IF l_debug_on THEN
3280: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3281: END IF;
3282:
3283: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
3284: x_return_status => l_return_status);
3284: x_return_status => l_return_status);
3285:
3286:
3287: IF l_debug_on THEN
3288: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3289: END IF;
3290:
3291: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3292: x_return_status := l_return_status;
3305: p_data => x_msg_data,
3306: p_encoded => FND_API.G_FALSE
3307: );
3308: IF l_debug_on THEN
3309: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
3310: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
3311: END IF;
3312: --
3313: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3306: p_encoded => FND_API.G_FALSE
3307: );
3308: IF l_debug_on THEN
3309: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
3310: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
3311: END IF;
3312: --
3313: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3314: -- ROLLBACK TO DELIVERY_ACTION_GRP;
3327: THEN
3328: --{
3329:
3330: IF l_debug_on THEN
3331: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS',WSH_DEBUG_SV.C_PROC_LEVEL);
3332: END IF;
3333: --
3334: WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS
3335: (
3338: x_out_rec => l_lpn_out_sync_comm_rec
3339: );
3340: --
3341: IF l_debug_on THEN
3342: WSH_DEBUG_SV.log(l_module_name, 'Return status after calling WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS', l_return_status);
3343: END IF;
3344: --
3345: --}
3346: END IF;
3353: --{
3354: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
3355: --{
3356: IF l_debug_on THEN
3357: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3358: END IF;
3359:
3360: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
3361: x_return_status => l_return_status);
3361: x_return_status => l_return_status);
3362:
3363:
3364: IF l_debug_on THEN
3365: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3366: END IF;
3367:
3368: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3369: x_return_status := l_return_status;
3383: );
3384:
3385: --
3386: IF l_debug_on THEN
3387: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
3388: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
3389: END IF;
3390: --
3391: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
3384:
3385: --
3386: IF l_debug_on THEN
3387: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
3388: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
3389: END IF;
3390: --
3391: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
3392:
3396: END IF;
3397: --
3398:
3399: IF l_debug_on THEN
3400: WSH_DEBUG_SV.logmsg(l_module_name,' Raising: WSH_UTIL_CORE.G_EXC_WARNING');
3401: END IF;
3402: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
3403: --
3404: -- K LPN CONV. rv
3407: THEN
3408: --{
3409:
3410: IF l_debug_on THEN
3411: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS',WSH_DEBUG_SV.C_PROC_LEVEL);
3412: END IF;
3413: --
3414: WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS
3415: (
3418: x_out_rec => l_lpn_out_sync_comm_rec
3419: );
3420: --
3421: IF l_debug_on THEN
3422: WSH_DEBUG_SV.log(l_module_name, 'Return status after calling WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS', l_return_status);
3423: END IF;
3424: --
3425: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR, WSH_UTIL_CORE.G_RET_STS_ERROR)) THEN
3426: x_return_status := l_return_status;
3437: --{
3438: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
3439: --{
3440: IF l_debug_on THEN
3441: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3442: END IF;
3443:
3444: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => TRUE,
3445: x_return_status => l_return_status);
3445: x_return_status => l_return_status);
3446:
3447:
3448: IF l_debug_on THEN
3449: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3450: END IF;
3451:
3452: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
3453: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR,
3462: --
3463: -- End of Code Bugfix 4070732
3464: --
3465: IF l_debug_on THEN
3466: WSH_DEBUG_SV.logmsg(l_module_name,' calling: FND_MSG_PUB.Count_And_Get');
3467: END IF;
3468: FND_MSG_PUB.Count_And_Get
3469: (
3470: p_count => x_msg_count,
3472: p_encoded => FND_API.G_FALSE
3473: );
3474: --
3475: IF l_debug_on THEN
3476: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
3477: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
3478: END IF;
3479: --
3480: WHEN OTHERS THEN
3473: );
3474: --
3475: IF l_debug_on THEN
3476: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
3477: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
3478: END IF;
3479: --
3480: WHEN OTHERS THEN
3481:
3493: THEN
3494: --{
3495:
3496: IF l_debug_on THEN
3497: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS',WSH_DEBUG_SV.C_PROC_LEVEL);
3498: END IF;
3499: --
3500: WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS
3501: (
3504: x_out_rec => l_lpn_out_sync_comm_rec
3505: );
3506: --
3507: IF l_debug_on THEN
3508: WSH_DEBUG_SV.log(l_module_name, 'Return status after calling WSH_LPN_SYNC_COMM_PKG.SYNC_LPNS_TO_WMS', l_return_status);
3509: END IF;
3510: --
3511: --}
3512: END IF;
3522: --{
3523: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
3524: --{
3525: IF l_debug_on THEN
3526: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
3527: END IF;
3528:
3529: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
3530: x_return_status => l_return_status);
3530: x_return_status => l_return_status);
3531:
3532:
3533: IF l_debug_on THEN
3534: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
3535: END IF;
3536:
3537: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3538: x_return_status := l_return_status;
3551: p_encoded => FND_API.G_FALSE
3552: );
3553: --
3554: IF l_debug_on THEN
3555: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
3556: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
3557: END IF;
3558: --
3559: END Delivery_Action;
3552: );
3553: --
3554: IF l_debug_on THEN
3555: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
3556: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
3557: END IF;
3558: --
3559: END Delivery_Action;
3560:
3627: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
3628: --
3629: IF l_debug_on IS NULL
3630: THEN
3631: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
3632: END IF;
3633: --
3634:
3635: SAVEPOINT VALIDATE_DELIVERY_GRP;
3634:
3635: SAVEPOINT VALIDATE_DELIVERY_GRP;
3636: --
3637: IF l_debug_on THEN
3638: WSH_DEBUG_SV.push(l_module_name);
3639: WSH_DEBUG_SV.log(l_module_name,'p_action_code',p_action_code);
3640: WSH_DEBUG_SV.log(l_module_name,'Number of Delivery Records is', x_rec_attr_tab.COUNT);
3641: END IF;
3642: --
3635: SAVEPOINT VALIDATE_DELIVERY_GRP;
3636: --
3637: IF l_debug_on THEN
3638: WSH_DEBUG_SV.push(l_module_name);
3639: WSH_DEBUG_SV.log(l_module_name,'p_action_code',p_action_code);
3640: WSH_DEBUG_SV.log(l_module_name,'Number of Delivery Records is', x_rec_attr_tab.COUNT);
3641: END IF;
3642: --
3643:
3636: --
3637: IF l_debug_on THEN
3638: WSH_DEBUG_SV.push(l_module_name);
3639: WSH_DEBUG_SV.log(l_module_name,'p_action_code',p_action_code);
3640: WSH_DEBUG_SV.log(l_module_name,'Number of Delivery Records is', x_rec_attr_tab.COUNT);
3641: END IF;
3642: --
3643:
3644: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
3670: p_delivery_name => x_rec_attr_tab(l_index).name,
3671: x_return_status => l_return_status);
3672: --
3673: IF l_debug_on THEN
3674: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_delivery_name',l_return_status);
3675: END IF;
3676: --
3677: WSH_UTIL_CORE.api_post_call(
3678: p_return_status => l_return_status,
3719: p_org_code => x_rec_attr_tab(l_index).organization_code,
3720: x_return_status => l_return_status);
3721: --
3722: IF l_debug_on THEN
3723: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_org',l_return_status);
3724: END IF;
3725: --
3726: WSH_UTIL_CORE.api_post_call(
3727: p_return_status => l_return_status,
3748: p_loading_order_desc => x_rec_attr_tab(l_index).loading_order_desc,
3749: x_return_status => l_return_status);
3750: --
3751: IF l_debug_on THEN
3752: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_loading_order',l_return_status);
3753: END IF;
3754: --
3755: WSH_UTIL_CORE.api_post_call(
3756: p_return_status => l_return_status,
3805: -- Check if delivery's transportation is arranged by supplier
3806: -- or if routing request was not received for all delivery lines
3807: --
3808: IF l_debug_on THEN
3809: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_VALIDATIONS.GET_SHIPPING_CONTROL',WSH_DEBUG_SV.C_PROC_LEVEL);
3810: END IF;
3811: --
3812: WSH_DELIVERY_VALIDATIONS.GET_SHIPPING_CONTROL
3813: (
3819: );
3820: --
3821: --
3822: IF l_debug_on THEN
3823: wsh_debug_sv.log(l_module_name, 'l_return_status', l_return_status);
3824: wsh_debug_sv.log(l_module_name, 'l_shipping_control', l_shipping_control);
3825: wsh_debug_sv.log(l_module_name, 'l_routing_response_id', l_routing_response_id);
3826: wsh_debug_sv.log(l_module_name, 'l_routing_request_flag', l_routing_request_flag);
3827: --
3820: --
3821: --
3822: IF l_debug_on THEN
3823: wsh_debug_sv.log(l_module_name, 'l_return_status', l_return_status);
3824: wsh_debug_sv.log(l_module_name, 'l_shipping_control', l_shipping_control);
3825: wsh_debug_sv.log(l_module_name, 'l_routing_response_id', l_routing_response_id);
3826: wsh_debug_sv.log(l_module_name, 'l_routing_request_flag', l_routing_request_flag);
3827: --
3828: END IF;
3821: --
3822: IF l_debug_on THEN
3823: wsh_debug_sv.log(l_module_name, 'l_return_status', l_return_status);
3824: wsh_debug_sv.log(l_module_name, 'l_shipping_control', l_shipping_control);
3825: wsh_debug_sv.log(l_module_name, 'l_routing_response_id', l_routing_response_id);
3826: wsh_debug_sv.log(l_module_name, 'l_routing_request_flag', l_routing_request_flag);
3827: --
3828: END IF;
3829: --
3822: IF l_debug_on THEN
3823: wsh_debug_sv.log(l_module_name, 'l_return_status', l_return_status);
3824: wsh_debug_sv.log(l_module_name, 'l_shipping_control', l_shipping_control);
3825: wsh_debug_sv.log(l_module_name, 'l_routing_response_id', l_routing_response_id);
3826: wsh_debug_sv.log(l_module_name, 'l_routing_request_flag', l_routing_request_flag);
3827: --
3828: END IF;
3829: --
3830: --
3848: x_return_status => l_return_status,
3849: p_isWshLocation => l_isWshLocation);
3850: --
3851: IF l_debug_on THEN
3852: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_location for Ship From',l_return_status);
3853: END IF;
3854: --
3855: WSH_UTIL_CORE.api_post_call(
3856: p_return_status => l_return_status,
3881: x_return_status => l_return_status
3882: );
3883: --
3884: IF l_debug_on THEN
3885: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_supplier_location for Ship From',l_return_status);
3886: END IF;
3887: --
3888: WSH_UTIL_CORE.api_post_call(
3889: p_return_status => l_return_status,
3907: FETCH c_get_org_location INTO l_org_location_id;
3908: CLOSE c_get_org_location;
3909:
3910: IF l_debug_on THEN
3911: wsh_debug_sv.log(l_module_name,'organization_id',x_rec_attr_tab(l_index).initial_pickup_location_id);
3912: wsh_debug_sv.log(l_module_name,'l_org_location_id',l_org_location_id);
3913: END IF;
3914:
3915: IF (l_org_location_id <> x_rec_attr_tab(l_index).initial_pickup_location_id) THEN
3908: CLOSE c_get_org_location;
3909:
3910: IF l_debug_on THEN
3911: wsh_debug_sv.log(l_module_name,'organization_id',x_rec_attr_tab(l_index).initial_pickup_location_id);
3912: wsh_debug_sv.log(l_module_name,'l_org_location_id',l_org_location_id);
3913: END IF;
3914:
3915: IF (l_org_location_id <> x_rec_attr_tab(l_index).initial_pickup_location_id) THEN
3916: x_return_status := wsh_util_core.g_ret_sts_error;
3967: x_return_status => l_return_status,
3968: p_isWshLocation => l_isWshLocation);
3969: --
3970: IF l_debug_on THEN
3971: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_location for Ship To',l_return_status);
3972: END IF;
3973: --
3974: WSH_UTIL_CORE.api_post_call(
3975: p_return_status => l_return_status,
3986: ((p_in_rec_attr_tab(l_index).intmed_ship_to_location_id IS NULL ) OR (p_in_rec_attr_tab(l_index).intmed_ship_to_location_id <> fnd_api.g_miss_num)
3987: OR (p_in_rec_attr_tab(l_index).intmed_ship_to_location_code IS NULL ) OR (p_in_rec_attr_tab(l_index).intmed_ship_to_location_code <> fnd_api.g_miss_char)
3988: ))) THEN
3989: IF l_debug_on THEN
3990: wsh_debug_sv.log(l_module_name,'loc id ',x_rec_attr_tab(l_index).intmed_ship_to_location_id);
3991: wsh_debug_sv.log(l_module_name,'loc code ',x_rec_attr_tab(l_index).intmed_ship_to_location_code);
3992: END IF;
3993: --
3994: wsh_util_validate.validate_location(
3987: OR (p_in_rec_attr_tab(l_index).intmed_ship_to_location_code IS NULL ) OR (p_in_rec_attr_tab(l_index).intmed_ship_to_location_code <> fnd_api.g_miss_char)
3988: ))) THEN
3989: IF l_debug_on THEN
3990: wsh_debug_sv.log(l_module_name,'loc id ',x_rec_attr_tab(l_index).intmed_ship_to_location_id);
3991: wsh_debug_sv.log(l_module_name,'loc code ',x_rec_attr_tab(l_index).intmed_ship_to_location_code);
3992: END IF;
3993: --
3994: wsh_util_validate.validate_location(
3995: p_location_id => x_rec_attr_tab(l_index).intmed_ship_to_location_id,
3997: x_return_status => l_return_status,
3998: p_isWshLocation => l_isWshLocation);
3999: --
4000: IF l_debug_on THEN
4001: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_location for Intmed Ship To',l_return_status);
4002: END IF;
4003: --
4004: WSH_UTIL_CORE.api_post_call(
4005: p_return_status => l_return_status,
4021: x_return_status => l_return_status,
4022: p_isWshLocation => l_isWshLocation);
4023: --
4024: IF l_debug_on THEN
4025: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_location for Pooled Ship To',l_return_status);
4026: END IF;
4027: --
4028: WSH_UTIL_CORE.api_post_call(
4029: p_return_status => l_return_status,
4045: x_return_status => l_return_status,
4046: p_isWshLocation => l_isWshLocation);
4047: --
4048: IF l_debug_on THEN
4049: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_location for fob location',l_return_status);
4050: END IF;
4051: --
4052: WSH_UTIL_CORE.api_post_call(
4053: p_return_status => l_return_status,
4086: end if;
4087: --RTV Changes
4088: --
4089: IF l_debug_on THEN
4090: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_customer',l_return_status);
4091: END IF;
4092: --
4093: WSH_UTIL_CORE.api_post_call(
4094: p_return_status => l_return_status,
4108: IF ( Nvl(x_rec_attr_tab(l_index).client_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
4109: OR Nvl(x_rec_attr_tab(l_index).client_code,fnd_api.g_miss_char) <> fnd_api.g_miss_char ) THEN
4110: --{
4111: IF l_debug_on THEN
4112: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WMS_DEPLOY.GET_CLIENT_DETAILS',WSH_DEBUG_SV.C_PROC_LEVEL);
4113: END IF;
4114: wms_deploy.get_client_details(
4115: x_client_id => x_rec_attr_tab(l_index).client_id,
4116: x_client_name => l_client_name,
4117: x_client_code => x_rec_attr_tab(l_index).client_code,
4118: x_return_status => l_return_status);
4119: --
4120: IF l_debug_on THEN
4121: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_client',l_return_status);
4122: END IF;
4123: --
4124: IF l_return_status <> 'S' THEN
4125: --{
4149: p_freight_terms_name => x_rec_attr_tab(l_index).freight_terms_name,
4150: x_return_status => l_return_status);
4151: --
4152: IF l_debug_on THEN
4153: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_freight_terms',l_return_status);
4154: END IF;
4155: --
4156: WSH_UTIL_CORE.api_post_call(
4157: p_return_status => l_return_status,
4172: p_fob_name => x_rec_attr_tab(l_index).fob_name,
4173: x_return_status => l_return_status);
4174: --
4175: IF l_debug_on THEN
4176: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_fob',l_return_status);
4177: END IF;
4178: --
4179: WSH_UTIL_CORE.api_post_call(
4180: p_return_status => l_return_status,
4198: p_uom_desc => x_rec_attr_tab(l_index).weight_uom_desc,
4199: x_return_status => l_return_status);
4200: --
4201: IF l_debug_on THEN
4202: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_uom for Weight',l_return_status);
4203: END IF;
4204: --
4205: WSH_UTIL_CORE.api_post_call(
4206: p_return_status => l_return_status,
4228: p_uom_desc => x_rec_attr_tab(l_index).volume_uom_desc,
4229: x_return_status => l_return_status);
4230: --
4231: IF l_debug_on THEN
4232: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_uom for Volume',l_return_status);
4233: END IF;
4234: --
4235: WSH_UTIL_CORE.api_post_call(
4236: p_return_status => l_return_status,
4250: )) THEN
4251: --
4252: --OTM R12, added parameter l_adjusted_amount
4253: IF l_debug_on THEN
4254: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_VALIDATE.VALIDATE_CURRENCY',WSH_DEBUG_SV.C_PROC_LEVEL);
4255: END IF;
4256:
4257: wsh_util_validate.validate_currency(
4258: p_currency_code => x_rec_attr_tab(l_index).currency_code,
4261: x_return_status => l_return_status,
4262: x_adjusted_amount => l_adjusted_amount);
4263: --
4264: IF l_debug_on THEN
4265: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_currency',l_return_status);
4266: END IF;
4267: --
4268: WSH_UTIL_CORE.api_post_call(
4269: p_return_status => l_return_status,
4284: p_to_date => x_rec_attr_tab(l_index).ultimate_dropoff_date,
4285: x_return_status => l_return_status);
4286: --
4287: IF l_debug_on THEN
4288: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_from_to_dates',l_return_status);
4289: END IF;
4290: --
4291: WSH_UTIL_CORE.api_post_call(
4292: p_return_status => l_return_status,
4304: x_number_of_lpn => x_rec_attr_tab(l_index).number_of_lpn,
4305: x_return_status => l_return_status);
4306: --
4307: IF l_debug_on THEN
4308: wsh_debug_sv.log(l_module_name,'Return Status After Calling derive_numer_of_lpn',l_return_status);
4309: END IF;
4310: --
4311: WSH_UTIL_CORE.api_post_call(
4312: p_return_status => l_return_status,
4328: p_rtd_expt_txn_meaning => l_dummy_meaning,
4329: x_return_status => l_return_status);
4330: --
4331: IF l_debug_on THEN
4332: wsh_debug_sv.log(l_module_name,'Return Status After Calling Validate_Routed_Export_Txn',l_return_status);
4333: END IF;
4334: --
4335: WSH_UTIL_CORE.api_post_call(
4336: p_return_status => l_return_status,
4363: x_return_status => l_return_status,
4364: p_caller => p_caller);
4365: --
4366: IF l_debug_on THEN
4367: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_freight_carrier',l_return_status);
4368: END IF;
4369: --
4370: /* Fix for Bug 2753330
4371: If caller is WSH_INBOUND, then need to convert warning to success
4375: AND l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
4376: THEN
4377: -- {
4378: IF l_debug_on THEN
4379: wsh_debug_sv.logmsg(l_module_name, 'Setting success for Inbound');
4380: END IF;
4381: l_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
4382: -- }
4383: END IF;
4405: x_return_status => l_return_status);
4406:
4407: --
4408: IF l_debug_on THEN
4409: wsh_debug_sv.log(l_module_name,'Return Status After Calling derive_delivery_uom',l_return_status);
4410: END IF;
4411: --
4412: WSH_UTIL_CORE.api_post_call(
4413: p_return_status => l_return_status,
4477: (p_delivery_id => x_rec_attr_tab(l_index).delivery_id,
4478: x_return_status => x_return_status);
4479: */
4480: IF l_debug_on THEN
4481: WSH_DEBUG_SV.pop(l_module_name);
4482: END IF;
4483: --
4484: EXCEPTION
4485: WHEN FND_API.G_EXC_ERROR THEN
4486: ROLLBACK TO VALIDATE_DELIVERY_GRP;
4487: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4488: --
4489: IF l_debug_on THEN
4490: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
4491: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
4492: END IF;
4493: --
4494: --RTV changes
4487: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4488: --
4489: IF l_debug_on THEN
4490: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
4491: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
4492: END IF;
4493: --
4494: --RTV changes
4495: IF c_check_vendor%ISOPEN THEN
4500: ROLLBACK TO VALIDATE_DELIVERY_GRP;
4501: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
4502: --
4503: IF l_debug_on THEN
4504: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
4505: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
4506: END IF;
4507: --
4508: --RTV changes
4501: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
4502: --
4503: IF l_debug_on THEN
4504: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
4505: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
4506: END IF;
4507: --
4508: --RTV changes
4509: IF c_check_vendor%ISOPEN THEN
4513: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
4514: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
4515: --
4516: IF l_debug_on THEN
4517: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
4518: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
4519: END IF;
4520: --
4521: --RTV changes
4514: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
4515: --
4516: IF l_debug_on THEN
4517: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
4518: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
4519: END IF;
4520: --
4521: --RTV changes
4522: IF c_check_vendor%ISOPEN THEN
4528: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
4529: wsh_util_core.default_handler('WSH_DELIVERIES_GRP.VALIDATE_DELIVERY');
4530: --
4531: IF l_debug_on THEN
4532: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
4533: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
4534: END IF;
4535: --
4536: --RTV changes
4529: wsh_util_core.default_handler('WSH_DELIVERIES_GRP.VALIDATE_DELIVERY');
4530: --
4531: IF l_debug_on THEN
4532: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
4533: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
4534: END IF;
4535: --
4536: --RTV changes
4537: IF c_check_vendor%ISOPEN THEN
4672: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
4673: --
4674: IF l_debug_on IS NULL
4675: THEN
4676: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
4677: END IF;
4678: --
4679: SAVEPOINT CREATE_UPDATE_DELIVERY_GRP;
4680: --
4698: IF l_gc3_is_installed IS NULL THEN
4699: l_gc3_is_installed := WSH_UTIL_CORE.GC3_IS_INSTALLED;
4700: END IF;
4701: IF l_debug_on THEN
4702: WSH_DEBUG_SV.log(l_module_name,'l_gc3_is_installed ',
4703: l_gc3_is_installed);
4704: END IF;
4705: --OTM R12 End.
4706:
4705: --OTM R12 End.
4706:
4707: IF l_debug_on THEN
4708: --
4709: wsh_debug_sv.push (l_module_name);
4710: wsh_debug_sv.log (l_module_name,'action_code',p_in_rec.action_code);
4711: wsh_debug_sv.log (l_module_name,'caller',p_in_rec.caller);
4712: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
4713: --
4706:
4707: IF l_debug_on THEN
4708: --
4709: wsh_debug_sv.push (l_module_name);
4710: wsh_debug_sv.log (l_module_name,'action_code',p_in_rec.action_code);
4711: wsh_debug_sv.log (l_module_name,'caller',p_in_rec.caller);
4712: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
4713: --
4714: END IF;
4707: IF l_debug_on THEN
4708: --
4709: wsh_debug_sv.push (l_module_name);
4710: wsh_debug_sv.log (l_module_name,'action_code',p_in_rec.action_code);
4711: wsh_debug_sv.log (l_module_name,'caller',p_in_rec.caller);
4712: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
4713: --
4714: END IF;
4715: --
4708: --
4709: wsh_debug_sv.push (l_module_name);
4710: wsh_debug_sv.log (l_module_name,'action_code',p_in_rec.action_code);
4711: wsh_debug_sv.log (l_module_name,'caller',p_in_rec.caller);
4712: wsh_debug_sv.log (l_module_name,'COUNT',p_rec_attr_tab.COUNT);
4713: --
4714: END IF;
4715: --
4716: IF p_in_rec.action_code IS NULL THEN
4741: p_action => p_in_rec.action_code ,
4742: x_return_status => l_return_status);
4743: --
4744: IF l_debug_on THEN
4745: wsh_debug_sv.log(l_module_name,'Return Status After Calling set_validation_level',l_return_status);
4746: END IF;
4747: --
4748: wsh_util_core.api_post_call(
4749: p_return_status => l_return_status,
4765: x_msg_data => l_msg_data,
4766: x_delivery_rec => l_rec_attr_tab(l_index));
4767: --
4768: IF l_debug_on THEN
4769: wsh_debug_sv.log(l_module_name,'Return Status After Calling get_disabled_list',l_return_status);
4770: END IF;
4771: --
4772: WSH_UTIL_CORE.api_post_call(
4773: p_return_status => l_return_status,
4822: x_return_status => l_return_status);
4823:
4824:
4825: IF l_debug_on THEN
4826: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_dlvy_wrap',l_return_status);
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4823:
4824:
4825: IF l_debug_on THEN
4826: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_dlvy_wrap',l_return_status);
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4824:
4825: IF l_debug_on THEN
4826: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_dlvy_wrap',l_return_status);
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4832: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
4825: IF l_debug_on THEN
4826: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_dlvy_wrap',l_return_status);
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4832: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
4833: END IF;
4826: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_constraint_dlvy_wrap',l_return_status);
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4832: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
4833: END IF;
4834:
4827: wsh_debug_sv.log(l_module_name,'validate_result After Calling validate_constraint_main',l_cc_validate_result);
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4832: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
4833: END IF;
4834:
4835:
4828: wsh_debug_sv.log(l_module_name,'msg_count After Calling validate_constraint_main',l_msg_count);
4829: wsh_debug_sv.log(l_module_name,'msg_data After Calling validate_constraint_main',l_msg_data);
4830: wsh_debug_sv.log(l_module_name,'fail_ids count After Calling validate_constraint_main',l_cc_failed_records.COUNT);
4831: wsh_debug_sv.log(l_module_name,'l_cc_line_groups.count count After Calling validate_constraint_main',l_cc_line_groups.COUNT);
4832: wsh_debug_sv.log(l_module_name,'group_info count After Calling validate_constraint_main',l_cc_group_info.COUNT);
4833: END IF;
4834:
4835:
4836: IF l_return_status=wsh_util_core.g_ret_sts_error THEN
4837: --fix p_rec_attr_tab to have only successful records
4838: l_cc_count_success:=1;
4839:
4840: IF l_debug_on THEN
4841: wsh_debug_sv.log(l_module_name,'l_rec_attr_tab count before removing failed lines',l_rec_attr_tab.COUNT);
4842: END IF;
4843:
4844: IF l_cc_failed_records.COUNT>0 AND l_rec_attr_tab.COUNT>0 THEN
4845:
4844: IF l_cc_failed_records.COUNT>0 AND l_rec_attr_tab.COUNT>0 THEN
4845:
4846: IF l_cc_failed_records.COUNT=l_rec_attr_tab.COUNT THEN
4847: IF l_debug_on THEN
4848: wsh_debug_sv.logmsg(l_module_name,'all dels failed compatibility check');
4849: END IF;
4850: FND_MESSAGE.SET_NAME('WSH','WSH_DEL_COMP_FAILED');
4851: wsh_util_core.api_post_call(
4852: p_return_status => l_return_status,
4889: END IF;--failed_records.count>0
4890:
4891:
4892: IF l_debug_on THEN
4893: wsh_debug_sv.log(l_module_name,'del rec_attr_tab count after removing failed lines',l_rec_attr_tab.COUNT);
4894: END IF;
4895: --fix p_rec_attr_tab to have only successful records
4896: END IF;--error
4897:
4926: x_num_warnings => l_num_warnings,
4927: x_num_errors => l_num_errors);
4928: --
4929: IF l_debug_on THEN
4930: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_delivery',l_return_status);
4931: END IF;
4932: --
4933: l_index := l_index_tab.FIRST;
4934: WHILE l_index is not null LOOP
4954: x_return_status => l_return_status
4955: );
4956:
4957: IF l_debug_on THEN
4958: WSH_DEBUG_SV.log(l_module_name,' Get_Warehouse_Type l_wh_type,l_return_status',l_wh_type||l_return_status);
4959: END IF;
4960: WSH_UTIL_CORE.api_post_call(
4961: p_return_status => l_return_status,
4962: x_num_warnings => l_num_warnings,
4978: ,x_ignore_for_planning => l_ignore_for_planning
4979: ,x_return_status => l_return_status
4980: ,p_otm_installed => 'Y');
4981: IF l_debug_on THEN
4982: WSH_DEBUG_SV.log(l_module_name,'After call to wsh_util_validate.ca'
4983: ||'lc_ignore_for_planning l_return_status',l_return_status);
4984: WSH_DEBUG_SV.log(l_module_name,'l_ignore_for_planning ',
4985: l_ignore_for_planning );
4986: END IF;
4980: ,p_otm_installed => 'Y');
4981: IF l_debug_on THEN
4982: WSH_DEBUG_SV.log(l_module_name,'After call to wsh_util_validate.ca'
4983: ||'lc_ignore_for_planning l_return_status',l_return_status);
4984: WSH_DEBUG_SV.log(l_module_name,'l_ignore_for_planning ',
4985: l_ignore_for_planning );
4986: END IF;
4987: IF (l_return_status in (WSH_UTIL_CORE.G_RET_STS_ERROR,
4988: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
4999: END IF;
5000:
5001: --OTM R12 Org-Specific Start
5002: IF l_debug_on THEN
5003: WSH_DEBUG_SV.log(l_module_name,'l_ignore_for_planning ',l_ignore_for_planning);
5004: END IF;
5005: --OTM R12 End.
5006: l_rec_attr_tab(l_index).ignore_for_planning:=l_ignore_for_planning;
5007: /*** J changes TP release ****/
5026: x_name => x_del_out_rec_tab(l_index).name,
5027: x_return_status => l_return_status);
5028: --
5029: IF l_debug_on THEN
5030: wsh_debug_sv.log(l_module_name,'Return Status After Calling Create Delivery',l_return_status);
5031: END IF;
5032:
5033: IF l_debug_on THEN
5034: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_SHIPPING_PARAMS_PVT.Get',WSH_DEBUG_SV.C_PROC_LEVEL);
5030: wsh_debug_sv.log(l_module_name,'Return Status After Calling Create Delivery',l_return_status);
5031: END IF;
5032:
5033: IF l_debug_on THEN
5034: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_SHIPPING_PARAMS_PVT.Get',WSH_DEBUG_SV.C_PROC_LEVEL);
5035: END IF;
5036:
5037: --
5038: WSH_UTIL_CORE.api_post_call(
5046: x_return_status => l_return_status
5047: );
5048:
5049: IF l_debug_on THEN
5050: wsh_debug_sv.log(l_module_name,'Return Status After Calling WSH_SHIPPING_PARAMS_PVT.Get',l_return_status);
5051: END IF;
5052:
5053: WSH_UTIL_CORE.api_post_call(
5054: p_return_status => l_return_status,
5061:
5062: -- ITM Check applicable only for outbound (O/IO) delivery.
5063: --
5064: IF l_debug_on THEN
5065: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_VALIDATIONS.Check_ITM_Required',WSH_DEBUG_SV.C_PROC_LEVEL);
5066: END IF;
5067:
5068: l_log_itm_exc := WSH_DELIVERY_VALIDATIONS.Check_ITM_Required
5069: (p_delivery_id => x_del_out_rec_tab(l_index).delivery_id,
5068: l_log_itm_exc := WSH_DELIVERY_VALIDATIONS.Check_ITM_Required
5069: (p_delivery_id => x_del_out_rec_tab(l_index).delivery_id,
5070: x_return_status => l_return_status);
5071: IF l_debug_on THEN
5072: wsh_debug_sv.log(l_module_name,'Return Status After Calling WSH_DELIVERY_VALIDATIONS.Check_ITM_Required',l_return_status);
5073: END IF;
5074:
5075: WSH_UTIL_CORE.api_post_call(
5076: p_return_status => l_return_status,
5078: x_num_errors => l_num_errors);
5079:
5080: IF l_log_itm_exc = 'Y' THEN
5081: IF l_debug_on THEN
5082: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_VALIDATIONS.Log_ITM_Exception',WSH_DEBUG_SV.C_PROC_LEVEL);
5083: END IF;
5084: WSH_DELIVERY_VALIDATIONS.Log_ITM_Exception (
5085: p_delivery_id => x_del_out_rec_tab(l_index).delivery_id,
5086: p_action_type => 'CREATE_DELIVERY',
5086: p_action_type => 'CREATE_DELIVERY',
5087: p_ship_from_location_id => l_rec_attr_tab(l_index).initial_pickup_location_id,
5088: x_return_status => l_return_status);
5089: IF l_debug_on THEN
5090: wsh_debug_sv.log(l_module_name,'Return Status After Calling WSH_DELIVERY_VALIDATIONS.Log_ITM_Exception',l_return_status);
5091: END IF;
5092:
5093: WSH_UTIL_CORE.api_post_call(
5094: p_return_status => l_return_status,
5101: -- Pack J: Auto Select Carrier if the parameter is set.
5102: IF NVL(l_param_info.auto_apply_routing_rules, 'N') = 'D' THEN
5103:
5104: IF l_debug_on THEN
5105: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERY_ACTIONS.PROCESS_CARRIER_SELECTION',WSH_DEBUG_SV.C_PROC_LEVEL);
5106: END IF;
5107: --
5108: l_delivery_rows(1) := x_del_out_rec_tab(l_index).delivery_id;
5109:
5116:
5117: IF (l_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5118:
5119: IF l_debug_on THEN
5120: WSH_DEBUG_SV.logmsg(l_module_name, 'ERROR OCCURRED WHILST PROCESSING CARRIER SELECTION' );
5121: END IF;
5122:
5123: l_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
5124:
5148: x_return_status => l_return_status
5149: );
5150: --
5151: IF l_debug_on THEN
5152: wsh_debug_sv.log(l_module_name,'Return Status After Calling update_ship_from_location',l_return_status);
5153: END IF;
5154: --
5155: WSH_UTIL_CORE.api_post_call(
5156: p_return_status => l_return_status,
5178: p_delivery_info => l_rec_attr_tab(l_index),
5179: x_return_status => l_return_status);
5180: --
5181: IF l_debug_on THEN
5182: wsh_debug_sv.log(l_module_name,'Return Status After Calling Update Delivery',l_return_status);
5183: END IF;
5184: --
5185: --
5186: WSH_UTIL_CORE.api_post_call(
5217: p_ship_method_code=> l_smc,
5218: p_msg_display => 'N');
5219:
5220: IF l_debug_on THEN
5221: WSH_DEBUG_SV.log(l_module_name,'Get_Warehouse_Type organization_id,l_wh_type,l_return_status',l_organization_id||l_wh_type||l_return_status);
5222: WSH_DEBUG_SV.log(l_module_name,'carrier_id',l_carrier_id);
5223: WSH_DEBUG_SV.log(l_module_name,'smc',l_smc);
5224: WSH_DEBUG_SV.log(l_module_name,'l_ignore',l_ignore_for_planning);
5225: END IF;
5218: p_msg_display => 'N');
5219:
5220: IF l_debug_on THEN
5221: WSH_DEBUG_SV.log(l_module_name,'Get_Warehouse_Type organization_id,l_wh_type,l_return_status',l_organization_id||l_wh_type||l_return_status);
5222: WSH_DEBUG_SV.log(l_module_name,'carrier_id',l_carrier_id);
5223: WSH_DEBUG_SV.log(l_module_name,'smc',l_smc);
5224: WSH_DEBUG_SV.log(l_module_name,'l_ignore',l_ignore_for_planning);
5225: END IF;
5226:
5219:
5220: IF l_debug_on THEN
5221: WSH_DEBUG_SV.log(l_module_name,'Get_Warehouse_Type organization_id,l_wh_type,l_return_status',l_organization_id||l_wh_type||l_return_status);
5222: WSH_DEBUG_SV.log(l_module_name,'carrier_id',l_carrier_id);
5223: WSH_DEBUG_SV.log(l_module_name,'smc',l_smc);
5224: WSH_DEBUG_SV.log(l_module_name,'l_ignore',l_ignore_for_planning);
5225: END IF;
5226:
5227: WSH_UTIL_CORE.api_post_call(
5220: IF l_debug_on THEN
5221: WSH_DEBUG_SV.log(l_module_name,'Get_Warehouse_Type organization_id,l_wh_type,l_return_status',l_organization_id||l_wh_type||l_return_status);
5222: WSH_DEBUG_SV.log(l_module_name,'carrier_id',l_carrier_id);
5223: WSH_DEBUG_SV.log(l_module_name,'smc',l_smc);
5224: WSH_DEBUG_SV.log(l_module_name,'l_ignore',l_ignore_for_planning);
5225: END IF;
5226:
5227: WSH_UTIL_CORE.api_post_call(
5228: p_return_status => l_return_status,
5240: p_in_ids => l_tmp_del_ids,
5241: p_action_code => 'IGNORE_PLAN',
5242: x_return_status => l_return_status);
5243: IF l_debug_on THEN
5244: wsh_debug_sv.log(l_module_name,'Return Status After Calling change_ignoreplan_sttatus',l_return_status);
5245: END IF;
5246: WSH_UTIL_CORE.api_post_call(
5247: p_return_status => l_return_status,
5248: x_num_warnings => l_num_warnings,
5289:
5290: l_reset_flags := FALSE;
5291:
5292: IF l_debug_on THEN
5293: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5294: END IF;
5295:
5296: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => l_reset_flags,
5297: x_return_status => l_return_status);
5296: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => l_reset_flags,
5297: x_return_status => l_return_status);
5298:
5299: IF l_debug_on THEN
5300: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5301: END IF;
5302:
5303: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR THEN
5304: RAISE FND_API.G_EXC_ERROR;
5323:
5324: IF FND_API.To_Boolean( p_commit ) THEN
5325:
5326: IF l_debug_on THEN
5327: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5328: END IF;
5329:
5330: WSH_UTIL_CORE.reset_stops_for_load_tender(p_reset_flags => TRUE,
5331: x_return_status => l_return_status);
5331: x_return_status => l_return_status);
5332: ELSE
5333:
5334: IF l_debug_on THEN
5335: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5336: END IF;
5337:
5338: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => TRUE,
5339: x_return_status => l_return_status);
5340:
5341: END IF;
5342:
5343: IF l_debug_on THEN
5344: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5345: END IF;
5346:
5347: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5348: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR,
5369: p_data => x_msg_data,
5370: p_encoded => FND_API.G_FALSE);
5371: --
5372: IF l_debug_on THEN
5373: WSH_DEBUG_SV.pop(l_module_name);
5374: END IF;
5375: --
5376: EXCEPTION
5377: WHEN RECORD_LOCKED THEN
5386: --{
5387: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
5388: --{
5389: IF l_debug_on THEN
5390: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5391: END IF;
5392:
5393: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
5394: x_return_status => l_return_status);
5394: x_return_status => l_return_status);
5395:
5396:
5397: IF l_debug_on THEN
5398: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5399: END IF;
5400:
5401: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5402: x_return_status := l_return_status;
5413: p_data => x_msg_data,
5414: p_encoded => FND_API.G_FALSE);
5415:
5416: IF l_debug_on THEN
5417: WSH_DEBUG_SV.logmsg(l_module_name,'RECORD_LOCKED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5418: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:RECORD_LOCKED');
5419: END IF;
5420:
5421: WHEN FND_API.G_EXC_ERROR THEN
5414: p_encoded => FND_API.G_FALSE);
5415:
5416: IF l_debug_on THEN
5417: WSH_DEBUG_SV.logmsg(l_module_name,'RECORD_LOCKED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5418: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:RECORD_LOCKED');
5419: END IF;
5420:
5421: WHEN FND_API.G_EXC_ERROR THEN
5422: ROLLBACK TO CREATE_UPDATE_DELIVERY_GRP;
5428: --{
5429: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
5430: --{
5431: IF l_debug_on THEN
5432: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5433: END IF;
5434:
5435: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
5436: x_return_status => l_return_status);
5436: x_return_status => l_return_status);
5437:
5438:
5439: IF l_debug_on THEN
5440: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5441: END IF;
5442:
5443: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5444: x_return_status := l_return_status;
5457: p_encoded => FND_API.G_FALSE
5458: );
5459:
5460: IF l_debug_on THEN
5461: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5462: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
5463: END IF;
5464: --
5465: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5458: );
5459:
5460: IF l_debug_on THEN
5461: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5462: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
5463: END IF;
5464: --
5465: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5466: ROLLBACK TO CREATE_UPDATE_DELIVERY_GRP;
5473: --{
5474: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
5475: --{
5476: IF l_debug_on THEN
5477: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5478: END IF;
5479:
5480: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
5481: x_return_status => l_return_status);
5481: x_return_status => l_return_status);
5482:
5483:
5484: IF l_debug_on THEN
5485: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5486: END IF;
5487:
5488: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5489: x_return_status := l_return_status;
5503: );
5504:
5505: --
5506: IF l_debug_on THEN
5507: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
5508: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
5509: END IF;
5510: --
5511: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
5504:
5505: --
5506: IF l_debug_on THEN
5507: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
5508: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
5509: END IF;
5510: --
5511: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
5512: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
5517: --{
5518: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
5519: --{
5520: IF l_debug_on THEN
5521: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Process_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5522: END IF;
5523:
5524: WSH_UTIL_CORE.Process_stops_for_load_tender(p_reset_flags => TRUE,
5525: x_return_status => l_return_status);
5525: x_return_status => l_return_status);
5526:
5527:
5528: IF l_debug_on THEN
5529: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5530: END IF;
5531:
5532: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5533: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR,
5554: );
5555:
5556: --
5557: IF l_debug_on THEN
5558: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5559: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
5560: END IF;
5561: --
5562: WHEN OTHERS THEN
5555:
5556: --
5557: IF l_debug_on THEN
5558: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
5559: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
5560: END IF;
5561: --
5562: WHEN OTHERS THEN
5563: ROLLBACK TO CREATE_UPDATE_DELIVERY_GRP;
5570: --{
5571: IF NOT(WSH_UTIL_CORE.G_CALL_FTE_LOAD_TENDER_API) THEN
5572: --{
5573: IF l_debug_on THEN
5574: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_UTIL_CORE.Reset_stops_for_load_tender',WSH_DEBUG_SV.C_PROC_LEVEL);
5575: END IF;
5576:
5577: WSH_UTIL_CORE.Reset_stops_for_load_tender(p_reset_flags => TRUE,
5578: x_return_status => l_return_status);
5578: x_return_status => l_return_status);
5579:
5580:
5581: IF l_debug_on THEN
5582: WSH_DEBUG_SV.log(l_module_name,'l_return_status',l_return_status);
5583: END IF;
5584:
5585: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5586: x_return_status := l_return_status;
5600: );
5601:
5602: --
5603: IF l_debug_on THEN
5604: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
5605: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
5606: END IF;
5607: --
5608: END Create_Update_Delivery;
5601:
5602: --
5603: IF l_debug_on THEN
5604: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
5605: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
5606: END IF;
5607: --
5608: END Create_Update_Delivery;
5609:
5641: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
5642: --
5643: IF l_debug_on IS NULL
5644: THEN
5645: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
5646: END IF;
5647: --
5648: IF l_debug_on THEN
5649: WSH_DEBUG_SV.push(l_module_name);
5645: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
5646: END IF;
5647: --
5648: IF l_debug_on THEN
5649: WSH_DEBUG_SV.push(l_module_name);
5650: --
5651: WSH_DEBUG_SV.log(l_module_name,'P_ACTION_CODE',P_ACTION_CODE);
5652: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.delivery_id',
5653: p_delivery_info.delivery_id);
5647: --
5648: IF l_debug_on THEN
5649: WSH_DEBUG_SV.push(l_module_name);
5650: --
5651: WSH_DEBUG_SV.log(l_module_name,'P_ACTION_CODE',P_ACTION_CODE);
5652: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.delivery_id',
5653: p_delivery_info.delivery_id);
5654: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.name',
5655: p_delivery_info.name);
5648: IF l_debug_on THEN
5649: WSH_DEBUG_SV.push(l_module_name);
5650: --
5651: WSH_DEBUG_SV.log(l_module_name,'P_ACTION_CODE',P_ACTION_CODE);
5652: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.delivery_id',
5653: p_delivery_info.delivery_id);
5654: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.name',
5655: p_delivery_info.name);
5656: END IF;
5650: --
5651: WSH_DEBUG_SV.log(l_module_name,'P_ACTION_CODE',P_ACTION_CODE);
5652: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.delivery_id',
5653: p_delivery_info.delivery_id);
5654: WSH_DEBUG_SV.log(l_module_name,'p_delivery_info.name',
5655: p_delivery_info.name);
5656: END IF;
5657: --
5658: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
5675:
5676: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5677: --
5678: IF l_debug_on THEN
5679: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5680: x_return_status);
5681: WSH_DEBUG_SV.pop(l_module_name);
5682: END IF;
5683: --
5677: --
5678: IF l_debug_on THEN
5679: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5680: x_return_status);
5681: WSH_DEBUG_SV.pop(l_module_name);
5682: END IF;
5683: --
5684: RETURN;
5685: END IF;
5700:
5701: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5702: --
5703: IF l_debug_on THEN
5704: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5705: x_return_status);
5706: WSH_DEBUG_SV.pop(l_module_name);
5707: END IF;
5708: --
5702: --
5703: IF l_debug_on THEN
5704: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5705: x_return_status);
5706: WSH_DEBUG_SV.pop(l_module_name);
5707: END IF;
5708: --
5709: RETURN;
5710: END IF;
5727:
5728: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5729: --
5730: IF l_debug_on THEN
5731: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5732: x_return_status);
5733: WSH_DEBUG_SV.pop(l_module_name);
5734: END IF;
5735: --
5729: --
5730: IF l_debug_on THEN
5731: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5732: x_return_status);
5733: WSH_DEBUG_SV.pop(l_module_name);
5734: END IF;
5735: --
5736: RETURN;
5737: END IF;
5748: x_return_status);
5749:
5750: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5751: IF l_debug_on THEN
5752: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5753: x_return_status);
5754: WSH_DEBUG_SV.pop(l_module_name);
5755: END IF;
5756: --
5750: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5751: IF l_debug_on THEN
5752: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5753: x_return_status);
5754: WSH_DEBUG_SV.pop(l_module_name);
5755: END IF;
5756: --
5757: RETURN;
5758: END IF;
5769: x_return_status);
5770:
5771: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5772: IF l_debug_on THEN
5773: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5774: x_return_status);
5775: WSH_DEBUG_SV.pop(l_module_name);
5776: END IF;
5777: --
5771: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5772: IF l_debug_on THEN
5773: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5774: x_return_status);
5775: WSH_DEBUG_SV.pop(l_module_name);
5776: END IF;
5777: --
5778: RETURN;
5779: END IF;
5790: x_return_status);
5791:
5792: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5793: IF l_debug_on THEN
5794: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5795: x_return_status);
5796: WSH_DEBUG_SV.pop(l_module_name);
5797: END IF;
5798: --
5792: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5793: IF l_debug_on THEN
5794: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5795: x_return_status);
5796: WSH_DEBUG_SV.pop(l_module_name);
5797: END IF;
5798: --
5799: RETURN;
5800: END IF;
5812:
5813: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5814: --
5815: IF l_debug_on THEN
5816: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5817: x_return_status);
5818: WSH_DEBUG_SV.pop(l_module_name);
5819: END IF;
5820: --
5814: --
5815: IF l_debug_on THEN
5816: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5817: x_return_status);
5818: WSH_DEBUG_SV.pop(l_module_name);
5819: END IF;
5820: --
5821: RETURN;
5822: END IF;
5832: p_delivery_info.customer_number,
5833: x_return_status);
5834: --
5835: IF l_debug_on THEN
5836: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_customer',x_return_status);
5837: END IF;
5838: --
5839:
5840: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5839:
5840: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5841: --
5842: IF l_debug_on THEN
5843: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5844: x_return_status);
5845: WSH_DEBUG_SV.pop(l_module_name);
5846: END IF;
5847: --
5841: --
5842: IF l_debug_on THEN
5843: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5844: x_return_status);
5845: WSH_DEBUG_SV.pop(l_module_name);
5846: END IF;
5847: --
5848: RETURN;
5849: END IF;
5863:
5864: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5865: --
5866: IF l_debug_on THEN
5867: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5868: x_return_status);
5869: WSH_DEBUG_SV.pop(l_module_name);
5870: END IF;
5871: --
5865: --
5866: IF l_debug_on THEN
5867: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5868: x_return_status);
5869: WSH_DEBUG_SV.pop(l_module_name);
5870: END IF;
5871: --
5872: RETURN;
5873: END IF;
5885:
5886: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5887: --
5888: IF l_debug_on THEN
5889: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5890: x_return_status);
5891: WSH_DEBUG_SV.pop(l_module_name);
5892: END IF;
5893: --
5887: --
5888: IF l_debug_on THEN
5889: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5890: x_return_status);
5891: WSH_DEBUG_SV.pop(l_module_name);
5892: END IF;
5893: --
5894: RETURN;
5895: END IF;
5907:
5908: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5909: --
5910: IF l_debug_on THEN
5911: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5912: x_return_status);
5913: WSH_DEBUG_SV.pop(l_module_name);
5914: END IF;
5915: --
5909: --
5910: IF l_debug_on THEN
5911: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5912: x_return_status);
5913: WSH_DEBUG_SV.pop(l_module_name);
5914: END IF;
5915: --
5916: RETURN;
5917: END IF;
5929:
5930: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5931: --
5932: IF l_debug_on THEN
5933: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5934: x_return_status);
5935: WSH_DEBUG_SV.pop(l_module_name);
5936: END IF;
5937: --
5931: --
5932: IF l_debug_on THEN
5933: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5934: x_return_status);
5935: WSH_DEBUG_SV.pop(l_module_name);
5936: END IF;
5937: --
5938: RETURN;
5939: END IF;
5953: x_return_status);
5954:
5955: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5956: IF l_debug_on THEN
5957: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5958: x_return_status);
5959: WSH_DEBUG_SV.pop(l_module_name);
5960: END IF;
5961: --
5955: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5956: IF l_debug_on THEN
5957: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5958: x_return_status);
5959: WSH_DEBUG_SV.pop(l_module_name);
5960: END IF;
5961: --
5962: RETURN;
5963: END IF;
5977:
5978: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
5979: --
5980: IF l_debug_on THEN
5981: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5982: x_return_status);
5983: WSH_DEBUG_SV.pop(l_module_name);
5984: END IF;
5985: --
5979: --
5980: IF l_debug_on THEN
5981: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
5982: x_return_status);
5983: WSH_DEBUG_SV.pop(l_module_name);
5984: END IF;
5985: --
5986: RETURN;
5987: END IF;
6001: x_adjusted_amount => l_adjusted_amount);
6002:
6003: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
6004: IF l_debug_on THEN
6005: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6006: x_return_status);
6007: WSH_DEBUG_SV.pop(l_module_name);
6008: END IF;
6009: --
6003: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
6004: IF l_debug_on THEN
6005: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6006: x_return_status);
6007: WSH_DEBUG_SV.pop(l_module_name);
6008: END IF;
6009: --
6010: RETURN;
6011: END IF;
6027:
6028: IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
6029: --
6030: IF l_debug_on THEN
6031: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6032: x_return_status);
6033: WSH_DEBUG_SV.pop(l_module_name);
6034: END IF;
6035: --
6029: --
6030: IF l_debug_on THEN
6031: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6032: x_return_status);
6033: WSH_DEBUG_SV.pop(l_module_name);
6034: END IF;
6035: --
6036: RETURN;
6037:
6038: ELSIF l_assigned_to_trip = 'Y' THEN
6039: FND_MESSAGE.SET_NAME('WSH','WSH_DEL_ASSIGNED_ERROR');
6040: --
6041: IF l_debug_on THEN
6042: WSH_DEBUG_SV.log(l_module_name,'WSH_DEL_ASSIGNED_ERROR');
6043: END IF;
6044: --
6045: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_delivery_info.delivery_id));
6046: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6045: FND_MESSAGE.SET_TOKEN('DEL_NAME',wsh_new_deliveries_pvt.get_name(p_delivery_info.delivery_id));
6046: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6047: wsh_util_core.add_message(x_return_status,l_module_name);
6048: IF l_debug_on THEN
6049: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6050: x_return_status);
6051: WSH_DEBUG_SV.pop(l_module_name);
6052: END IF;
6053: --
6047: wsh_util_core.add_message(x_return_status,l_module_name);
6048: IF l_debug_on THEN
6049: WSH_DEBUG_SV.log(l_module_name,'x_return_status',
6050: x_return_status);
6051: WSH_DEBUG_SV.pop(l_module_name);
6052: END IF;
6053: --
6054: RETURN;
6055: END IF;
6056: END IF;
6057:
6058: --
6059: IF l_debug_on THEN
6060: WSH_DEBUG_SV.pop(l_module_name);
6061: END IF;
6062: --
6063: EXCEPTION
6064: WHEN others THEN
6065: wsh_util_core.default_handler('WSH_DELIVERIES_GRP.Validate_Delivery',l_module_name);
6066: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6067: --
6068: IF l_debug_on THEN
6069: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6070: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6071: END IF;
6072: --
6073: END Validate_Delivery;
6066: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6067: --
6068: IF l_debug_on THEN
6069: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6070: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6071: END IF;
6072: --
6073: END Validate_Delivery;
6074:
6088: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
6089: --
6090: IF l_debug_on IS NULL
6091: THEN
6092: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6093: END IF;
6094: --
6095: IF l_debug_on THEN
6096: WSH_DEBUG_SV.push(l_module_name);
6092: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6093: END IF;
6094: --
6095: IF l_debug_on THEN
6096: WSH_DEBUG_SV.push(l_module_name);
6097: END IF;
6098: x_return_status := wsh_util_core.g_ret_sts_success;
6099: --
6100: x_pvt_rec.DELIVERY_ID := p_pub_rec.DELIVERY_ID;
6232: x_pvt_rec.HASH_VALUE := FND_API.G_MISS_NUM;
6233: x_pvt_rec.SOURCE_HEADER_ID := FND_API.G_MISS_NUM;
6234: --
6235: IF l_debug_on THEN
6236: WSH_DEBUG_SV.pop(l_module_name);
6237: END IF;
6238: EXCEPTION
6239: WHEN OTHERS THEN
6240: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_DELIVERIES_GRP.map_grp_pvt',l_module_name);
6240: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_DELIVERIES_GRP.map_grp_pvt',l_module_name);
6241: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6242: --
6243: IF l_debug_on THEN
6244: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6245: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6246: END IF;
6247: --
6248: END map_grp_to_pvt;
6241: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6242: --
6243: IF l_debug_on THEN
6244: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6245: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6246: END IF;
6247: --
6248: END map_grp_to_pvt;
6249:
6304: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
6305: --
6306: IF l_debug_on IS NULL
6307: THEN
6308: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6309: END IF;
6310: --
6311: IF l_debug_on THEN
6312: wsh_debug_sv.push(l_module_name);
6308: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6309: END IF;
6310: --
6311: IF l_debug_on THEN
6312: wsh_debug_sv.push(l_module_name);
6313: END IF;
6314: -- Standard call to check for call compatibility
6315: IF NOT FND_API.Compatible_API_Call
6316: ( l_api_version_number
6344: x_pvt_rec => l_rec_attr_tab(1),
6345: x_return_status => l_return_status);
6346: --
6347: IF l_debug_on THEN
6348: wsh_debug_sv.log(l_module_name,'Return Status After Calling map_grp_to_pvt',l_return_status);
6349: END IF;
6350: --
6351: wsh_util_core.api_post_call(
6352: p_return_status => l_return_status,
6366: x_msg_count => x_msg_count,
6367: x_msg_data => x_msg_data);
6368: --
6369: IF l_debug_on THEN
6370: wsh_debug_sv.log(l_module_name,'Return Status After Calling create_update_delivery',l_return_status);
6371: END IF;
6372: --
6373: wsh_util_core.api_post_call(
6374: p_return_status => l_return_status,
6395: , p_encoded => FND_API.G_FALSE
6396: );
6397: --
6398: IF l_debug_on THEN
6399: WSH_DEBUG_SV.pop(l_module_name);
6400: END IF;
6401: --
6402: EXCEPTION
6403: WHEN FND_API.G_EXC_ERROR THEN
6409: , p_encoded => FND_API.G_FALSE
6410: );
6411: --
6412: IF l_debug_on THEN
6413: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_EXCEP_LEVEL);
6414: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6415: END IF;
6416: --
6417: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6410: );
6411: --
6412: IF l_debug_on THEN
6413: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_EXCEP_LEVEL);
6414: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6415: END IF;
6416: --
6417: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6418: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6423: , p_encoded => FND_API.G_FALSE
6424: );
6425: --
6426: IF l_debug_on THEN
6427: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6428: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6429: END IF;
6430: --
6431: WHEN OTHERS THEN
6424: );
6425: --
6426: IF l_debug_on THEN
6427: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6428: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6429: END IF;
6430: --
6431: WHEN OTHERS THEN
6432: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6444: , p_encoded => FND_API.G_FALSE
6445: );
6446: --
6447: IF l_debug_on THEN
6448: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6449: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6450: END IF;
6451: --
6452: END Create_Update_Delivery;
6445: );
6446: --
6447: IF l_debug_on THEN
6448: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6449: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6450: END IF;
6451: --
6452: END Create_Update_Delivery;
6453:
6561: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
6562: --
6563: IF l_debug_on IS NULL
6564: THEN
6565: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6566: END IF;
6567: --
6568: IF l_debug_on THEN
6569: wsh_debug_sv.push(l_module_name);
6565: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6566: END IF;
6567: --
6568: IF l_debug_on THEN
6569: wsh_debug_sv.push(l_module_name);
6570: END IF;
6571: --
6572: -- Standard call to check for call compatibility
6573: IF NOT FND_API.Compatible_API_Call
6590: p_delivery_name => p_delivery_name,
6591: x_return_status => x_return_status);
6592: --
6593: IF l_debug_on THEN
6594: wsh_debug_sv.log(l_module_name,'Return Status After Calling validate_delivery_name',x_return_status);
6595: END IF;
6596: --
6597: wsh_util_core.api_post_call(
6598: p_return_status => x_return_status,
6643: x_msg_count => x_msg_count,
6644: x_msg_data => x_msg_data);
6645: --
6646: IF l_debug_on THEN
6647: wsh_debug_sv.log(l_module_name,'Return Status After Calling Delivery_Action',x_return_status);
6648: END IF;
6649: --
6650: wsh_util_core.api_post_call(
6651: p_return_status => x_return_status,
6653: x_num_warnings => l_num_warnings,
6654: p_msg_data => x_msg_data);
6655: --
6656: IF l_debug_on THEN
6657: wsh_debug_sv.log(l_module_name,'Number of Warnings is ',l_num_warnings);
6658: wsh_debug_sv.log(l_module_name,'Number of Errors is ',l_num_errors);
6659: END IF;
6660: --
6661: x_trip_rows := l_del_action_out_rec.result_id_tab;
6654: p_msg_data => x_msg_data);
6655: --
6656: IF l_debug_on THEN
6657: wsh_debug_sv.log(l_module_name,'Number of Warnings is ',l_num_warnings);
6658: wsh_debug_sv.log(l_module_name,'Number of Errors is ',l_num_errors);
6659: END IF;
6660: --
6661: x_trip_rows := l_del_action_out_rec.result_id_tab;
6662:
6673: , p_encoded => FND_API.G_FALSE
6674: );
6675: --
6676: IF l_debug_on THEN
6677: WSH_DEBUG_SV.pop(l_module_name);
6678: END IF;
6679: --
6680: EXCEPTION
6681: WHEN FND_API.G_EXC_ERROR THEN
6687: , p_encoded => FND_API.G_FALSE
6688: );
6689: --
6690: IF l_debug_on THEN
6691: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_EXCEP_LEVEL);
6692: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6693: END IF;
6694: --
6695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6688: );
6689: --
6690: IF l_debug_on THEN
6691: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_EXCEP_LEVEL);
6692: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6693: END IF;
6694: --
6695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6701: , p_encoded => FND_API.G_FALSE
6702: );
6703: --
6704: IF l_debug_on THEN
6705: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6706: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6707: END IF;
6708: --
6709: WHEN OTHERS THEN
6702: );
6703: --
6704: IF l_debug_on THEN
6705: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6706: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6707: END IF;
6708: --
6709: WHEN OTHERS THEN
6710: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6722: , p_encoded => FND_API.G_FALSE
6723: );
6724: --
6725: IF l_debug_on THEN
6726: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6727: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6728: END IF;
6729: --
6730:
6723: );
6724: --
6725: IF l_debug_on THEN
6726: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6727: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6728: END IF;
6729: --
6730:
6731: END Delivery_Action;
6790: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
6791: --
6792: IF l_debug_on IS NULL
6793: THEN
6794: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
6795: END IF;
6796: --
6797: x_return_status := wsh_util_core.g_ret_sts_success;
6798:
6796: --
6797: x_return_status := wsh_util_core.g_ret_sts_success;
6798:
6799: IF l_debug_on THEN
6800: WSH_DEBUG_SV.push(l_module_name);
6801: --
6802: WSH_DEBUG_SV.log(l_module_name, 'Action Code', p_action_prms.action_code);
6803: WSH_DEBUG_SV.log(l_module_name,'Input Table count', p_rec_attr_tab.count);
6804: END IF;
6798:
6799: IF l_debug_on THEN
6800: WSH_DEBUG_SV.push(l_module_name);
6801: --
6802: WSH_DEBUG_SV.log(l_module_name, 'Action Code', p_action_prms.action_code);
6803: WSH_DEBUG_SV.log(l_module_name,'Input Table count', p_rec_attr_tab.count);
6804: END IF;
6805:
6806: l_index := p_rec_attr_tab.first;
6799: IF l_debug_on THEN
6800: WSH_DEBUG_SV.push(l_module_name);
6801: --
6802: WSH_DEBUG_SV.log(l_module_name, 'Action Code', p_action_prms.action_code);
6803: WSH_DEBUG_SV.log(l_module_name,'Input Table count', p_rec_attr_tab.count);
6804: END IF;
6805:
6806: l_index := p_rec_attr_tab.first;
6807: while l_index is not null
6835: WHILE l_stop_index IS NOT NULL
6836: LOOP
6837: -- {
6838: IF l_debug_on THEN
6839: wsh_debug_sv.log(l_module_name, 'call lock for stop', l_stop_rows(l_stop_index));
6840: END IF;
6841: -- First lock the stop
6842: wsh_trip_stops_pvt.lock_trip_stop_no_compare(
6843: p_stop_id => l_stop_rows(l_stop_index)
6853: INTO l_min_stop_seq, l_max_stop_seq;
6854: CLOSE c_min_max_seq;
6855:
6856: IF l_debug_on THEN
6857: wsh_debug_sv.log(l_module_name, 'Min stop seq', l_min_stop_seq);
6858: wsh_debug_sv.log(l_module_name, 'Max stop seq', l_max_stop_seq);
6859: wsh_debug_sv.log(l_module_name, 'Stop seq', l_stop_seq);
6860: wsh_debug_sv.log(l_module_name, 'Trip Id', l_trip_id);
6861: END IF;
6854: CLOSE c_min_max_seq;
6855:
6856: IF l_debug_on THEN
6857: wsh_debug_sv.log(l_module_name, 'Min stop seq', l_min_stop_seq);
6858: wsh_debug_sv.log(l_module_name, 'Max stop seq', l_max_stop_seq);
6859: wsh_debug_sv.log(l_module_name, 'Stop seq', l_stop_seq);
6860: wsh_debug_sv.log(l_module_name, 'Trip Id', l_trip_id);
6861: END IF;
6862:
6855:
6856: IF l_debug_on THEN
6857: wsh_debug_sv.log(l_module_name, 'Min stop seq', l_min_stop_seq);
6858: wsh_debug_sv.log(l_module_name, 'Max stop seq', l_max_stop_seq);
6859: wsh_debug_sv.log(l_module_name, 'Stop seq', l_stop_seq);
6860: wsh_debug_sv.log(l_module_name, 'Trip Id', l_trip_id);
6861: END IF;
6862:
6863: IF l_stop_seq = l_min_stop_seq
6856: IF l_debug_on THEN
6857: wsh_debug_sv.log(l_module_name, 'Min stop seq', l_min_stop_seq);
6858: wsh_debug_sv.log(l_module_name, 'Max stop seq', l_max_stop_seq);
6859: wsh_debug_sv.log(l_module_name, 'Stop seq', l_stop_seq);
6860: wsh_debug_sv.log(l_module_name, 'Trip Id', l_trip_id);
6861: END IF;
6862:
6863: IF l_stop_seq = l_min_stop_seq
6864: OR l_stop_seq = l_max_stop_seq
6879: EXCEPTION
6880: WHEN app_exception.application_exception or app_exception.record_lock_exception THEN
6881: ROLLBACK TO lock_rel_ent_loop;
6882: IF l_debug_on THEN
6883: wsh_debug_sv.log(l_module_name, 'Could not obtain lock of stop or trip for delivery', p_rec_attr_tab(l_index).delivery_id);
6884: END IF;
6885: FND_MESSAGE.SET_NAME('WSH', 'WSH_DLVY_STOP_TRIP_LOCK');
6886: FND_MESSAGE.SET_TOKEN('DLVY_NAME',l_dlvy_name);
6887: wsh_util_core.add_message(wsh_util_core.g_ret_sts_error,l_module_name);
6888: --
6889: --
6890: WHEN others THEN
6891: IF l_debug_on THEN
6892: wsh_debug_sv.logmsg(l_module_name, 'When others in local block');
6893: END IF;
6894: ROLLBACK TO lock_rel_ent_loop;
6895: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6896:
6899: -- }
6900: end loop;
6901:
6902: IF l_debug_on THEN
6903: WSH_DEBUG_SV.log(l_module_name, 'Valid ids tab count', x_valid_ids_tab.count);
6904: END IF;
6905: -- Check for valid_ids_tab count.
6906: -- If valid ids count > 0 ,but less than the input table count, then return warning
6907: -- If valid ids count = 0, then return error
6921: -- }
6922: END IF;
6923:
6924: IF l_debug_on THEN
6925: WSH_DEBUG_SV.pop(l_module_name);
6926: END IF;
6927: --
6928:
6929: EXCEPTION
6930: WHEN FND_API.G_EXC_ERROR THEN
6931: x_return_status := FND_API.G_RET_STS_ERROR ;
6932: --
6933: IF l_debug_on THEN
6934: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6935: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6936: END IF;
6937: --
6938: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6931: x_return_status := FND_API.G_RET_STS_ERROR ;
6932: --
6933: IF l_debug_on THEN
6934: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_ERROR exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6935: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_ERROR');
6936: END IF;
6937: --
6938: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6939: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6938: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6939: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6940: --
6941: IF l_debug_on THEN
6942: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_UNEXPECTED_ERROR exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6943: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6944: END IF;
6945: --
6946: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
6939: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6940: --
6941: IF l_debug_on THEN
6942: WSH_DEBUG_SV.logmsg(l_module_name,'FND_API.G_EXC_UNEXPECTED_ERROR exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6943: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6944: END IF;
6945: --
6946: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
6947: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
6946: WHEN WSH_UTIL_CORE.G_EXC_WARNING THEN
6947: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
6948: --
6949: IF l_debug_on THEN
6950: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6951: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
6952: END IF;
6953: --
6954: WHEN OTHERS THEN
6947: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
6948: --
6949: IF l_debug_on THEN
6950: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
6951: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
6952: END IF;
6953: --
6954: WHEN OTHERS THEN
6955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6954: WHEN OTHERS THEN
6955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6956: WSH_UTIL_CORE.default_handler('WSH_DELIVERIES_GRP.Lock_Related_Entities');
6957: IF l_debug_on THEN
6958: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6959: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6960: END IF;
6961:
6962: --
6955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6956: WSH_UTIL_CORE.default_handler('WSH_DELIVERIES_GRP.Lock_Related_Entities');
6957: IF l_debug_on THEN
6958: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
6959: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
6960: END IF;
6961:
6962: --
6963:
7006: l_debug_on := WSH_DEBUG_INTERFACE.g_debug;
7007: --
7008: IF l_debug_on IS NULL
7009: THEN
7010: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
7011: END IF;
7012: --
7013: IF l_debug_on THEN
7014: wsh_debug_sv.push(l_module_name);
7010: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
7011: END IF;
7012: --
7013: IF l_debug_on THEN
7014: wsh_debug_sv.push(l_module_name);
7015: wsh_debug_sv.log (l_module_name, 'Entity Type', p_entity_type );
7016: wsh_debug_sv.log (l_module_name, 'Entity Id', p_entity_id );
7017: END IF;
7018: --
7011: END IF;
7012: --
7013: IF l_debug_on THEN
7014: wsh_debug_sv.push(l_module_name);
7015: wsh_debug_sv.log (l_module_name, 'Entity Type', p_entity_type );
7016: wsh_debug_sv.log (l_module_name, 'Entity Id', p_entity_id );
7017: END IF;
7018: --
7019: -- Standard call to check for call compatibility
7012: --
7013: IF l_debug_on THEN
7014: wsh_debug_sv.push(l_module_name);
7015: wsh_debug_sv.log (l_module_name, 'Entity Type', p_entity_type );
7016: wsh_debug_sv.log (l_module_name, 'Entity Id', p_entity_id );
7017: END IF;
7018: --
7019: -- Standard call to check for call compatibility
7020: IF NOT FND_API.Compatible_API_Call
7047: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
7048:
7049: --
7050: IF l_debug_on THEN
7051: wsh_debug_sv.logmsg(l_module_name, 'Calling Get_Delivery_Status', WSH_DEBUG_SV.C_PROC_LEVEL);
7052: END IF;
7053: --
7054: WSH_UTIL_CORE.Get_Delivery_Status (
7055: p_entity_type => p_entity_type,
7057: x_status_code => x_status_code,
7058: x_return_status => l_return_status );
7059: --
7060: IF l_debug_on THEN
7061: wsh_debug_sv.log(l_module_name, 'Return Status after Calling Get_Delivery_Status', l_return_status);
7062: END IF;
7063: --
7064: WSH_UTIL_CORE.api_post_call(
7065: p_return_status => l_return_status,
7068: --
7069:
7070: --
7071: IF l_debug_on THEN
7072: wsh_debug_sv.log(l_module_name, 'Status Code', x_status_code);
7073: wsh_debug_sv.pop (l_module_name);
7074: END IF;
7075: --
7076: EXCEPTION
7069:
7070: --
7071: IF l_debug_on THEN
7072: wsh_debug_sv.log(l_module_name, 'Status Code', x_status_code);
7073: wsh_debug_sv.pop (l_module_name);
7074: END IF;
7075: --
7076: EXCEPTION
7077: WHEN FND_API.G_EXC_ERROR THEN
7081: p_data => x_msg_data,
7082: p_encoded => FND_API.G_FALSE );
7083: --
7084: IF l_debug_on THEN
7085: WSH_DEBUG_SV.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured', WSH_DEBUG_SV.C_EXCEP_LEVEL);
7086: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
7087: END IF;
7088: --
7089: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
7082: p_encoded => FND_API.G_FALSE );
7083: --
7084: IF l_debug_on THEN
7085: WSH_DEBUG_SV.logmsg(l_module_name, 'FND_API.G_EXC_ERROR exception has occured', WSH_DEBUG_SV.C_EXCEP_LEVEL);
7086: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
7087: END IF;
7088: --
7089: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
7090: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
7093: p_data => x_msg_data,
7094: p_encoded => FND_API.G_FALSE );
7095: --
7096: IF l_debug_on THEN
7097: WSH_DEBUG_SV.logmsg(l_module_name, 'FND_API.G_EXC_UNEXPECTED_ERROR exception has occured', WSH_DEBUG_SV.C_EXCEP_LEVEL);
7098: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
7099: END IF;
7100: --
7101: WHEN OTHERS THEN
7094: p_encoded => FND_API.G_FALSE );
7095: --
7096: IF l_debug_on THEN
7097: WSH_DEBUG_SV.logmsg(l_module_name, 'FND_API.G_EXC_UNEXPECTED_ERROR exception has occured', WSH_DEBUG_SV.C_EXCEP_LEVEL);
7098: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
7099: END IF;
7100: --
7101: WHEN OTHERS THEN
7102: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
7102: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
7103: wsh_util_core.default_handler('WSH_DELIVERY_VALIDATIONS.Get_Delivery_Status');
7104: --
7105: IF l_debug_on THEN
7106: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM, WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
7107: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:OTHERS');
7108: END IF;
7109: --
7110: END Get_Delivery_Status;
7103: wsh_util_core.default_handler('WSH_DELIVERY_VALIDATIONS.Get_Delivery_Status');
7104: --
7105: IF l_debug_on THEN
7106: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM, WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
7107: WSH_DEBUG_SV.pop(l_module_name, 'EXCEPTION:OTHERS');
7108: END IF;
7109: --
7110: END Get_Delivery_Status;
7111: