1821: END process_rfid_receiving_txn;
1822:
1823:
1824:
1825: PROCEDURE parse_read_tags(p_tagid IN WMS_EPC_TAGID_TYPE,
1826: p_org_id IN NUMBER,
1827: x_tag_info OUT nocopy tag_info_tbl,
1828: x_pallet_lpn_id OUT nocopy NUMBER,
1829: x_pallet_lpn_context OUT nocopy NUMBER,
1902: BEGIN
1903: SELECT wlpn.lpn_id,wlpn.lpn_context,outermost_lpn_id INTO
1904: x_pallet_lpn_id,x_pallet_lpn_context,l_outermost_lpn_id
1905: FROM wms_license_plate_numbers wlpn,
1906: wms_epc we
1907: WHERE we.lpn_id = wlpn.lpn_id
1908: AND we.cross_ref_type =1 --LPN-EPC type
1909: AND we.epc = x_tag_info(1).tag_id
1910: AND ((wlpn.parent_lpn_id = wlpn.outermost_lpn_id AND wlpn.parent_lpn_id IS NOT null) OR
1989: FOR i IN 1..x_tag_info.COUNT LOOP
1990:
1991: --CODE LOGIC
1992: --1- get the cross_ref_type and all relevant value for
1993: --cross-reference from wms_epc table based on EPC
1994: --2-Query respective tables to ensure that cross-referenced
1995: --object IS indeed correct and get other relevant parameter values
1996:
1997:
1998: BEGIN
1999:
2000: SELECT cross_ref_type , lpn_id , inventory_item_id, serial_number, gtin, gtin_serial
2001: INTO l_cross_ref_type , l_lpn_id , l_item_id, l_serial_number, l_gtin, l_gtin_serial
2002: FROM wms_epc we
2003: WHERE we.epc = x_tag_info(i).tag_id;
2004:
2005:
2006:
2276:
2277: END IF;
2278:
2279:
2280: -- IF there is error then update wms_epc
2281: -- No need to insert into wms_device_Requests, as transaction is going
2282: --TO fail because OF the multiple palletS
2283:
2284: IF l_is_error = 1 THEN
2283:
2284: IF l_is_error = 1 THEN
2285:
2286: FOR j IN 1..x_tag_info.COUNT LOOP
2287: UPDATE wms_epc
2288: SET status = substr(fnd_msg_pub.get(fnd_msg_pub.G_LAST,'F'),1,240),
2289: status_code = 'E'
2290: WHERE EPC = x_tag_info(j).TAG_id;
2291:
2416: END;
2417:
2418:
2419:
2420: --Process them against our WMS_EPC table shipment verification
2421: l_case_cnt :=0;
2422: l_serial_cnt := 0;
2423:
2424: FOR i IN 1..p_tag_info.COUNT LOOP
2653: l_msg_data := substr(fnd_msg_pub.get(fnd_msg_pub.G_LAST,'F'),1,240);
2654:
2655: IF x_return_status = 'E' THEN
2656:
2657: --1. UPDATE WMS_EPC TABLE FOR FAILURE FOR ALL READS
2658: --2. INSERT INTO WMS_DEVICE_REQUESTs TABLE FOR READ CASE TAGS, NOT THE PALLET
2659: -- pallet will be transferred in the process_rfid_txn table and all
2660: -- above records will be moved TO the wms_device_request_hist table
2661:
2658: --2. INSERT INTO WMS_DEVICE_REQUESTs TABLE FOR READ CASE TAGS, NOT THE PALLET
2659: -- pallet will be transferred in the process_rfid_txn table and all
2660: -- above records will be moved TO the wms_device_request_hist table
2661:
2662: /* we can not use the group_id to update wms_epc table in one shot
2663: here as all records of the group_id might not be read. I have to
2664: update only those records which have been read by the reader.
2665: */
2666:
2666:
2667: IF l_error_code = 1 THEN --Extraneous read
2668:
2669: FOR j IN 1..p_tag_info.COUNT LOOP
2670: UPDATE wms_epc
2671: SET status = l_msg_data,
2672: status_code = x_return_status
2673: WHERE EPC = p_tag_info(j).tag_id;--Since no LPN
2674: --corredponding TO the extraneous read
2707:
2708: ELSE
2709:
2710: FOR j IN 1..p_tag_info.COUNT LOOP
2711: UPDATE wms_epc
2712: SET status = l_msg_data,
2713: status_code = x_return_status
2714: WHERE lpn_id = p_tag_info(j).lpn_id;
2715:
2747: END IF;
2748:
2749: ELSIF x_return_status= 'S' THEN
2750:
2751: --1. UPDATE WMS_EPC TABLE FOR VERIFICATION SUCESSSFUL FOR ALL READS
2752: --NOTHING IN THE WMS_DEVICE_REQUEST table, no case records in the wms
2753: --device history TABLE IN successful scenario
2754:
2755: FOR j IN 1..p_tag_info.COUNT LOOP
2752: --NOTHING IN THE WMS_DEVICE_REQUEST table, no case records in the wms
2753: --device history TABLE IN successful scenario
2754:
2755: FOR j IN 1..p_tag_info.COUNT LOOP
2756: UPDATE wms_epc
2757: SET status = l_msg_data,
2758: status_code = x_return_status
2759: WHERE EPC = p_tag_info(j).tag_id;
2760:
2780:
2781:
2782: procedure process_rfid_txn
2783: (
2784: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
2785: p_tagdata IN WMS_EPC_TAGDATA_TYPE,-- ANY ADDITIONAL DATA IN VARRAY
2786: p_portalid in VARCHAR2,
2787: p_event_date in date,
2788: p_system_id in VARCHAR2 DEFAULT null,
2781:
2782: procedure process_rfid_txn
2783: (
2784: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
2785: p_tagdata IN WMS_EPC_TAGDATA_TYPE,-- ANY ADDITIONAL DATA IN VARRAY
2786: p_portalid in VARCHAR2,
2787: p_event_date in date,
2788: p_system_id in VARCHAR2 DEFAULT null,
2789: p_statuschange in NUMBER DEFAULT null,
3051:
3052: trace(' verify_load returned status:'||l_return_status);
3053:
3054: --Whatever happens in verification later, result of verficiation needs to be commited
3055: -- commit all the changes in the WMS_EPC table
3056: COMMIT;
3057:
3058:
3059: IF l_return_status <> 'S' THEN
3518:
3519:
3520: Procedure WMS_READ_EVENT
3521: (
3522: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
3523: p_tagdata IN WMS_EPC_TAGDATA_TYPE, -- ANY ADDITIONAL DATA IN VARRAY
3524: p_portalid in VARCHAR2,
3525: p_event_date in date,
3526: p_system_id in VARCHAR2 DEFAULT null,
3519:
3520: Procedure WMS_READ_EVENT
3521: (
3522: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
3523: p_tagdata IN WMS_EPC_TAGDATA_TYPE, -- ANY ADDITIONAL DATA IN VARRAY
3524: p_portalid in VARCHAR2,
3525: p_event_date in date,
3526: p_system_id in VARCHAR2 DEFAULT null,
3527: p_statuschange in NUMBER DEFAULT null,
3543:
3544:
3545: procedure process_rfid_txn
3546: (
3547: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
3548: p_tagdata IN WMS_EPC_TAGDATA_TYPE, -- ANY ADDITIONAL DATA IN VARRAY
3549: p_portalid in VARCHAR2,--Device name as varchar2
3550: p_event_date in date,
3551: p_system_id in VARCHAR2 DEFAULT null,
3544:
3545: procedure process_rfid_txn
3546: (
3547: p_tagid in WMS_EPC_TAGID_TYPE, -- EPC TAGS ID VALUE, IN VARRAY
3548: p_tagdata IN WMS_EPC_TAGDATA_TYPE, -- ANY ADDITIONAL DATA IN VARRAY
3549: p_portalid in VARCHAR2,--Device name as varchar2
3550: p_event_date in date,
3551: p_system_id in VARCHAR2 DEFAULT null,
3552: p_statuschange in NUMBER DEFAULT null,
3619: l_index NUMBER;
3620:
3621: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
3622:
3623: epc_tag_id wms_epc_tagid_type;
3624: epc_tag_data wms_epc_tagdata_type;
3625:
3626:
3627: BEGIN
3620:
3621: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
3622:
3623: epc_tag_id wms_epc_tagid_type;
3624: epc_tag_data wms_epc_tagdata_type;
3625:
3626:
3627: BEGIN
3628:
3631: trace('Inside MobTest_process_rfid_txn');
3632: END IF;
3633:
3634: --Initialize the varray
3635: epc_tag_id := wms_epc_tagid_type('S');
3636: epc_tag_data := wms_epc_tagdata_type('S');
3637:
3638:
3639: IF p_tagid IS NOT null then
3632: END IF;
3633:
3634: --Initialize the varray
3635: epc_tag_id := wms_epc_tagid_type('S');
3636: epc_tag_data := wms_epc_tagdata_type('S');
3637:
3638:
3639: IF p_tagid IS NOT null then
3640: IF (l_debug = 1) THEN