[Home] [Help]
138: -- OTM R12
139: -- g. Freight Costs
140: -- h. Stamping the loading sequence number for WMS org
141: -- i. Calling WMS api to send the Dock Appointment info. from OTM to WMS for WMS org.
142: -- j. If any errors exist, then log errors in wsh_interface_errors table and
143: -- (error)exceptions for all the deliveries within this GC3 trip (as per l_dleg_info_tab)
144: -- Elsif no errors encountered: Log (info only) Delivery Exception, Update Interface Status
145: -- to 'ANSWER_RECEIVED', Purge
146: -- END LOOP;
1375:
1376: -- Errors are logged always for the deliveries
1377: --FORALL l_del_wti_index in INDICES OF l_del_wti_tab
1378: FORALL i in l_del_wti_tab.FIRST..l_del_wti_tab.LAST
1379: DELETE from wsh_interface_errors wie
1380: WHERE wie.interface_table_name = 'WSH_NEW_DEL_INTERFACE'
1381: AND wie.interface_id in (
1382: select wdli.delivery_interface_id
1383: from wsh_trip_stops_interface wtsi,
3761: -- For Delete Shipment Cases, there will not be any delivery level information
3762: IF l_dleg_local_tab.count > 0 THEN--{
3763: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR THEN--{
3764:
3765: -- Insert record in wsh_interface_errors table
3766: -- Generic error message is to be logged against all deliveries
3767: -- Handled in stamp_interface_errors
3768: stamp_interface_error(
3769: p_group_id => l_trip_info_tab(i).group_id, --Bug7717569 replaced p_group_id with l_trip_info_tab(i).group_id
4173: -- for WSH_OTM_SHIPMENT_ERROR
4174: -- elsif p_exception_action = CLOSE, then close the exception
4175: -- for WSH_OTM_SHIPMENT_ERROR(used for reprocessing from Interface Mesg
4176: -- Corrections Form)
4177: -- Purge any records in wsh_interface_errors
4178: -- Purge records in wsh_new_del_interface
4179: -- Purge records in wsh_del_legs_interface
4180: -- Purge records in wsh_trip_stops_interface
4181: -- Purge records in wsh_trips_interface
4305: and we.exception_name IN ('WSH_OTM_SHIPMENT_ERROR','WSH_OTM_INVALID_LOC')
4306: and we.status = 'OPEN';
4307: END IF;--}
4308:
4309: -- Purge wsh_interface_errors
4310: -- for each of the above entity, there could be errors logged in wsh_interface_errors
4311: -- table_name can be WSH_NEW_DEL_INTERFACE, WSH_TRIP_STOPS_INTERFACE,
4312: -- WSH_TRIPS_INTERFACE
4313:
4306: and we.status = 'OPEN';
4307: END IF;--}
4308:
4309: -- Purge wsh_interface_errors
4310: -- for each of the above entity, there could be errors logged in wsh_interface_errors
4311: -- table_name can be WSH_NEW_DEL_INTERFACE, WSH_TRIP_STOPS_INTERFACE,
4312: -- WSH_TRIPS_INTERFACE
4313:
4314: IF l_debug_on THEN
4315: WSH_DEBUG_SV.logmsg(l_module_name,'Start Purging Interface Errors Data for delivery');
4316: END IF;
4317: -- Delete errors logged for deliveries
4318: FORALL i in l_trip_interface_id_tab.FIRST..l_trip_interface_id_tab.LAST
4319: Delete from wsh_interface_errors wie
4320: where wie.interface_table_name = 'WSH_NEW_DEL_INTERFACE'
4321: and wie.interface_id in (
4322: select wdli.delivery_interface_id
4323: from wsh_trip_stops_interface wtsi,
4332: WSH_DEBUG_SV.logmsg(l_module_name,'Start Purging Interface Errors Data for Trip Stops');
4333: END IF;
4334: -- Delete errors logged for trip stops
4335: FORALL i in l_trip_interface_id_tab.FIRST..l_trip_interface_id_tab.LAST
4336: Delete from wsh_interface_errors wie
4337: where wie.interface_table_name = 'WSH_TRIP_STOPS_INTERFACE'
4338: and wie.interface_id in (
4339: select wtsi.stop_interface_id
4340: from wsh_trip_stops_interface wtsi
4346: IF l_debug_on THEN
4347: WSH_DEBUG_SV.logmsg(l_module_name,'Start Purging Interface Errors Data for Trips');
4348: END IF;
4349: FORALL i in l_trip_interface_id_tab.FIRST..l_trip_interface_id_tab.LAST
4350: Delete from wsh_interface_errors wie
4351: where wie.interface_table_name = 'WSH_TRIPS_INTERFACE'
4352: and wie.interface_id = l_trip_interface_id_tab(i)
4353: and wie.interface_action_code = G_TMS_RELEASE_CODE;
4354:
4450: -- p_token_3_value optional token 3 value
4451: -- p_token_4_name optional token 4 name
4452: -- p_token_4_value optional token 4 value
4453: -- p_dleg_tab Table of Delivery Leg information
4454: -- x_errors_tab list of errors to insert into wsh_interface_errors at the end
4455: -- x_return_status return status
4456: --
4457: -- Description:
4458: -- Inserts the error information for each delivery
4477: p_dleg_tab IN TMS_DLEG_TAB_TYPE,
4478: x_errors_tab IN OUT NOCOPY INTERFACE_ERRORS_TAB_TYPE,
4479: x_return_status OUT NOCOPY VARCHAR2) IS
4480:
4481: TYPE text_tab_type IS TABLE OF WSH_INTERFACE_ERRORS.ERROR_MESSAGE%TYPE INDEX BY BINARY_INTEGER;
4482: --
4483: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'STAMP_INTERFACE_ERROR';
4484: --
4485: l_debug_on BOOLEAN;
4616: END LOOP;
4617:
4618: IF l_dlvy_id_tab.count > 0 THEN
4619: FORALL i IN p_dleg_tab.FIRST .. p_dleg_tab.LAST
4620: INSERT INTO WSH_INTERFACE_ERRORS (
4621: INTERFACE_ERROR_ID,
4622: INTERFACE_ERROR_GROUP_ID,
4623: INTERFACE_TABLE_NAME,
4624: INTERFACE_ID,
4629: CREATED_BY,
4630: LAST_UPDATE_DATE,
4631: LAST_UPDATED_BY)
4632: VALUES (
4633: WSH_INTERFACE_ERRORS_S.nextval,
4634: p_group_id, --l_groups(i),
4635: 'WSH_NEW_DEL_INTERFACE', --l_table_names(i),
4636: l_dlvy_id_tab(i),--l_interface_ids(i),
4637: G_TMS_RELEASE_CODE,