309: p_context IN context_rec_type)
310: RETURN VARCHAR2;
311:
312: PROCEDURE Log_WV_Exceptions(
313: p_details_loc_tab in wsh_util_core.id_tab_type,
314: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
315: p_stops_loc_tab in wsh_util_core.id_tab_type,
316: x_return_status out NOCOPY varchar2);
317:
310: RETURN VARCHAR2;
311:
312: PROCEDURE Log_WV_Exceptions(
313: p_details_loc_tab in wsh_util_core.id_tab_type,
314: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
315: p_stops_loc_tab in wsh_util_core.id_tab_type,
316: x_return_status out NOCOPY varchar2);
317:
318:
311:
312: PROCEDURE Log_WV_Exceptions(
313: p_details_loc_tab in wsh_util_core.id_tab_type,
314: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
315: p_stops_loc_tab in wsh_util_core.id_tab_type,
316: x_return_status out NOCOPY varchar2);
317:
318:
319: --
376: IF l_debug_on THEN
377: WSH_DEBUG_SV.push(l_module_name);
378: END IF;
379:
380: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
381:
382: l_index := p_group_ids.FIRST;
383: WHILE l_index IS NOT NULL LOOP
384: SAVEPOINT before_group;
410: x_errors_tab => l_errors_tab,
411: x_return_status => l_return_status
412: );
413:
414: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
415: GOTO group_error;
416: END IF;
417:
418:
424: x_errors_tab => l_errors_tab,
425: x_return_status => l_return_status
426: );
427:
428: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
429: GOTO group_error;
430: END IF;
431:
432:
450: x_errors_tab => l_errors_tab,
451: x_return_status => l_return_status
452: );
453:
454: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
455: GOTO group_error;
456: END IF;
457:
458: -- identify shipping records that need to be
473: x_errors_tab => l_errors_tab,
474: x_return_status => l_return_status
475: );
476:
477: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
478: GOTO group_error;
479: END IF;
480:
481: -- execute the actions to split, create, unassign, update
498: x_errors_tab => l_errors_tab,
499: x_return_status => l_return_status
500: );
501:
502: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
503: GOTO group_error;
504: END IF;
505:
506:
520: x_errors_tab => l_errors_tab,
521: x_return_status => l_return_status
522: );
523:
524: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
525: GOTO group_error;
526: END IF;
527:
528: IF l_debug_on THEN
573: x_obsoleted_trip_moves => l_obsoleted_trip_moves
574: );
575: END IF;
576:
577: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
578: -- unexpected error needs to set a TP failure message,
579: -- so that we can pull the detail messages.
580: stamp_interface_error(p_group_id => l_context.group_id,
581: p_entity_table_name => 'NONE',
612: IF l_debug_on THEN
613: WSH_DEBUG_SV.log(l_module_name,'l_group_error_count', l_group_error_count);
614: END IF;
615:
616: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
617:
618: IF l_group_error_count > 0
619: AND l_group_error_count < p_group_ids.COUNT THEN
620: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
616: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
617:
618: IF l_group_error_count > 0
619: AND l_group_error_count < p_group_ids.COUNT THEN
620: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
621: ELSIF l_group_error_count = p_group_ids.COUNT THEN
622: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
623: END IF;
624:
618: IF l_group_error_count > 0
619: AND l_group_error_count < p_group_ids.COUNT THEN
620: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
621: ELSIF l_group_error_count = p_group_ids.COUNT THEN
622: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
623: END IF;
624:
625: IF l_debug_on THEN
626: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
631: WHEN OTHERS THEN
632: IF l_savepoint_set THEN
633: ROLLBACK TO before_group;
634: END IF;
635: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
636: WSH_UTIL_CORE.DEFAULT_HANDLER(
637: 'WSH_TP_RELEASE.RELEASE_PLAN',
638: l_module_name);
639:
632: IF l_savepoint_set THEN
633: ROLLBACK TO before_group;
634: END IF;
635: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
636: WSH_UTIL_CORE.DEFAULT_HANDLER(
637: 'WSH_TP_RELEASE.RELEASE_PLAN',
638: l_module_name);
639:
640: IF l_debug_on THEN
772: WSH_FTE_TP_INTEGRATION.purge_interface_tables(
773: p_group_ids => p_group_ids,
774: x_return_status => x_return_status);
775:
776: IF x_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
777: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
778: IF l_debug_on THEN
779: WSH_DEBUG_SV.log(l_module_name, 'FTE interface tables failed: x_return_status', x_return_status);
780: WSH_DEBUG_SV.pop(l_module_name);
773: p_group_ids => p_group_ids,
774: x_return_status => x_return_status);
775:
776: IF x_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
777: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
778: IF l_debug_on THEN
779: WSH_DEBUG_SV.log(l_module_name, 'FTE interface tables failed: x_return_status', x_return_status);
780: WSH_DEBUG_SV.pop(l_module_name);
781: END IF;
805: commit;
806: END IF;
807:
808:
809: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
810:
811: --
812: --
813: IF l_debug_on THEN
816: END IF;
817:
818: EXCEPTION
819: WHEN OTHERS THEN
820: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
821: WSH_UTIL_CORE.DEFAULT_HANDLER(
822: 'WSH_TP_RELEASE.PURGE_INTERFACE_TABLES',
823: l_module_name);
824:
817:
818: EXCEPTION
819: WHEN OTHERS THEN
820: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
821: WSH_UTIL_CORE.DEFAULT_HANDLER(
822: 'WSH_TP_RELEASE.PURGE_INTERFACE_TABLES',
823: l_module_name);
824:
825: IF l_debug_on THEN
934: END IF;
935:
936: EXCEPTION
937: WHEN OTHERS THEN
938: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
939: WSH_UTIL_CORE.DEFAULT_HANDLER(
940: 'WSH_TP_RELEASE.INIT_CONTEXT',
941: l_module_name);
942:
935:
936: EXCEPTION
937: WHEN OTHERS THEN
938: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
939: WSH_UTIL_CORE.DEFAULT_HANDLER(
940: 'WSH_TP_RELEASE.INIT_CONTEXT',
941: l_module_name);
942:
943: IF l_debug_on THEN
1144: and wndi.interface_action_code = G_TP_RELEASE_CODE
1145: and rownum = 1;
1146:
1147: l_released_status VARCHAR2(1);
1148: l_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1145: and rownum = 1;
1146:
1147: l_released_status VARCHAR2(1);
1148: l_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1146:
1147: l_released_status VARCHAR2(1);
1148: l_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1147: l_released_status VARCHAR2(1);
1148: l_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1155: l_tp_del_numbers WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1148: l_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1155: l_tp_del_numbers WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1156: l_delivery_detail NUMBER;
1149: l_split_from_dd_id WSH_UTIL_CORE.ID_TAB_TYPE;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1155: l_tp_del_numbers WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1156: l_delivery_detail NUMBER;
1157: l_count NUMBER := 0;
1150: l_dd_interface_id WSH_UTIL_CORE.ID_TAB_TYPE;
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1155: l_tp_del_numbers WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1156: l_delivery_detail NUMBER;
1157: l_count NUMBER := 0;
1158: l_return_status VARCHAR2(1);
1151: l_source_codes WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1152: l_source_headers WSH_UTIL_CORE.ID_TAB_TYPE;
1153: l_source_lines WSH_UTIL_CORE.ID_TAB_TYPE;
1154: l_source_line_sets WSH_UTIL_CORE.ID_TAB_TYPE;
1155: l_tp_del_numbers WSH_UTIL_CORE.COLUMN_TAB_TYPE;
1156: l_delivery_detail NUMBER;
1157: l_count NUMBER := 0;
1158: l_return_status VARCHAR2(1);
1159: l_notfound BOOLEAN;
1374: p_entity_interface_id => -1,
1375: p_message_name => 'WSH_TP_F_NO_INT_LINES',
1376: x_errors_tab => x_errors_tab,
1377: x_return_status => l_return_status);
1378: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1379: IF l_debug_on THEN
1380: WSH_DEBUG_SV.pop(l_module_name);
1381: END IF;
1382: RETURN;
1382: RETURN;
1383: END IF;
1384: END IF;
1385:
1386: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
1387:
1388: --
1389: --
1390: IF l_debug_on THEN
1414: END IF;
1415: IF c_tp_dangling_conts%ISOPEN THEN
1416: CLOSE c_tp_dangling_conts;
1417: END IF;
1418: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1419: IF l_debug_on THEN
1420: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_INV_REL_STATUS_ERROR');
1421: END IF;
1422:
1441: END IF;
1442: IF c_tp_dangling_conts%ISOPEN THEN
1443: CLOSE c_tp_dangling_conts;
1444: END IF;
1445: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1446: WSH_UTIL_CORE.DEFAULT_HANDLER(
1447: 'WSH_TP_RELEASE.RESYNC_INTERFACE_TABLES',
1448: l_module_name);
1449:
1442: IF c_tp_dangling_conts%ISOPEN THEN
1443: CLOSE c_tp_dangling_conts;
1444: END IF;
1445: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1446: WSH_UTIL_CORE.DEFAULT_HANDLER(
1447: 'WSH_TP_RELEASE.RESYNC_INTERFACE_TABLES',
1448: l_module_name);
1449:
1450: IF l_debug_on THEN
1842: AND wts_do.stop_id = wdl.drop_off_stop_id
1843: AND wt.trip_id = wts_pu.trip_id
1844: ORDER BY wdl.delivery_leg_id;
1845:
1846: l_snapshot_leg_ids wsh_util_core.id_tab_type;
1847: l_snapshot_trip_ids wsh_util_core.id_tab_type;
1848: l_snapshot_trip_plan_flags planned_flag_tab_type;
1849: l_snapshot_pu_stop_ids wsh_util_core.id_tab_type;
1850: l_snapshot_pu_seq_nums wsh_util_core.id_tab_type;
1843: AND wt.trip_id = wts_pu.trip_id
1844: ORDER BY wdl.delivery_leg_id;
1845:
1846: l_snapshot_leg_ids wsh_util_core.id_tab_type;
1847: l_snapshot_trip_ids wsh_util_core.id_tab_type;
1848: l_snapshot_trip_plan_flags planned_flag_tab_type;
1849: l_snapshot_pu_stop_ids wsh_util_core.id_tab_type;
1850: l_snapshot_pu_seq_nums wsh_util_core.id_tab_type;
1851: l_snapshot_pu_loc_ids wsh_util_core.id_tab_type;
1845:
1846: l_snapshot_leg_ids wsh_util_core.id_tab_type;
1847: l_snapshot_trip_ids wsh_util_core.id_tab_type;
1848: l_snapshot_trip_plan_flags planned_flag_tab_type;
1849: l_snapshot_pu_stop_ids wsh_util_core.id_tab_type;
1850: l_snapshot_pu_seq_nums wsh_util_core.id_tab_type;
1851: l_snapshot_pu_loc_ids wsh_util_core.id_tab_type;
1852: l_snapshot_pu_arrive_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1846: l_snapshot_leg_ids wsh_util_core.id_tab_type;
1847: l_snapshot_trip_ids wsh_util_core.id_tab_type;
1848: l_snapshot_trip_plan_flags planned_flag_tab_type;
1849: l_snapshot_pu_stop_ids wsh_util_core.id_tab_type;
1850: l_snapshot_pu_seq_nums wsh_util_core.id_tab_type;
1851: l_snapshot_pu_loc_ids wsh_util_core.id_tab_type;
1852: l_snapshot_pu_arrive_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1847: l_snapshot_trip_ids wsh_util_core.id_tab_type;
1848: l_snapshot_trip_plan_flags planned_flag_tab_type;
1849: l_snapshot_pu_stop_ids wsh_util_core.id_tab_type;
1850: l_snapshot_pu_seq_nums wsh_util_core.id_tab_type;
1851: l_snapshot_pu_loc_ids wsh_util_core.id_tab_type;
1852: l_snapshot_pu_arrive_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1855: l_snapshot_do_stop_ids wsh_util_core.id_tab_type;
1851: l_snapshot_pu_loc_ids wsh_util_core.id_tab_type;
1852: l_snapshot_pu_arrive_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1855: l_snapshot_do_stop_ids wsh_util_core.id_tab_type;
1856: l_snapshot_do_phys_stop_ids wsh_util_core.id_tab_type;
1857: l_snapshot_do_seq_nums wsh_util_core.id_tab_type;
1858: l_snapshot_do_loc_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1852: l_snapshot_pu_arrive_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1855: l_snapshot_do_stop_ids wsh_util_core.id_tab_type;
1856: l_snapshot_do_phys_stop_ids wsh_util_core.id_tab_type;
1857: l_snapshot_do_seq_nums wsh_util_core.id_tab_type;
1858: l_snapshot_do_loc_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1853: l_snapshot_pu_depart_dates date_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1855: l_snapshot_do_stop_ids wsh_util_core.id_tab_type;
1856: l_snapshot_do_phys_stop_ids wsh_util_core.id_tab_type;
1857: l_snapshot_do_seq_nums wsh_util_core.id_tab_type;
1858: l_snapshot_do_loc_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1854: l_snapshot_pu_wv_flag planned_flag_tab_type;
1855: l_snapshot_do_stop_ids wsh_util_core.id_tab_type;
1856: l_snapshot_do_phys_stop_ids wsh_util_core.id_tab_type;
1857: l_snapshot_do_seq_nums wsh_util_core.id_tab_type;
1858: l_snapshot_do_loc_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1858: l_snapshot_do_loc_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1859: l_snapshot_do_arrive_dates date_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1867: l_snapshot_lane_ids wsh_util_core.id_tab_type;
1860: l_snapshot_do_depart_dates date_tab_type;
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1867: l_snapshot_lane_ids wsh_util_core.id_tab_type;
1868:
1861: l_snapshot_do_wv_flag planned_flag_tab_type;
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1867: l_snapshot_lane_ids wsh_util_core.id_tab_type;
1868:
1869: -- c_physical_stop looks up the physical stop's dates for matching plan
1862: l_snapshot_carrier_ids wsh_util_core.id_tab_type;
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1867: l_snapshot_lane_ids wsh_util_core.id_tab_type;
1868:
1869: -- c_physical_stop looks up the physical stop's dates for matching plan
1870: CURSOR c_physical_stop(p_stop_id IN NUMBER) IS
1863: l_snapshot_modes wsh_util_core.column_tab_type;
1864: l_snapshot_service_levels wsh_util_core.column_tab_type;
1865: l_snapshot_veh_org_ids wsh_util_core.id_tab_type;
1866: l_snapshot_veh_item_ids wsh_util_core.id_tab_type;
1867: l_snapshot_lane_ids wsh_util_core.id_tab_type;
1868:
1869: -- c_physical_stop looks up the physical stop's dates for matching plan
1870: CURSOR c_physical_stop(p_stop_id IN NUMBER) IS
1871: SELECT planned_arrival_date,
2044: WSH_LOCATIONS_PKG.convert_internal_cust_location(
2045: p_internal_cust_location_id => x_plan_deliveries(l_new_index).ultimate_dropoff_location_id,
2046: x_internal_org_location_id => x_plan_deliveries(l_new_index).physical_ultimate_do_loc_id,
2047: x_return_status => l_return_status);
2048: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
2049: stamp_interface_error(
2050: p_group_id => x_context.group_id,
2051: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
2052: p_entity_interface_id => idel.delivery_interface_id,
2054: p_token_1_name => 'PLAN_DEL_NUM',
2055: p_token_1_value => idel.tp_delivery_number,
2056: x_errors_tab => x_errors_tab,
2057: x_return_status => l_return_status);
2058: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2059: IF l_debug_on THEN
2060: WSH_DEBUG_SV.pop(l_module_name);
2061: END IF;
2062: RETURN;
2076: p_token_1_name => 'DELIVERY_NAME',
2077: p_token_1_value => idel.wsh_name,
2078: x_errors_tab => x_errors_tab,
2079: x_return_status => l_return_status);
2080: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2081: IF l_debug_on THEN
2082: WSH_DEBUG_SV.log(l_module_name, 'delivery key attributes do not match', x_return_status);
2083: WSH_DEBUG_SV.log(l_module_name, 'delivery_interface_id', idel.delivery_interface_id);
2084: WSH_DEBUG_SV.log(l_module_name, 'delivery_id', idel.delivery_id);
2102: p_token_1_name => 'DELIVERY_NAME',
2103: p_token_1_value => idel.wsh_name,
2104: x_errors_tab => x_errors_tab,
2105: x_return_status => l_return_status);
2106: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2107: IF l_debug_on THEN
2108: WSH_DEBUG_SV.pop(l_module_name);
2109: END IF;
2110: RETURN;
2123: p_token_3_name => 'PLAN_DEL_NUM',
2124: p_token_3_value => idel.tp_delivery_number,
2125: x_errors_tab => x_errors_tab,
2126: x_return_status => l_return_status);
2127: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2128: IF l_debug_on THEN
2129: WSH_DEBUG_SV.pop(l_module_name);
2130: END IF;
2131: RETURN;
2144: p_token_1_name => 'DELIVERY_NAME',
2145: p_token_1_value => idel.wsh_name,
2146: x_errors_tab => x_errors_tab,
2147: x_return_status => l_return_status);
2148: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2149: IF l_debug_on THEN
2150: WSH_DEBUG_SV.pop(l_module_name);
2151: END IF;
2152: RETURN;
2165: p_token_1_name => 'DELIVERY_NAME',
2166: p_token_1_value => idel.wsh_name,
2167: x_errors_tab => x_errors_tab,
2168: x_return_status => l_return_status);
2169: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2170: IF l_debug_on THEN
2171: WSH_DEBUG_SV.pop(l_module_name);
2172: END IF;
2173: RETURN;
2189: p_token_1_name => 'PLAN_TRIP_NUM',
2190: p_token_1_value => get_plan_trip_num(x_context),
2191: x_errors_tab => x_errors_tab,
2192: x_return_status => l_return_status);
2193: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2194: IF l_debug_on THEN
2195: WSH_DEBUG_SV.pop(l_module_name);
2196: END IF;
2197: RETURN;
2305: x_current_used_details => l_current_used_details,
2306: x_used_details => x_used_details,
2307: x_errors_tab => x_errors_tab,
2308: x_return_status => l_return_status);
2309: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
2310: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2311: IF l_debug_on THEN
2312: WSH_DEBUG_SV.pop(l_module_name);
2313: END IF;
2306: x_used_details => x_used_details,
2307: x_errors_tab => x_errors_tab,
2308: x_return_status => l_return_status);
2309: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
2310: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2311: IF l_debug_on THEN
2312: WSH_DEBUG_SV.pop(l_module_name);
2313: END IF;
2314: RETURN;
2545: p_token_1_name => 'DETAIL_ID',
2546: p_token_1_value => candidate.delivery_detail_id,
2547: x_errors_tab => x_errors_tab,
2548: x_return_status => l_return_status);
2549: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2550: IF l_debug_on THEN
2551: WSH_DEBUG_SV.pop(l_module_name);
2552: END IF;
2553: RETURN;
2910: p_token_1_name => 'CONTAINER_NAME',
2911: p_token_1_value => wsh_container_utilities.get_cont_name(x_track_conts(l_cont_index).topmost_cont_id),
2912: x_errors_tab => x_errors_tab,
2913: x_return_status => l_return_status);
2914: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2915: IF l_debug_on THEN
2916: WSH_DEBUG_SV.pop(l_module_name);
2917: END IF;
2918: RETURN;
3021: END IF;
3022: IF c_detail%ISOPEN THEN
3023: CLOSE c_detail;
3024: END IF;
3025: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3026: WSH_UTIL_CORE.DEFAULT_HANDLER(
3027: 'WSH_TP_RELEASE.GENERATE_LOCK_CANDIDATES(nested)',
3028: l_module_name);
3029:
3022: IF c_detail%ISOPEN THEN
3023: CLOSE c_detail;
3024: END IF;
3025: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3026: WSH_UTIL_CORE.DEFAULT_HANDLER(
3027: 'WSH_TP_RELEASE.GENERATE_LOCK_CANDIDATES(nested)',
3028: l_module_name);
3029:
3030: IF l_debug_on THEN
3097: p_entity_interface_id => iline.dd_interface_id,
3098: p_message_name => 'WSH_TP_F_LOC_CHANGE',
3099: x_errors_tab => x_errors_tab,
3100: x_return_status => l_return_status);
3101: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3102: IF l_debug_on THEN
3103: WSH_DEBUG_SV.pop(l_module_name);
3104: END IF;
3105: RETURN;
3121: p_token_1_name => 'DETAIL_ID',
3122: p_token_1_value => l_dummy_dd_id,
3123: x_errors_tab => x_errors_tab,
3124: x_return_status => l_return_status);
3125: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3126: IF l_debug_on THEN
3127: WSH_DEBUG_SV.pop(l_module_name);
3128: END IF;
3129: RETURN;
3145: p_token_1_name => 'PLAN_DEL_NUM',
3146: p_token_1_value => x_plan_deliveries(l_target_delivery_index).tp_delivery_number,
3147: x_errors_tab => x_errors_tab,
3148: x_return_status => l_return_status);
3149: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3150: IF l_debug_on THEN
3151: WSH_DEBUG_SV.pop(l_module_name);
3152: END IF;
3153: RETURN;
3169: x_current_used_details => l_current_used_details,
3170: x_used_details => x_used_details,
3171: x_errors_tab => x_errors_tab,
3172: x_return_status => l_return_status);
3173: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
3174: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3175: IF l_debug_on THEN
3176: WSH_DEBUG_SV.pop(l_module_name);
3177: END IF;
3170: x_used_details => x_used_details,
3171: x_errors_tab => x_errors_tab,
3172: x_return_status => l_return_status);
3173: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
3174: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3175: IF l_debug_on THEN
3176: WSH_DEBUG_SV.pop(l_module_name);
3177: END IF;
3178: RETURN;
3204: p_token_1_name => 'PLAN_TRIP_NUM',
3205: p_token_1_value => get_plan_trip_num(x_context),
3206: x_errors_tab => x_errors_tab,
3207: x_return_status => l_return_status);
3208: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3209: IF l_debug_on THEN
3210: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
3211: WSH_DEBUG_SV.pop(l_module_name);
3212: END IF;
3233: IF x_plan_deliveries(l_new_index).ilines_count > 0
3234: AND x_plan_deliveries(l_new_index).lines_count = 0 THEN
3235: -- fail the plan because this delivery has plan lines
3236: -- and none of them has been mapped.
3237: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3238: stamp_interface_error(
3239: p_group_id => x_context.group_id,
3240: p_entity_table_name => 'WSH_NEW_DEL_INTERFACE',
3241: p_entity_interface_id => x_plan_deliveries(l_new_index).del_interface_id,
3255: OR (x_plan_deliveries(l_new_index).wsh_planned_flag <>
3256: x_plan_deliveries(l_new_index).planned_flag) THEN
3257: -- fail the plan because this empty delivery with dangling
3258: -- containers does not exist or does not have the original firm status.
3259: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3260: stamp_interface_error(
3261: p_group_id => x_context.group_id,
3262: p_entity_table_name => 'WSH_NEW_DEL_INTERFACE',
3263: p_entity_interface_id => x_plan_deliveries(l_new_index).del_interface_id,
3277: x_plan_deliveries => x_plan_deliveries,
3278: x_errors_tab => x_errors_tab,
3279: x_return_status => l_return_status);
3280:
3281: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR
3282: AND x_return_status <> WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3283: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3284: EXIT; -- stop processing as soon as we know release will fail.
3285: ELSIF l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3278: x_errors_tab => x_errors_tab,
3279: x_return_status => l_return_status);
3280:
3281: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR
3282: AND x_return_status <> WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3283: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3284: EXIT; -- stop processing as soon as we know release will fail.
3285: ELSIF l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3286: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3279: x_return_status => l_return_status);
3280:
3281: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR
3282: AND x_return_status <> WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3283: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3284: EXIT; -- stop processing as soon as we know release will fail.
3285: ELSIF l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3286: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3287: EXIT; -- unexpected error should stop the loop.
3281: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR
3282: AND x_return_status <> WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3283: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3284: EXIT; -- stop processing as soon as we know release will fail.
3285: ELSIF l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3286: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3287: EXIT; -- unexpected error should stop the loop.
3288: END IF;
3289:
3282: AND x_return_status <> WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3283: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3284: EXIT; -- stop processing as soon as we know release will fail.
3285: ELSIF l_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR THEN
3286: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
3287: EXIT; -- unexpected error should stop the loop.
3288: END IF;
3289:
3290: END IF;
3291:
3292: l_new_index := x_plan_deliveries.NEXT(l_new_index);
3293: END LOOP;
3294:
3295: IF x_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
3296: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3297: IF l_debug_on THEN
3298: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
3299: WSH_DEBUG_SV.pop(l_module_name);
3292: l_new_index := x_plan_deliveries.NEXT(l_new_index);
3293: END LOOP;
3294:
3295: IF x_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
3296: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3297: IF l_debug_on THEN
3298: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
3299: WSH_DEBUG_SV.pop(l_module_name);
3300: END IF;
3331:
3332: l_new_index := x_track_conts.NEXT(l_new_index);
3333: END LOOP;
3334:
3335: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3336: IF l_debug_on THEN
3337: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
3338: WSH_DEBUG_SV.pop(l_module_name);
3339: END IF;
3369: p_token_3_name => 'PLAN_DEL_NUM',
3370: p_token_3_value => x_plan_deliveries(l_target_delivery_index).tp_delivery_number,
3371: x_errors_tab => x_errors_tab,
3372: x_return_status => l_return_status);
3373: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3374: IF l_debug_on THEN
3375: WSH_DEBUG_SV.log(l_module_name, 'unused line in firmed del: x_return_status', x_return_status);
3376: WSH_DEBUG_SV.pop(l_module_name);
3377: END IF;
3515: p_token_1_name => 'TRIP_NAME',
3516: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(l_new_index).trip_id),
3517: x_errors_tab => x_errors_tab,
3518: x_return_status => l_return_status);
3519: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3520: IF l_debug_on THEN
3521: WSH_DEBUG_SV.log(l_module_name, 'firmed trip not matched: x_return_status', x_return_status);
3522: WSH_DEBUG_SV.log(l_module_name, 'trip_interface_id', itrip.trip_interface_id);
3523: WSH_DEBUG_SV.log(l_module_name, 'trip_id', itrip.trip_id);
3554: p_token_1_name => 'TRIP_NAME',
3555: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(l_new_index).trip_id),
3556: x_errors_tab => x_errors_tab,
3557: x_return_status => l_return_status);
3558: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3559: IF l_debug_on THEN
3560: WSH_DEBUG_SV.log(l_module_name, 'trip not locked: x_return_status', x_return_status);
3561: WSH_DEBUG_SV.pop(l_module_name);
3562: END IF;
3587: p_caller => 'WSH_TP_RELEASE');
3588:
3589:
3590: -- warning means something could not be looked up even if some values are valid.
3591: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_WARNING,
3592: WSH_UTIL_CORE.G_RET_STS_ERROR,
3593: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3594: stamp_interface_error(
3595: p_group_id => x_context.group_id,
3588:
3589:
3590: -- warning means something could not be looked up even if some values are valid.
3591: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_WARNING,
3592: WSH_UTIL_CORE.G_RET_STS_ERROR,
3593: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3594: stamp_interface_error(
3595: p_group_id => x_context.group_id,
3596: p_entity_table_name => 'WSH_TRIPS_INTERFACE',
3589:
3590: -- warning means something could not be looked up even if some values are valid.
3591: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_WARNING,
3592: WSH_UTIL_CORE.G_RET_STS_ERROR,
3593: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
3594: stamp_interface_error(
3595: p_group_id => x_context.group_id,
3596: p_entity_table_name => 'WSH_TRIPS_INTERFACE',
3597: p_entity_interface_id => itrip.trip_interface_id,
3605: p_token_4_name => 'SERVICE_LEVEL',
3606: p_token_4_value => itrip.service_level, --!!! lookup
3607: x_errors_tab => x_errors_tab,
3608: x_return_status => l_return_status);
3609: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3610: IF l_debug_on THEN
3611: WSH_DEBUG_SV.log(l_module_name, 'invalid freight carrier: x_return_status', x_return_status);
3612: WSH_DEBUG_SV.pop(l_module_name);
3613: END IF;
3683: p_token_1_name => 'TRIP_NAME',
3684: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(l_new_index).trip_id),
3685: x_errors_tab => x_errors_tab,
3686: x_return_status => l_return_status);
3687: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3688: IF l_debug_on THEN
3689: WSH_DEBUG_SV.log(l_module_name, 'stop not locked: x_return_status', x_return_status);
3690: WSH_DEBUG_SV.pop(l_module_name);
3691: END IF;
3707: p_token_2_name => 'PLAN_TRIP_NUM',
3708: p_token_2_value => x_plan_trips(l_new_index).tp_trip_number,
3709: x_errors_tab => x_errors_tab,
3710: x_return_status => l_return_status);
3711: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3712: IF l_debug_on THEN
3713: WSH_DEBUG_SV.log(l_module_name, 'stop not mapped: x_return_status', x_return_status);
3714: WSH_DEBUG_SV.pop(l_module_name);
3715: END IF;
3781: p_token_1_value =>
3782: WSH_NEW_DELIVERIES_PVT.get_name(x_plan_deliveries(l_plan_del_index).delivery_id),
3783: x_errors_tab => x_errors_tab,
3784: x_return_status => l_return_status);
3785: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
3786: IF l_debug_on THEN
3787: WSH_DEBUG_SV.log(l_module_name, 'stop not locked: x_return_status', x_return_status);
3788: WSH_DEBUG_SV.pop(l_module_name);
3789: END IF;
4085: p_token_1_name => 'TRIP_NAME',
4086: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(l_trip_index).trip_id),
4087: x_errors_tab => x_errors_tab,
4088: x_return_status => l_return_status);
4089: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4090: IF l_debug_on THEN
4091: WSH_DEBUG_SV.log(l_module_name, 'leg: trip not locked: x_return_status', x_return_status);
4092: WSH_DEBUG_SV.pop(l_module_name);
4093: END IF;
4135: p_token_2_name => 'STOP_SEQUENCE',
4136: p_token_2_value => x_plan_stops(l_stop_index).stop_sequence_number,
4137: x_errors_tab => x_errors_tab,
4138: x_return_status => l_return_status);
4139: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4140: IF l_debug_on THEN
4141: WSH_DEBUG_SV.log(l_module_name, 'leg: stop not locked: x_return_status', x_return_status);
4142: WSH_DEBUG_SV.pop(l_module_name);
4143: END IF;
4179: p_token_1_name => 'TRIP_NAME',
4180: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(l_trip_index).trip_id),
4181: x_errors_tab => x_errors_tab,
4182: x_return_status => l_return_status);
4183: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4184: IF l_debug_on THEN
4185: WSH_DEBUG_SV.log(l_module_name, 'leg: stop not mapped: x_return_status', x_return_status);
4186: WSH_DEBUG_SV.pop(l_module_name);
4187: END IF;
4241: p_message_name => 'WSH_TP_F_INT_LOC_CHANGED', --!!! new message
4242: p_token_1_name => 'PLAN_DEL_NUM',
4243: p_token_1_value => x_plan_deliveries(l_plan_del_index).tp_delivery_number,
4244: p_token_2_name => 'PHYS_LOC_CODE',
4245: p_token_2_value => WSH_UTIL_CORE.Get_Location_Description(
4246: p_location_id => x_plan_stops(l_last_do_stop_index).stop_location_id,
4247: p_format => 'NEW UI CODE'),
4248: p_token_3_name => 'INT_LOC_CODE',
4249: p_token_3_value => WSH_UTIL_CORE.Get_Location_Description(
4245: p_token_2_value => WSH_UTIL_CORE.Get_Location_Description(
4246: p_location_id => x_plan_stops(l_last_do_stop_index).stop_location_id,
4247: p_format => 'NEW UI CODE'),
4248: p_token_3_name => 'INT_LOC_CODE',
4249: p_token_3_value => WSH_UTIL_CORE.Get_Location_Description(
4250: p_location_id => x_plan_deliveries(l_plan_del_index).ultimate_dropoff_location_id,
4251: p_format => 'NEW UI CODE'),
4252: x_errors_tab => x_errors_tab,
4253: x_return_status => l_return_status);
4250: p_location_id => x_plan_deliveries(l_plan_del_index).ultimate_dropoff_location_id,
4251: p_format => 'NEW UI CODE'),
4252: x_errors_tab => x_errors_tab,
4253: x_return_status => l_return_status);
4254: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4255: IF l_debug_on THEN
4256: WSH_DEBUG_SV.log(l_module_name, 'firmed delivery with extra leg: x_return_status', x_return_status);
4257: WSH_DEBUG_SV.pop(l_module_name);
4258: END IF;
4273: p_token_2_name => 'PLAN_TRIP_NUM',
4274: p_token_2_value => x_plan_trips(1).tp_trip_number,
4275: x_errors_tab => x_errors_tab,
4276: x_return_status => l_return_status);
4277: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4278: IF l_debug_on THEN
4279: WSH_DEBUG_SV.log(l_module_name, 'firmed delivery with extra leg: x_return_status', x_return_status);
4280: WSH_DEBUG_SV.pop(l_module_name);
4281: END IF;
4304: p_token_2_name => 'PLAN_TRIP_NUM',
4305: p_token_2_value => x_plan_trips(1).tp_trip_number,
4306: x_errors_tab => x_errors_tab,
4307: x_return_status => l_return_status);
4308: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4309: IF l_debug_on THEN
4310: WSH_DEBUG_SV.log(l_module_name, 'delivery with extra firmed leg: x_return_status', x_return_status);
4311: WSH_DEBUG_SV.pop(l_module_name);
4312: END IF;
4344: x_errors_tab => x_errors_tab,
4345: x_return_status => l_return_status
4346: );
4347:
4348: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4349: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4350: x_return_status := l_return_status;
4351: IF l_debug_on THEN
4352: WSH_DEBUG_SV.log(l_module_name, 'map_moves failed: x_return_status', x_return_status);
4345: x_return_status => l_return_status
4346: );
4347:
4348: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4349: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4350: x_return_status := l_return_status;
4351: IF l_debug_on THEN
4352: WSH_DEBUG_SV.log(l_module_name, 'map_moves failed: x_return_status', x_return_status);
4353: WSH_DEBUG_SV.pop(l_module_name);
4364: END IF;
4365:
4366: EXCEPTION
4367: WHEN OTHERS THEN
4368: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
4369: WSH_UTIL_CORE.DEFAULT_HANDLER(
4370: 'WSH_TP_RELEASE.GENERATE_LOCK_CANDIDATES',
4371: l_module_name);
4372:
4365:
4366: EXCEPTION
4367: WHEN OTHERS THEN
4368: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
4369: WSH_UTIL_CORE.DEFAULT_HANDLER(
4370: 'WSH_TP_RELEASE.GENERATE_LOCK_CANDIDATES',
4371: l_module_name);
4372:
4373: IF l_debug_on THEN
4455:
4456: l_return_status VARCHAR2(1);
4457:
4458: l_del_index NUMBER;
4459: l_indexes WSH_UTIL_CORE.ID_TAB_TYPE;
4460:
4461: l_discard_rs VARCHAR2(1);
4462: l_msg_data VARCHAR2(2000);
4463: l_msg_count NUMBER;
4493: x_errors_tab => x_errors_tab,
4494: x_return_status => l_return_status
4495: );
4496:
4497: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4498: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4499: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4500: IF l_debug_on THEN
4501: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4494: x_return_status => l_return_status
4495: );
4496:
4497: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4498: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4499: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4500: IF l_debug_on THEN
4501: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4502: WSH_DEBUG_SV.pop(l_module_name);
4495: );
4496:
4497: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4498: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4499: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4500: IF l_debug_on THEN
4501: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4502: WSH_DEBUG_SV.pop(l_module_name);
4503: END IF;
4523: x_errors_tab => x_errors_tab,
4524: x_return_status => l_return_status
4525: );
4526:
4527: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4528: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4529: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4530: IF l_debug_on THEN
4531: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4524: x_return_status => l_return_status
4525: );
4526:
4527: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4528: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4529: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4530: IF l_debug_on THEN
4531: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4532: WSH_DEBUG_SV.pop(l_module_name);
4525: );
4526:
4527: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4528: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4529: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4530: IF l_debug_on THEN
4531: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4532: WSH_DEBUG_SV.pop(l_module_name);
4533: END IF;
4555: x_errors_tab => x_errors_tab,
4556: x_return_status => l_return_status
4557: );
4558:
4559: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4560: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4561: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4562: IF l_debug_on THEN
4563: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4556: x_return_status => l_return_status
4557: );
4558:
4559: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4560: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4561: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4562: IF l_debug_on THEN
4563: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4564: WSH_DEBUG_SV.pop(l_module_name);
4557: );
4558:
4559: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
4560: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
4561: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4562: IF l_debug_on THEN
4563: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
4564: WSH_DEBUG_SV.pop(l_module_name);
4565: END IF;
4565: END IF;
4566: RETURN;
4567: END IF;
4568:
4569: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
4570:
4571: --
4572: --
4573: IF l_debug_on THEN
4576: END IF;
4577:
4578: EXCEPTION
4579: WHEN OTHERS THEN
4580: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
4581: WSH_UTIL_CORE.DEFAULT_HANDLER(
4582: 'WSH_TP_RELEASE.VALIDATE_PLAN',
4583: l_module_name);
4584:
4577:
4578: EXCEPTION
4579: WHEN OTHERS THEN
4580: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
4581: WSH_UTIL_CORE.DEFAULT_HANDLER(
4582: 'WSH_TP_RELEASE.VALIDATE_PLAN',
4583: l_module_name);
4584:
4585: IF l_debug_on THEN
4907: WSH_DEBUG_SV.log(l_module_name, 'l_dd_attrs.COUNT', l_dd_attrs.COUNT);
4908: END IF;
4909:
4910: -- convert warning to error if the count of valid ids does not match.
4911: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
4912: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
4913: IF l_debug_on THEN
4914: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
4915: END IF;
4910: -- convert warning to error if the count of valid ids does not match.
4911: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
4912: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
4913: IF l_debug_on THEN
4914: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
4915: END IF;
4916: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4917: END IF;
4918:
4912: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
4913: IF l_debug_on THEN
4914: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
4915: END IF;
4916: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
4917: END IF;
4918:
4919: l_interface_entity := 'NONE';
4920: l_interface_id := -1;
4918:
4919: l_interface_entity := 'NONE';
4920: l_interface_id := -1;
4921: l_message_name := 'WSH_TP_F_DEL_UNASSIGNS';
4922: wsh_util_core.api_post_call(
4923: p_return_status => l_return_status,
4924: x_num_warnings => l_number_of_warnings,
4925: x_num_errors => l_number_of_errors);
4926: END IF;
4988:
4989: l_interface_entity := 'NONE';
4990: l_interface_id := -1;
4991: l_message_name := 'WSH_TP_F_TRIP_UNASSIGNS';
4992: wsh_util_core.api_post_call(
4993: p_return_status => l_return_status,
4994: x_num_warnings => l_number_of_warnings,
4995: x_num_errors => l_number_of_errors);
4996:
5040: -- bug 3593690: fail release if delivery cannot be populated
5041: -- usually because shipping parameters are missing.
5042: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5043: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5044: wsh_util_core.api_post_call(
5045: p_return_status => l_return_status,
5046: x_num_warnings => l_number_of_warnings,
5047: x_num_errors => l_number_of_errors);
5048:
5059: x_msg_data => l_msg_data);
5060:
5061: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5062: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5063: wsh_util_core.api_post_call(
5064: p_return_status => l_return_status,
5065: x_num_warnings => l_number_of_warnings,
5066: x_num_errors => l_number_of_errors);
5067:
5087: x_plan_trips => x_plan_trips,
5088: x_errors_tab => x_errors_tab,
5089: x_return_status => l_return_status
5090: );
5091: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5092: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5093: x_return_status := l_return_status;
5094: RETURN;
5095: END IF;
5088: x_errors_tab => x_errors_tab,
5089: x_return_status => l_return_status
5090: );
5091: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5092: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5093: x_return_status := l_return_status;
5094: RETURN;
5095: END IF;
5096:
5130:
5131: l_interface_entity := 'NONE';
5132: l_interface_id := -1;
5133: l_message_name := 'WSH_TP_F_OBSOLETED_STOPS';
5134: wsh_util_core.api_post_call(
5135: p_return_status => l_return_status,
5136: x_num_warnings => l_number_of_warnings,
5137: x_num_errors => l_number_of_errors);
5138:
5187:
5188: l_interface_entity := 'WSH_TRIP_STOPS_INTERFACE';
5189: l_interface_id := x_plan_stops(l_index).stop_interface_id;
5190:
5191: wsh_util_core.api_post_call(
5192: p_return_status => l_return_status,
5193: x_num_warnings => l_number_of_warnings,
5194: x_num_errors => l_number_of_errors);
5195:
5213: x_plan_trips => x_plan_trips,
5214: x_errors_tab => x_errors_tab,
5215: x_return_status => l_return_status
5216: );
5217: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5218: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5219: x_return_status := l_return_status;
5220: RETURN;
5221: END IF;
5214: x_errors_tab => x_errors_tab,
5215: x_return_status => l_return_status
5216: );
5217: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5218: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5219: x_return_status := l_return_status;
5220: RETURN;
5221: END IF;
5222:
5270:
5271: l_interface_entity := 'WSH_DEL_DETAILS_INTERFACE';
5272: l_interface_id := x_plan_details(l_index).dd_interface_id;
5273: l_message_name := 'WSH_TP_F_LINE_SPLIT';
5274: wsh_util_core.api_post_call(
5275: p_return_status => l_return_status,
5276: x_num_warnings => l_number_of_warnings,
5277: x_num_errors => l_number_of_errors);
5278:
5400: WSH_DEBUG_SV.log(l_module_name, 'l_dd_attrs.COUNT', l_dd_attrs.COUNT);
5401: END IF;
5402:
5403: -- convert warning to error if the count of valid ids does not match.
5404: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5405: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5406: IF l_debug_on THEN
5407: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5408: END IF;
5403: -- convert warning to error if the count of valid ids does not match.
5404: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5405: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5406: IF l_debug_on THEN
5407: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5408: END IF;
5409: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5410: END IF;
5411:
5405: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5406: IF l_debug_on THEN
5407: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5408: END IF;
5409: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5410: END IF;
5411:
5412: l_interface_entity := 'NONE';
5413: l_interface_id := -1;
5411:
5412: l_interface_entity := 'NONE';
5413: l_interface_id := -1;
5414: l_message_name := 'WSH_TP_F_UNASSIGN_UNUSED';
5415: wsh_util_core.api_post_call(
5416: p_return_status => l_return_status,
5417: x_num_warnings => l_number_of_warnings,
5418: x_num_errors => l_number_of_errors);
5419: END IF;
5444: WSH_DEBUG_SV.log(l_module_name, 'l_sd_dd_attrs.COUNT', l_sd_dd_attrs.COUNT);
5445: END IF;
5446:
5447: -- convert warning to error if the count of valid ids does not match.
5448: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5449: AND l_dd_action_rec.valid_id_tab.COUNT < l_sd_dd_attrs.COUNT) THEN
5450: IF l_debug_on THEN
5451: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5452: END IF;
5447: -- convert warning to error if the count of valid ids does not match.
5448: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5449: AND l_dd_action_rec.valid_id_tab.COUNT < l_sd_dd_attrs.COUNT) THEN
5450: IF l_debug_on THEN
5451: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5452: END IF;
5453: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5454: END IF;
5455:
5449: AND l_dd_action_rec.valid_id_tab.COUNT < l_sd_dd_attrs.COUNT) THEN
5450: IF l_debug_on THEN
5451: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5452: END IF;
5453: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5454: END IF;
5455:
5456: l_interface_entity := 'NONE';
5457: l_interface_id := -1;
5455:
5456: l_interface_entity := 'NONE';
5457: l_interface_id := -1;
5458: l_message_name := 'WSH_TP_F_SPLITDEL_UNUSED';
5459: wsh_util_core.api_post_call(
5460: p_return_status => l_return_status,
5461: x_num_warnings => l_number_of_warnings,
5462: x_num_errors => l_number_of_errors);
5463: END IF;
5482: l_ship_params wsh_shipping_params_pvt.parameter_rec_typ;
5483: l_valid_flag BOOLEAN;
5484: l_unassign_index NUMBER := 0;
5485: l_unassign_details WSH_GLBL_VAR_STRCT_GRP.delivery_details_attr_tbl_type;
5486: l_unassign_deliveries WSH_UTIL_CORE.id_tab_type;
5487:
5488: BEGIN
5489: -- make a working copy of details that need assignments
5490: IF l_debug_on THEN
5590: WSH_DEBUG_SV.log(l_module_name, 'l_unassign_details.COUNT', l_unassign_details.COUNT);
5591: END IF;
5592:
5593: -- convert warning to error if the count of valid ids does not match.
5594: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5595: AND l_dd_action_rec.valid_id_tab.COUNT < l_unassign_details.COUNT) THEN
5596: IF l_debug_on THEN
5597: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5598: END IF;
5593: -- convert warning to error if the count of valid ids does not match.
5594: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5595: AND l_dd_action_rec.valid_id_tab.COUNT < l_unassign_details.COUNT) THEN
5596: IF l_debug_on THEN
5597: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5598: END IF;
5599: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5600: END IF;
5601:
5595: AND l_dd_action_rec.valid_id_tab.COUNT < l_unassign_details.COUNT) THEN
5596: IF l_debug_on THEN
5597: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5598: END IF;
5599: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5600: END IF;
5601:
5602: l_interface_entity := 'NONE';
5603: l_interface_id := -1;
5601:
5602: l_interface_entity := 'NONE';
5603: l_interface_id := -1;
5604: l_message_name := 'WSH_TP_F_UNASSIGNMENTS';
5605: wsh_util_core.api_post_call(
5606: p_return_status => l_return_status,
5607: x_num_warnings => l_number_of_warnings,
5608: x_num_errors => l_number_of_errors);
5609: END IF;
5717: WSH_DEBUG_SV.log(l_module_name, 'l_dd_attrs.COUNT', l_dd_attrs.COUNT);
5718: END IF;
5719:
5720: -- convert warning to error if the count of valid ids does not match.
5721: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5722: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5723: IF l_debug_on THEN
5724: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5725: END IF;
5720: -- convert warning to error if the count of valid ids does not match.
5721: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
5722: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5723: IF l_debug_on THEN
5724: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5725: END IF;
5726: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5727: END IF;
5728:
5722: AND l_dd_action_rec.valid_id_tab.COUNT < l_dd_attrs.COUNT) THEN
5723: IF l_debug_on THEN
5724: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
5725: END IF;
5726: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5727: END IF;
5728:
5729: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5730: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5728:
5729: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5730: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5731: l_message_name := 'WSH_TP_F_ASSIGN_DEL';
5732: wsh_util_core.api_post_call(
5733: p_return_status => l_return_status,
5734: x_num_warnings => l_number_of_warnings,
5735: x_num_errors => l_number_of_errors);
5736: END IF;
5747:
5748: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5749: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5750: l_message_name := 'WSH_TP_F_SHIP_PARAMS';
5751: wsh_util_core.api_post_call(
5752: p_return_status => l_return_status,
5753: x_num_warnings => l_number_of_warnings,
5754: x_num_errors => l_number_of_errors);
5755:
5765: x_valid_flag => l_valid_flag,
5766: x_return_status => l_return_status);
5767:
5768: IF NOT l_valid_flag THEN
5769: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5770: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5771: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5772: l_message_name := 'WSH_TP_F_BROKEN_SHIP_SET';
5773: wsh_util_core.api_post_call(
5769: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5770: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5771: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5772: l_message_name := 'WSH_TP_F_BROKEN_SHIP_SET';
5773: wsh_util_core.api_post_call(
5774: p_return_status => l_return_status,
5775: x_num_warnings => l_number_of_warnings,
5776: x_num_errors => l_number_of_errors);
5777: END IF;
5781: x_valid_flag => l_valid_flag,
5782: x_return_status => l_return_status);
5783:
5784: IF NOT l_valid_flag THEN
5785: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5786: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5787: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5788: l_message_name := 'WSH_TP_F_BROKEN_SMC';
5789: wsh_util_core.api_post_call(
5785: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
5786: l_interface_entity := 'WSH_NEW_DEL_INTERFACE';
5787: l_interface_id := x_plan_deliveries(l_index).del_interface_id;
5788: l_message_name := 'WSH_TP_F_BROKEN_SMC';
5789: wsh_util_core.api_post_call(
5790: p_return_status => l_return_status,
5791: x_num_warnings => l_number_of_warnings,
5792: x_num_errors => l_number_of_errors);
5793: END IF;
5905:
5906: l_interface_entity := 'WSH_DEL_LEGS_INTERFACE';
5907: l_interface_id := x_plan_legs(l_index).leg_interface_id;
5908: l_message_name := 'WSH_TP_F_ASSIGN_TRIP';
5909: wsh_util_core.api_post_call(
5910: p_return_status => l_return_status,
5911: x_num_warnings => l_number_of_warnings,
5912: x_num_errors => l_number_of_errors);
5913:
5938: x_errors_tab => x_errors_tab,
5939: x_return_status => l_return_status
5940: );
5941:
5942: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5943: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5944: x_return_status := l_return_status;
5945: IF l_debug_on THEN
5946: WSH_DEBUG_SV.log(l_module_name, 'reconcilate_moves failed: x_return_status', x_return_status);
5939: x_return_status => l_return_status
5940: );
5941:
5942: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
5943: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
5944: x_return_status := l_return_status;
5945: IF l_debug_on THEN
5946: WSH_DEBUG_SV.log(l_module_name, 'reconcilate_moves failed: x_return_status', x_return_status);
5947: WSH_DEBUG_SV.pop(l_module_name);
6018: WSH_DEBUG_SV.log(l_module_name, 'l_cf_dels.COUNT', l_cf_dels.COUNT);
6019: END IF;
6020:
6021: -- convert warning to error if the count of valid ids does not match.
6022: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6023: AND l_del_action_rec.valid_ids_tab.COUNT < l_cf_dels.COUNT) THEN
6024: IF l_debug_on THEN
6025: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6026: END IF;
6021: -- convert warning to error if the count of valid ids does not match.
6022: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6023: AND l_del_action_rec.valid_ids_tab.COUNT < l_cf_dels.COUNT) THEN
6024: IF l_debug_on THEN
6025: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6026: END IF;
6027: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6028: END IF;
6029:
6023: AND l_del_action_rec.valid_ids_tab.COUNT < l_cf_dels.COUNT) THEN
6024: IF l_debug_on THEN
6025: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6026: END IF;
6027: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6028: END IF;
6029:
6030: l_interface_entity := 'NONE';
6031: l_interface_id := -1;
6029:
6030: l_interface_entity := 'NONE';
6031: l_interface_id := -1;
6032: l_message_name := 'WSH_TP_F_CF_DEL_FAILED';
6033: wsh_util_core.api_post_call(
6034: p_return_status => l_return_status,
6035: x_num_warnings => l_number_of_warnings,
6036: x_num_errors => l_number_of_errors);
6037: END IF;
6068: WSH_DEBUG_SV.log(l_module_name, 'l_rcf_dels.COUNT', l_rcf_dels.COUNT);
6069: END IF;
6070:
6071: -- convert warning to error if the count of valid ids does not match.
6072: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6073: AND l_del_action_rec.valid_ids_tab.COUNT < l_rcf_dels.COUNT) THEN
6074: IF l_debug_on THEN
6075: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6076: END IF;
6071: -- convert warning to error if the count of valid ids does not match.
6072: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6073: AND l_del_action_rec.valid_ids_tab.COUNT < l_rcf_dels.COUNT) THEN
6074: IF l_debug_on THEN
6075: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6076: END IF;
6077: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6078: END IF;
6079:
6073: AND l_del_action_rec.valid_ids_tab.COUNT < l_rcf_dels.COUNT) THEN
6074: IF l_debug_on THEN
6075: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6076: END IF;
6077: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6078: END IF;
6079:
6080: l_interface_entity := 'NONE';
6081: l_interface_id := -1;
6079:
6080: l_interface_entity := 'NONE';
6081: l_interface_id := -1;
6082: l_message_name := 'WSH_TP_F_RCF_DEL_FAILED';
6083: wsh_util_core.api_post_call(
6084: p_return_status => l_return_status,
6085: x_num_warnings => l_number_of_warnings,
6086: x_num_errors => l_number_of_errors);
6087: END IF;
6151: WSH_DEBUG_SV.log(l_module_name, 'l_rf_trips.COUNT', l_rf_trips.COUNT);
6152: END IF;
6153:
6154: -- convert warning to error if the count of valid ids does not match.
6155: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6156: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rf_trips.COUNT) THEN
6157: IF l_debug_on THEN
6158: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6159: END IF;
6154: -- convert warning to error if the count of valid ids does not match.
6155: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6156: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rf_trips.COUNT) THEN
6157: IF l_debug_on THEN
6158: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6159: END IF;
6160: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6161: END IF;
6162:
6156: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rf_trips.COUNT) THEN
6157: IF l_debug_on THEN
6158: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6159: END IF;
6160: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6161: END IF;
6162:
6163: l_interface_entity := 'NONE';
6164: l_interface_id := -1;
6162:
6163: l_interface_entity := 'NONE';
6164: l_interface_id := -1;
6165: l_message_name := 'WSH_TP_F_RF_TRIP_FAILED';
6166: wsh_util_core.api_post_call(
6167: p_return_status => l_return_status,
6168: x_num_warnings => l_number_of_warnings,
6169: x_num_errors => l_number_of_errors);
6170: END IF;
6197: WSH_DEBUG_SV.log(l_module_name, 'l_rcf_trips.COUNT', l_rcf_trips.COUNT);
6198: END IF;
6199:
6200: -- convert warning to error if the count of valid ids does not match.
6201: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6202: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rcf_trips.COUNT) THEN
6203: IF l_debug_on THEN
6204: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6205: END IF;
6200: -- convert warning to error if the count of valid ids does not match.
6201: IF (l_return_status = WSH_UTIL_CORE.G_RET_STS_WARNING
6202: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rcf_trips.COUNT) THEN
6203: IF l_debug_on THEN
6204: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6205: END IF;
6206: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6207: END IF;
6208:
6202: AND l_trip_out_rec.valid_ids_tab.COUNT < l_rcf_trips.COUNT) THEN
6203: IF l_debug_on THEN
6204: WSH_DEBUG_SV.LOG(l_module_name, 'converting return status', WSH_UTIL_CORE.G_RET_STS_ERROR);
6205: END IF;
6206: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6207: END IF;
6208:
6209: l_interface_entity := 'NONE';
6210: l_interface_id := -1;
6208:
6209: l_interface_entity := 'NONE';
6210: l_interface_id := -1;
6211: l_message_name := 'WSH_TP_F_RCF_TRIP_FAILED';
6212: wsh_util_core.api_post_call(
6213: p_return_status => l_return_status,
6214: x_num_warnings => l_number_of_warnings,
6215: x_num_errors => l_number_of_errors);
6216: END IF;
6231: x_errors_tab => x_errors_tab,
6232: x_return_status => l_return_status
6233: );
6234:
6235: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6236: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6237: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6238: IF l_debug_on THEN
6239: WSH_DEBUG_SV.log(l_module_name, 'tp_firm_moves failed: l_return_status', l_return_status);
6232: x_return_status => l_return_status
6233: );
6234:
6235: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6236: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6237: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6238: IF l_debug_on THEN
6239: WSH_DEBUG_SV.log(l_module_name, 'tp_firm_moves failed: l_return_status', l_return_status);
6240: WSH_DEBUG_SV.pop(l_module_name);
6233: );
6234:
6235: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6236: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6237: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6238: IF l_debug_on THEN
6239: WSH_DEBUG_SV.log(l_module_name, 'tp_firm_moves failed: l_return_status', l_return_status);
6240: WSH_DEBUG_SV.pop(l_module_name);
6241: END IF;
6251:
6252: DECLARE
6253: l_rating_action_params WSH_FTE_INTEGRATION.rating_action_param_rec;
6254: -- [HIDING PROJECT] comment the table used for building the rank list.
6255: --l_trip_id_tab WSH_UTIL_CORE.ID_TAB_TYPE;
6256: l_index NUMBER;
6257: l_tab_index NUMBER;
6258: l_return_status VARCHAR2(1);
6259: l_msg_count NUMBER;
6284:
6285:
6286: -- Do not return or fail the plan if we cannot rate.
6287: -- If something goes wrong later, We may need to know about this one.
6288: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6289: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6290: IF l_debug_on THEN
6291: WSH_DEBUG_SV.log(l_module_name, 'rate_trip failed: l_return_status', l_return_status);
6292: END IF;
6285:
6286: -- Do not return or fail the plan if we cannot rate.
6287: -- If something goes wrong later, We may need to know about this one.
6288: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6289: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6290: IF l_debug_on THEN
6291: WSH_DEBUG_SV.log(l_module_name, 'rate_trip failed: l_return_status', l_return_status);
6292: END IF;
6293:
6320: --);
6321: --
6322: ---- Do not return or fail the plan if we cannot rank.
6323: ---- If something goes wrong later, We may need to know about this one.
6324: --IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6325: -- WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6326: -- IF l_debug_on THEN
6327: -- WSH_DEBUG_SV.log(l_module_name, 'create_rank_list_bulk failed: l_return_status', l_return_status);
6328: -- END IF;
6321: --
6322: ---- Do not return or fail the plan if we cannot rank.
6323: ---- If something goes wrong later, We may need to know about this one.
6324: --IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6325: -- WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6326: -- IF l_debug_on THEN
6327: -- WSH_DEBUG_SV.log(l_module_name, 'create_rank_list_bulk failed: l_return_status', l_return_status);
6328: -- END IF;
6329: --
6339: --[HIDING PROJECT] end
6340:
6341:
6342:
6343: l_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS; -- deliberately ignore rating outcome
6344:
6345:
6346: END;
6347:
6363:
6364: DECLARE
6365: l_trip_action_params WSH_FTE_INTEGRATION.wsh_trip_action_param_rec;
6366: l_trip_action_out_rec WSH_FTE_INTEGRATION.wsh_trip_action_out_rec;
6367: l_trip_id_tab WSH_UTIL_CORE.id_tab_type;
6368: l_index NUMBER;
6369: l_return_status VARCHAR2(1);
6370: l_msg_count NUMBER;
6371: l_msg_data VARCHAR2(32767);
6401: END IF;
6402:
6403: -- If tendering process completed successfully or had a warning
6404: -- Always Log summarized information
6405: WSH_UTIL_CORE.Enable_Concurrent_Log_Print;
6406: -- New Messages to be Added as per DLD
6407: -- Number of Input = Number of Output --> Success
6408: IF l_trip_id_tab.count = l_trip_action_out_rec.valid_ids_tab.count THEN
6409: FND_MESSAGE.SET_NAME('WSH','WSH_ALL_TRIPS_TENDERED');
6408: IF l_trip_id_tab.count = l_trip_action_out_rec.valid_ids_tab.count THEN
6409: FND_MESSAGE.SET_NAME('WSH','WSH_ALL_TRIPS_TENDERED');
6410: FND_MESSAGE.SET_TOKEN('TOTAL_TRIPS',l_trip_id_tab.count);
6411: FND_MESSAGE.SET_TOKEN('SUCCESS_TRIPS',l_trip_action_out_rec.valid_ids_tab.count);
6412: WSH_UTIL_CORE.PrintMsg(fnd_message.get);
6413: -- Message type is set as error to make sure that this gets populated
6414: -- TP wants to see this log message for all return statuses
6415: wsh_util_core.add_message(WSH_UTIL_CORE.G_RET_STS_ERROR);
6416: IF l_debug_on THEN
6411: FND_MESSAGE.SET_TOKEN('SUCCESS_TRIPS',l_trip_action_out_rec.valid_ids_tab.count);
6412: WSH_UTIL_CORE.PrintMsg(fnd_message.get);
6413: -- Message type is set as error to make sure that this gets populated
6414: -- TP wants to see this log message for all return statuses
6415: wsh_util_core.add_message(WSH_UTIL_CORE.G_RET_STS_ERROR);
6416: IF l_debug_on THEN
6417: WSH_DEBUG_SV.log(l_module_name, 'Total Input Trips', l_trip_id_tab.count);
6418: WSH_DEBUG_SV.log(l_module_name, 'Successfully Tendered',l_trip_action_out_rec.valid_ids_tab.count);
6419: END IF;
6420: ELSE -- Number of Input <> Number of Output --> Error, partial success
6421: FND_MESSAGE.SET_NAME('WSH','WSH_PARTIAL_TRIPS_TENDERED');
6422: FND_MESSAGE.SET_TOKEN('TOTAL_TRIPS',l_trip_id_tab.count);
6423: FND_MESSAGE.SET_TOKEN('SUCCESS_TRIPS',l_trip_action_out_rec.valid_ids_tab.count);
6424: WSH_UTIL_CORE.PrintMsg(fnd_message.get);
6425: wsh_util_core.add_message(l_return_status);
6426:
6427: IF l_debug_on THEN
6428: WSH_DEBUG_SV.log(l_module_name, 'Total Input Trips', l_trip_id_tab.count);
6421: FND_MESSAGE.SET_NAME('WSH','WSH_PARTIAL_TRIPS_TENDERED');
6422: FND_MESSAGE.SET_TOKEN('TOTAL_TRIPS',l_trip_id_tab.count);
6423: FND_MESSAGE.SET_TOKEN('SUCCESS_TRIPS',l_trip_action_out_rec.valid_ids_tab.count);
6424: WSH_UTIL_CORE.PrintMsg(fnd_message.get);
6425: wsh_util_core.add_message(l_return_status);
6426:
6427: IF l_debug_on THEN
6428: WSH_DEBUG_SV.log(l_module_name, 'Total Input Trips', l_trip_id_tab.count);
6429: WSH_DEBUG_SV.log(l_module_name, 'Trips could not be Tendered');
6430: END IF;
6431: END IF;
6432:
6433: -- Do not return or fail the plan if we cannot Tender.
6434: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6435: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6436: -- do not set x_return_status as per l_return_status purposely
6437:
6438: stamp_interface_error(
6431: END IF;
6432:
6433: -- Do not return or fail the plan if we cannot Tender.
6434: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
6435: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6436: -- do not set x_return_status as per l_return_status purposely
6437:
6438: stamp_interface_error(
6439: p_group_id => x_context.group_id,
6443: x_errors_tab => x_errors_tab,
6444: x_return_status => l_return_status);
6445: END IF;
6446:
6447: l_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS; -- deliberately ignore Auto Tender outcome
6448: -- this is not set above
6449:
6450: END;
6451:
6460: END IF;
6461:
6462: EXCEPTION
6463: WHEN fnd_api.g_exc_error THEN
6464: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6465: fnd_msg_pub.count_and_get(
6466: p_count => l_msg_count,
6467: p_data => l_msg_data,
6468: p_encoded => fnd_api.g_false);
6483:
6484:
6485:
6486: WHEN fnd_api.g_exc_unexpected_error THEN
6487: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6488: fnd_msg_pub.count_and_get(
6489: p_count => l_msg_count,
6490: p_data => l_msg_data,
6491: p_encoded => fnd_api.g_false);
6504: END IF;
6505:
6506:
6507: WHEN OTHERS THEN
6508: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6509: WSH_UTIL_CORE.DEFAULT_HANDLER(
6510: 'WSH_TP_RELEASE.RECONCILIATE_PLAN',
6511: l_module_name);
6512:
6505:
6506:
6507: WHEN OTHERS THEN
6508: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6509: WSH_UTIL_CORE.DEFAULT_HANDLER(
6510: 'WSH_TP_RELEASE.RECONCILIATE_PLAN',
6511: l_module_name);
6512:
6513: IF l_debug_on THEN
6589: where wdl.delivery_id = p_del_id
6590: and wts.stop_id = wdl.pick_up_stop_id;
6591:
6592: l_del_checked_flag VARCHAR2(1);
6593: l_empty_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6594: l_org_ids WSH_UTIL_CORE.ID_TAB_TYPE;
6595: l_assigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6596: l_empty_stops WSH_UTIL_CORE.ID_TAB_TYPE;
6597: l_empty_trips WSH_UTIL_CORE.ID_TAB_TYPE;
6590: and wts.stop_id = wdl.pick_up_stop_id;
6591:
6592: l_del_checked_flag VARCHAR2(1);
6593: l_empty_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6594: l_org_ids WSH_UTIL_CORE.ID_TAB_TYPE;
6595: l_assigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6596: l_empty_stops WSH_UTIL_CORE.ID_TAB_TYPE;
6597: l_empty_trips WSH_UTIL_CORE.ID_TAB_TYPE;
6598:
6591:
6592: l_del_checked_flag VARCHAR2(1);
6593: l_empty_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6594: l_org_ids WSH_UTIL_CORE.ID_TAB_TYPE;
6595: l_assigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6596: l_empty_stops WSH_UTIL_CORE.ID_TAB_TYPE;
6597: l_empty_trips WSH_UTIL_CORE.ID_TAB_TYPE;
6598:
6599: -- look up initial pick up stop's departure date for the delivery.
6592: l_del_checked_flag VARCHAR2(1);
6593: l_empty_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6594: l_org_ids WSH_UTIL_CORE.ID_TAB_TYPE;
6595: l_assigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6596: l_empty_stops WSH_UTIL_CORE.ID_TAB_TYPE;
6597: l_empty_trips WSH_UTIL_CORE.ID_TAB_TYPE;
6598:
6599: -- look up initial pick up stop's departure date for the delivery.
6600: cursor c_initial_pu_date (p_delivery_id in number,
6593: l_empty_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6594: l_org_ids WSH_UTIL_CORE.ID_TAB_TYPE;
6595: l_assigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
6596: l_empty_stops WSH_UTIL_CORE.ID_TAB_TYPE;
6597: l_empty_trips WSH_UTIL_CORE.ID_TAB_TYPE;
6598:
6599: -- look up initial pick up stop's departure date for the delivery.
6600: cursor c_initial_pu_date (p_delivery_id in number,
6601: p_init_pu_loc_id in number) is
7009:
7010: IF l_debug_on THEN
7011: WSH_DEBUG_SV.log(l_module_name,'before DELETE: l_empty_dels.COUNT', l_empty_dels.COUNT);
7012: END IF;
7013: WSH_UTIL_CORE.Delete(p_type => 'DLVY',
7014: p_rows => l_empty_dels,
7015: x_return_status => l_return_status);
7016: -- ignore return status
7017:
7393: END IF;
7394:
7395:
7396: DECLARE
7397: l_interface_ids WSH_UTIL_CORE.id_tab_type;
7398: l_ids WSH_UTIL_CORE.id_tab_type;
7399: l_qtys WSH_UTIL_CORE.id_tab_type;
7400: l_p_index NUMBER;
7401: l_i_index NUMBER;
7394:
7395:
7396: DECLARE
7397: l_interface_ids WSH_UTIL_CORE.id_tab_type;
7398: l_ids WSH_UTIL_CORE.id_tab_type;
7399: l_qtys WSH_UTIL_CORE.id_tab_type;
7400: l_p_index NUMBER;
7401: l_i_index NUMBER;
7402: BEGIN
7395:
7396: DECLARE
7397: l_interface_ids WSH_UTIL_CORE.id_tab_type;
7398: l_ids WSH_UTIL_CORE.id_tab_type;
7399: l_qtys WSH_UTIL_CORE.id_tab_type;
7400: l_p_index NUMBER;
7401: l_i_index NUMBER;
7402: BEGIN
7403:
7519: x_context.wv_exception_stops.delete;
7520:
7521: --
7522: --
7523: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
7524:
7525: IF l_debug_on THEN
7526: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
7527: WSH_DEBUG_SV.pop(l_module_name);
7557: IF c_lookup_physical_stop%ISOPEN THEN
7558: CLOSE c_lookup_physical_stop;
7559: END IF;
7560:
7561: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
7562: WSH_UTIL_CORE.DEFAULT_HANDLER(
7563: 'WSH_TP_RELEASE.PLAN_CLEANUP',
7564: l_module_name);
7565:
7558: CLOSE c_lookup_physical_stop;
7559: END IF;
7560:
7561: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
7562: WSH_UTIL_CORE.DEFAULT_HANDLER(
7563: 'WSH_TP_RELEASE.PLAN_CLEANUP',
7564: l_module_name);
7565:
7566: IF l_debug_on THEN
7595: l_attr_tab WSH_DELIVERY_AUTOCREATE.grp_attr_tab_type;
7596: l_action_rec WSH_DELIVERY_AUTOCREATE.action_rec_type;
7597: l_target_rec WSH_DELIVERY_AUTOCREATE.grp_attr_rec_type;
7598: l_group_tab WSH_DELIVERY_AUTOCREATE.grp_attr_tab_type;
7599: l_matched_entities WSH_UTIL_CORE.id_tab_type;
7600: l_out_rec WSH_DELIVERY_AUTOCREATE.out_rec_type;
7601: l_return_status VARCHAR2(1);
7602:
7603: l_match_flag BOOLEAN := FALSE;
7706: WSH_DEBUG_SV.log(l_module_name, 'find_matching_groups: l_return_status', l_return_status);
7707: WSH_DEBUG_SV.log(l_module_name, 'l_out_rec.single_group', l_out_rec.single_group);
7708: END IF;
7709:
7710: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_SUCCESS,
7711: WSH_UTIL_CORE.G_RET_STS_WARNING) THEN
7712: l_match_flag := (l_out_rec.single_group = 'Y');
7713: ELSE
7714: l_match_flag := FALSE;
7707: WSH_DEBUG_SV.log(l_module_name, 'l_out_rec.single_group', l_out_rec.single_group);
7708: END IF;
7709:
7710: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_SUCCESS,
7711: WSH_UTIL_CORE.G_RET_STS_WARNING) THEN
7712: l_match_flag := (l_out_rec.single_group = 'Y');
7713: ELSE
7714: l_match_flag := FALSE;
7715: END IF;
7788: p_token_2_name => 'PLAN_TRIP_NUM',
7789: p_token_2_value => get_plan_trip_num(x_context),
7790: x_errors_tab => x_errors_tab,
7791: x_return_status => l_return_status);
7792: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
7793: IF l_debug_on THEN
7794: WSH_DEBUG_SV.log(l_module_name, 'broken lpn: x_return_status', x_return_status);
7795: WSH_DEBUG_SV.pop(l_module_name);
7796: END IF;
7812: -- Bug 3555487 initialize message stack for each major action point
7813: -- Messages should be flushed before each new set of plan lines.
7814: FND_MSG_PUB.initialize;
7815:
7816: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
7817: IF l_debug_on THEN
7818: WSH_DEBUG_SV.pop(l_module_name);
7819: END IF;
7820:
7919: IF l_debug_on IS NULL THEN
7920: l_debug_on := WSH_DEBUG_SV.is_debug_enabled;
7921: END IF;
7922:
7923: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
7924:
7925: -- Bug 3555487 initialize message stack for each major action point.
7926: FND_MSG_PUB.initialize;
7927:
7935: l_found := c_has_line%FOUND;
7936: CLOSE c_has_line;
7937:
7938: IF l_found THEN
7939: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
7940: stamp_interface_error(
7941: p_group_id => x_context.group_id,
7942: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
7943: p_entity_interface_id => x_plan_deliveries(p_delivery_index).del_interface_id,
7961: WSH_DEBUG_SV.log(l_module_name, 'l_plan_lpn_count', l_plan_lpn_count);
7962: END IF;
7963:
7964: IF l_plan_lpn_count = 0 THEN
7965: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
7966: stamp_interface_error(
7967: p_group_id => x_context.group_id,
7968: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
7969: p_entity_interface_id => x_plan_deliveries(p_delivery_index).del_interface_id,
7992: l_found := c_plan_lpn%FOUND;
7993: CLOSE c_plan_lpn;
7994:
7995: IF NOT l_found THEN
7996: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
7997: stamp_interface_error(
7998: p_group_id => x_context.group_id,
7999: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
8000: p_entity_interface_id => x_plan_deliveries(p_delivery_index).del_interface_id,
8018: WSH_DEBUG_SV.log(l_module_name, 'l_te_lpn_count', l_te_lpn_count);
8019: END IF;
8020:
8021: IF l_found AND l_plan_lpn_count <> l_te_lpn_count THEN
8022: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8023: stamp_interface_error(
8024: p_group_id => x_context.group_id,
8025: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
8026: p_entity_interface_id => x_plan_deliveries(p_delivery_index).del_interface_id,
8058: END IF;
8059:
8060: IF l_scanning_lpns THEN
8061: -- probably error due to lock on LPN.
8062: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8063: stamp_interface_error(
8064: p_group_id => x_context.group_id,
8065: p_entity_table_name => 'WSH_NEW_DELIVERIES_INTERFACE',
8066: p_entity_interface_id => x_plan_deliveries(p_delivery_index).del_interface_id,
8071: p_token_2_value => x_plan_deliveries(p_delivery_index).name,
8072: x_errors_tab => x_errors_tab,
8073: x_return_status => l_return_status);
8074: ELSE
8075: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8076: WSH_UTIL_CORE.DEFAULT_HANDLER(
8077: 'WSH_TP_RELEASE.MAP_DANGLING_CONTAINERS',
8078: l_module_name);
8079: END IF;
8072: x_errors_tab => x_errors_tab,
8073: x_return_status => l_return_status);
8074: ELSE
8075: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8076: WSH_UTIL_CORE.DEFAULT_HANDLER(
8077: 'WSH_TP_RELEASE.MAP_DANGLING_CONTAINERS',
8078: l_module_name);
8079: END IF;
8080:
8425:
8426: END LOOP;
8427:
8428:
8429: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
8430:
8431: --
8432: --
8433: IF l_debug_on THEN
8445: END IF;
8446: IF c_staged_content%ISOPEN THEN
8447: CLOSE c_staged_content;
8448: END IF;
8449: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8450: IF l_debug_on THEN
8451: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_PLANNED_DEL_NOT_MATCH');
8452: END IF;
8453:
8460: END IF;
8461: IF c_staged_content%ISOPEN THEN
8462: CLOSE c_staged_content;
8463: END IF;
8464: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8465: WSH_UTIL_CORE.DEFAULT_HANDLER(
8466: 'WSH_TP_RELEASE.MATCH_DELIVERIES',
8467: l_module_name);
8468:
8461: IF c_staged_content%ISOPEN THEN
8462: CLOSE c_staged_content;
8463: END IF;
8464: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8465: WSH_UTIL_CORE.DEFAULT_HANDLER(
8466: 'WSH_TP_RELEASE.MATCH_DELIVERIES',
8467: l_module_name);
8468:
8469: IF l_debug_on THEN
8508: l_wms_table WMS_SHIPPING_INTERFACE_GRP.g_delivery_detail_tbl;
8509: l_del_index NUMBER;
8510: l_dd_index NUMBER;
8511: l_dd_count NUMBER;
8512: l_indexes WSH_UTIL_CORE.ID_TAB_TYPE;
8513: l_unassign_index NUMBER;
8514:
8515: l_discard_rs VARCHAR2(1);
8516: l_msg_data VARCHAR2(2000);
8599: WSH_DEBUG_SV.log(l_module_name,'WMS_SHIPPING_INTERFACE_GRP.process_delivery_details return_status',
8600: l_return_status);
8601: END IF;
8602:
8603: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8604: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8605: -- at least one line is breaking LPN configurations in WMS
8606:
8607: -- bug 4552612: issue #3
8600: l_return_status);
8601: END IF;
8602:
8603: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8604: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8605: -- at least one line is breaking LPN configurations in WMS
8606:
8607: -- bug 4552612: issue #3
8608: -- WMS API is setting the same message that is returned below,
8635:
8636: l_wms_table.DELETE;
8637: l_indexes.DELETE;
8638:
8639: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8640: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8641: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8642: IF l_debug_on THEN
8643: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8636: l_wms_table.DELETE;
8637: l_indexes.DELETE;
8638:
8639: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8640: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8641: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8642: IF l_debug_on THEN
8643: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8644: WSH_DEBUG_SV.pop(l_module_name);
8637: l_indexes.DELETE;
8638:
8639: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8640: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8641: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8642: IF l_debug_on THEN
8643: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8644: WSH_DEBUG_SV.pop(l_module_name);
8645: END IF;
8717:
8718: -- bug 4552612: issue #4
8719: -- fixed error-handling to correctly handle the results:
8720: -- API returning success means to check the list for specific errors.
8721: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8722: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8723: NULL; -- here, internal issues have happened.
8724: -- We will error out below.
8725: -- We will also keep the messages on stack to be stamped.
8718: -- bug 4552612: issue #4
8719: -- fixed error-handling to correctly handle the results:
8720: -- API returning success means to check the list for specific errors.
8721: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8722: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8723: NULL; -- here, internal issues have happened.
8724: -- We will error out below.
8725: -- We will also keep the messages on stack to be stamped.
8726: ELSE
8735: FND_MSG_PUB.initialize;
8736:
8737: l_dd_index := l_wms_table.FIRST;
8738: WHILE l_dd_index IS NOT NULL LOOP
8739: IF (l_wms_table(l_dd_index).return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8740: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8741: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8742: IF x_delivery_unassigns(l_indexes(l_dd_index)).plan_dd_index IS NOT NULL THEN
8743: stamp_interface_error(
8736:
8737: l_dd_index := l_wms_table.FIRST;
8738: WHILE l_dd_index IS NOT NULL LOOP
8739: IF (l_wms_table(l_dd_index).return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8740: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8741: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8742: IF x_delivery_unassigns(l_indexes(l_dd_index)).plan_dd_index IS NOT NULL THEN
8743: stamp_interface_error(
8744: p_group_id => x_context.group_id,
8737: l_dd_index := l_wms_table.FIRST;
8738: WHILE l_dd_index IS NOT NULL LOOP
8739: IF (l_wms_table(l_dd_index).return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8740: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8741: l_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8742: IF x_delivery_unassigns(l_indexes(l_dd_index)).plan_dd_index IS NOT NULL THEN
8743: stamp_interface_error(
8744: p_group_id => x_context.group_id,
8745: p_entity_table_name => 'WSH_DEL_DETAILS_INTERFACE',
8787: END IF;
8788:
8789: END IF;
8790:
8791: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8792: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8793: stamp_interface_error(
8794: p_group_id => x_context.group_id,
8795: p_entity_table_name => 'NONE',
8788:
8789: END IF;
8790:
8791: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8792: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
8793: stamp_interface_error(
8794: p_group_id => x_context.group_id,
8795: p_entity_table_name => 'NONE',
8796: p_entity_interface_id => -1,
8803:
8804: l_wms_table.DELETE;
8805: l_indexes.DELETE;
8806:
8807: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8808: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8809: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8810: IF l_debug_on THEN
8811: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8804: l_wms_table.DELETE;
8805: l_indexes.DELETE;
8806:
8807: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8808: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8809: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8810: IF l_debug_on THEN
8811: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8812: WSH_DEBUG_SV.pop(l_module_name);
8805: l_indexes.DELETE;
8806:
8807: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
8808: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
8809: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
8810: IF l_debug_on THEN
8811: WSH_DEBUG_SV.log(l_module_name, 'x_return_status', x_return_status);
8812: WSH_DEBUG_SV.pop(l_module_name);
8813: END IF;
8817: END IF; --}
8818:
8819: END IF; --]
8820:
8821: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
8822:
8823: --
8824: --
8825: IF l_debug_on THEN
8828: END IF;
8829:
8830: EXCEPTION
8831: WHEN OTHERS THEN
8832: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8833: WSH_UTIL_CORE.DEFAULT_HANDLER(
8834: 'WSH_TP_RELEASE.VALIDATE_WMS',
8835: l_module_name);
8836:
8829:
8830: EXCEPTION
8831: WHEN OTHERS THEN
8832: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
8833: WSH_UTIL_CORE.DEFAULT_HANDLER(
8834: 'WSH_TP_RELEASE.VALIDATE_WMS',
8835: l_module_name);
8836:
8837: IF l_debug_on THEN
8918: l_leg_id NUMBER;
8919: l_delivery_matches VARCHAR2(1);
8920: l_stops_start_index NUMBER;
8921: l_stop_index NUMBER;
8922: l_temp_unassigned_dels WSH_UTIL_CORE.ID_TAB_TYPE;
8923: l_delivery_unassigned VARCHAR2(1);
8924: l_tmp_entity_name VARCHAR2(30);
8925:
8926: l_unassign_mark NUMBER;
9029: p_token_1_name => 'TRIP_NAME',
9030: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(i).trip_id),
9031: x_errors_tab => x_errors_tab,
9032: x_return_status => x_return_status);
9033: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
9034: IF l_debug_on THEN
9035: WSH_DEBUG_SV.pop(l_module_name);
9036: END IF;
9037: RETURN;
9076: p_token_1_name => 'TRIP_NAME',
9077: p_token_1_value => WSH_TRIPS_PVT.get_name(x_plan_trips(i).trip_id),
9078: x_errors_tab => x_errors_tab,
9079: x_return_status => x_return_status);
9080: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
9081: IF l_debug_on THEN
9082: WSH_DEBUG_SV.pop(l_module_name);
9083: END IF;
9084: RETURN;
9195: p_token_1_name => 'DELIVERY_NAME',
9196: p_token_1_value => l_tmp_entity_name,
9197: x_errors_tab => x_errors_tab,
9198: x_return_status => x_return_status);
9199: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
9200: IF l_debug_on THEN
9201: WSH_DEBUG_SV.pop(l_module_name);
9202: END IF;
9203: RETURN;
9248: END IF;
9249: IF c_legs_in_trip%isopen THEN
9250: CLOSE c_legs_in_trip;
9251: END IF;
9252: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
9253: IF l_debug_on THEN
9254: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_PLANNED_DEL_NOT_MATCH');
9255: END IF;
9256: WHEN OTHERS THEN
9253: IF l_debug_on THEN
9254: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_PLANNED_DEL_NOT_MATCH');
9255: END IF;
9256: WHEN OTHERS THEN
9257: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
9258: WSH_UTIL_CORE.DEFAULT_HANDLER(
9259: 'WSH_TP_RELEASE.MATCH_TRIPS',
9260: l_module_name);
9261:
9254: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_PLANNED_DEL_NOT_MATCH');
9255: END IF;
9256: WHEN OTHERS THEN
9257: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
9258: WSH_UTIL_CORE.DEFAULT_HANDLER(
9259: 'WSH_TP_RELEASE.MATCH_TRIPS',
9260: l_module_name);
9261:
9262: IF l_debug_on THEN
9607: END IF;
9608:
9609: EXCEPTION
9610: WHEN OTHERS THEN
9611: WSH_UTIL_CORE.DEFAULT_HANDLER(
9612: 'WSH_TP_RELEASE.debug_dump_context',
9613: l_module_name);
9614:
9615: IF l_debug_on THEN
9674: IF l_debug_on THEN
9675: WSH_DEBUG_SV.push(l_module_name);
9676: END IF;
9677:
9678: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
9679:
9680: x_delivery_attrs_rec.DELIVERY_ID := p_plan_delivery_rec.delivery_id;
9681:
9682: IF p_plan_delivery_rec.delivery_id IS NOT NULL THEN
9688: WSH_DEBUG_SV.log(l_module_name, 'delivery_id is not found', p_plan_delivery_rec.delivery_id);
9689: END IF;
9690: -- setting this value to NULL will cause an error.
9691: x_delivery_attrs_rec.DELIVERY_ID := NULL;
9692: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
9693: END IF;
9694: CLOSE c_del_info;
9695: IF x_delivery_attrs_rec.DELIVERY_ID IS NULL THEN
9696: IF l_debug_on THEN
9709: p_organization_id => p_plan_delivery_rec.organization_id,
9710: x_group_by_flags => l_group_flags,
9711: x_return_status => l_return_status);
9712:
9713: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
9714: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
9715: x_return_status := l_return_status;
9716: IF l_debug_on THEN
9717: WSH_DEBUG_SV.log(l_module_name,
9710: x_group_by_flags => l_group_flags,
9711: x_return_status => l_return_status);
9712:
9713: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
9714: WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
9715: x_return_status := l_return_status;
9716: IF l_debug_on THEN
9717: WSH_DEBUG_SV.log(l_module_name,
9718: 'create/update del will fail because grouping attrs could not be found for org',
9866:
9867:
9868: EXCEPTION
9869: WHEN OTHERS THEN
9870: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
9871: IF c_del_info%ISOPEN THEN
9872: CLOSE c_del_info;
9873: END IF;
9874: WSH_UTIL_CORE.DEFAULT_HANDLER(
9870: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
9871: IF c_del_info%ISOPEN THEN
9872: CLOSE c_del_info;
9873: END IF;
9874: WSH_UTIL_CORE.DEFAULT_HANDLER(
9875: 'WSH_TP_RELEASE.copy_delivery_record',
9876: l_module_name);
9877:
9878: IF l_debug_on THEN
9985: WHEN OTHERS THEN
9986: IF c_trip_info%ISOPEN THEN
9987: CLOSE c_trip_info;
9988: END IF;
9989: WSH_UTIL_CORE.DEFAULT_HANDLER(
9990: 'WSH_TP_RELEASE.copy_trip_record',
9991: l_module_name);
9992:
9993: IF l_debug_on THEN
10124: WHEN OTHERS THEN
10125: IF c_stop_info%ISOPEN THEN
10126: CLOSE c_stop_info;
10127: END IF;
10128: WSH_UTIL_CORE.DEFAULT_HANDLER(
10129: 'WSH_TP_RELEASE.copy_stop_record',
10130: l_module_name);
10131:
10132: IF l_debug_on THEN
10255: x_msg_data => l_msg_data);
10256:
10257: l_interface_entity := 'WSH_TRIPS_INTERFACE';
10258: l_interface_id := x_plan_trips(l_index).trip_interface_id;
10259: wsh_util_core.api_post_call(
10260: p_return_status => l_return_status,
10261: x_num_warnings => l_number_of_warnings,
10262: x_num_errors => l_number_of_errors);
10263: END IF;
10278:
10279:
10280: EXCEPTION
10281: WHEN fnd_api.g_exc_error THEN
10282: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
10283: fnd_msg_pub.count_and_get(
10284: p_count => l_msg_count,
10285: p_data => l_msg_data,
10286: p_encoded => fnd_api.g_false);
10298: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_ERROR');
10299: END IF;
10300:
10301: WHEN fnd_api.g_exc_unexpected_error THEN
10302: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10303: fnd_msg_pub.count_and_get(
10304: p_count => l_msg_count,
10305: p_data => l_msg_data,
10306: p_encoded => fnd_api.g_false);
10318: wsh_debug_sv.pop(l_module_name, 'EXCEPTION:FND_API.G_EXC_UNEXPECTED_ERROR');
10319: END IF;
10320:
10321: WHEN OTHERS THEN
10322: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10323: WSH_UTIL_CORE.DEFAULT_HANDLER(
10324: 'WSH_TP_RELEASE.create_update_plan_trips',
10325: l_module_name);
10326:
10319: END IF;
10320:
10321: WHEN OTHERS THEN
10322: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10323: WSH_UTIL_CORE.DEFAULT_HANDLER(
10324: 'WSH_TP_RELEASE.create_update_plan_trips',
10325: l_module_name);
10326:
10327: IF l_debug_on THEN
10480: IF l_debug_on THEN
10481: WSH_DEBUG_SV.log(l_module_name,'l_index--',l_index);
10482: END IF;
10483:
10484: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
10485:
10486: IF l_debug_on THEN
10487: WSH_DEBUG_SV.pop(l_module_name);
10488: END IF;
10489:
10490:
10491: EXCEPTION
10492: WHEN OTHERS THEN
10493: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10494: WSH_UTIL_CORE.DEFAULT_HANDLER(
10495: 'WSH_TP_RELEASE.stamp_interface_error',
10496: l_module_name);
10497:
10490:
10491: EXCEPTION
10492: WHEN OTHERS THEN
10493: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10494: WSH_UTIL_CORE.DEFAULT_HANDLER(
10495: 'WSH_TP_RELEASE.stamp_interface_error',
10496: l_module_name);
10497:
10498: IF l_debug_on THEN
10524: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'INSERT_INTERFACE_ERRORS';
10525: --
10526: l_debug_on BOOLEAN;
10527: --
10528: l_groups WSH_UTIL_CORE.ID_TAB_TYPE;
10529: l_table_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10530: l_interface_ids WSH_UTIL_CORE.ID_TAB_TYPE;
10531: l_message_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10532: l_messages text_tab_type;
10525: --
10526: l_debug_on BOOLEAN;
10527: --
10528: l_groups WSH_UTIL_CORE.ID_TAB_TYPE;
10529: l_table_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10530: l_interface_ids WSH_UTIL_CORE.ID_TAB_TYPE;
10531: l_message_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10532: l_messages text_tab_type;
10533:
10526: l_debug_on BOOLEAN;
10527: --
10528: l_groups WSH_UTIL_CORE.ID_TAB_TYPE;
10529: l_table_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10530: l_interface_ids WSH_UTIL_CORE.ID_TAB_TYPE;
10531: l_message_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10532: l_messages text_tab_type;
10533:
10534: BEGIN
10527: --
10528: l_groups WSH_UTIL_CORE.ID_TAB_TYPE;
10529: l_table_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10530: l_interface_ids WSH_UTIL_CORE.ID_TAB_TYPE;
10531: l_message_names WSH_UTIL_CORE.COLUMN_TAB_TYPE;
10532: l_messages text_tab_type;
10533:
10534: BEGIN
10535:
10580: FND_GLOBAL.USER_ID,
10581: SYSDATE,
10582: FND_GLOBAL.USER_ID);
10583:
10584: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
10585:
10586: IF l_debug_on THEN
10587: WSH_DEBUG_SV.pop(l_module_name);
10588: END IF;
10589:
10590:
10591: EXCEPTION
10592: WHEN OTHERS THEN
10593: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10594: WSH_UTIL_CORE.DEFAULT_HANDLER(
10595: 'WSH_TP_RELEASE.insert_interface_errors',
10596: l_module_name);
10597: ROLLBACK TO before_insert;
10590:
10591: EXCEPTION
10592: WHEN OTHERS THEN
10593: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10594: WSH_UTIL_CORE.DEFAULT_HANDLER(
10595: 'WSH_TP_RELEASE.insert_interface_errors',
10596: l_module_name);
10597: ROLLBACK TO before_insert;
10598:
10664: RETURN l_plan_trip_num;
10665:
10666: EXCEPTION
10667: WHEN OTHERS THEN
10668: WSH_UTIL_CORE.DEFAULT_HANDLER(
10669: 'WSH_TP_RELEASE.get_plan_trip_num',
10670: l_module_name);
10671: IF l_debug_on THEN
10672: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
10694:
10695:
10696:
10697: PROCEDURE Log_WV_Exceptions(
10698: p_details_loc_tab in wsh_util_core.id_tab_type,
10699: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
10700: p_stops_loc_tab in wsh_util_core.id_tab_type,
10701: x_return_status out NOCOPY varchar2) IS
10702:
10695:
10696:
10697: PROCEDURE Log_WV_Exceptions(
10698: p_details_loc_tab in wsh_util_core.id_tab_type,
10699: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
10700: p_stops_loc_tab in wsh_util_core.id_tab_type,
10701: x_return_status out NOCOPY varchar2) IS
10702:
10703: i NUMBER;
10696:
10697: PROCEDURE Log_WV_Exceptions(
10698: p_details_loc_tab in wsh_util_core.id_tab_type,
10699: p_deliveries_loc_tab in wsh_util_core.id_tab_type,
10700: p_stops_loc_tab in wsh_util_core.id_tab_type,
10701: x_return_status out NOCOPY varchar2) IS
10702:
10703: i NUMBER;
10704:
10726: WSH_DEBUG_SV.logmsg(l_module_name, 'delivery exceptions count: '|| p_deliveries_loc_tab.count);
10727: WSH_DEBUG_SV.logmsg(l_module_name, 'stop exceptions count: '|| p_stops_loc_tab.count);
10728: END IF;
10729:
10730: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
10731:
10732:
10733: IF p_details_loc_tab.count > 0 THEN
10734:
10822: END IF;
10823:
10824: EXCEPTION
10825: WHEN OTHERS THEN
10826: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10827: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_TP_RELEASE.log_wv_exception', l_module_name);
10828: IF l_debug_on THEN
10829: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
10830: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
10823:
10824: EXCEPTION
10825: WHEN OTHERS THEN
10826: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
10827: WSH_UTIL_CORE.DEFAULT_HANDLER('WSH_TP_RELEASE.log_wv_exception', l_module_name);
10828: IF l_debug_on THEN
10829: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
10830: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
10831: END IF;