DBA Data[Home] [Help]

APPS.WMS_EPC_PVT dependencies on WMS_EPC

Line 1: PACKAGE BODY WMS_EPC_PVT AS

1: PACKAGE BODY WMS_EPC_PVT AS
2: /* $Header: WMSEPCVB.pls 120.22 2006/07/06 23:27:12 satkumar noship $ */
3:
4: --Global variable
5: g_cached_rule_pkg epc_rule_types_tbl;

Line 15: inv_trx_util_pub.trace(p_msg,'WMS_EPC_PVT', 9);

11:
12: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
13: BEGIN
14: IF (l_debug = 1) THEN
15: inv_trx_util_pub.trace(p_msg,'WMS_EPC_PVT', 9);
16: END IF;
17: END trace;
18:
19:

Line 753: IF p_filter_value = wms_epc_pallet_obj_type THEN --pallet

749:
750: IF l_is_gtin_valid = TRUE AND l_total_qty = 0 THEN
751: --means this is FOR bulk pack cartonization ..no mmtt record
752:
753: IF p_filter_value = wms_epc_pallet_obj_type THEN --pallet
754:
755: BEGIN
756:
757: SELECT SUM(wlc.primary_quantity),wlc.inventory_item_id,wlc.uom_code,wlc.revision --UOM CODE TO AVOID FUTURE

Line 791: ELSIF p_filter_value = WMS_EPC_CASE_OBJ_TYPE THEN --case

787:
788: END;
789:
790:
791: ELSIF p_filter_value = WMS_EPC_CASE_OBJ_TYPE THEN --case
792:
793: BEGIN
794: --1. UOM CODE TO AVOID failure due to FUTURE
795: --support OF HAVING multiple lines FOR same lpn based ON ui UOM

Line 912: IF p_filter_value = wms_epc_pallet_obj_type THEN --pallet

908: IF l_debug = 1 THEN
909: trace('for all other buiness flow');
910: END IF;
911:
912: IF p_filter_value = wms_epc_pallet_obj_type THEN --pallet
913:
914: BEGIN
915:
916: IF l_debug = 1 THEN

Line 917: trace('for wms_epc_pallet_obj_type');

913:
914: BEGIN
915:
916: IF l_debug = 1 THEN
917: trace('for wms_epc_pallet_obj_type');
918: END IF;
919:
920: SELECT SUM(wlc.primary_quantity),wlc.inventory_item_id,wlc.uom_code,wlc.revision --UOM CODE TO AVOID FUTURE
921: --support OF HAVING multiple lines FOR same lpn based ON ui UOM

Line 945: ELSIF p_filter_value = WMS_EPC_CASE_OBJ_TYPE THEN --case

941: RAISE fnd_api.g_exc_unexpected_error;
942: END;
943:
944:
945: ELSIF p_filter_value = WMS_EPC_CASE_OBJ_TYPE THEN --case
946:
947: IF l_debug = 1 THEN
948: trace('for WMS_EPC_CASE_OBJ_TYPE');
949: END IF;

Line 948: trace('for WMS_EPC_CASE_OBJ_TYPE');

944:
945: ELSIF p_filter_value = WMS_EPC_CASE_OBJ_TYPE THEN --case
946:
947: IF l_debug = 1 THEN
948: trace('for WMS_EPC_CASE_OBJ_TYPE');
949: END IF;
950:
951: BEGIN
952: --1. UOM CODE TO AVOID failure due to FUTURE

Line 1327: --This procedure Insert / Upadate / Delete in WMS_EPC table with data

1323:
1324: END get_sscc;
1325:
1326:
1327: --This procedure Insert / Upadate / Delete in WMS_EPC table with data
1328: --passed based ON action specified
1329:
1330: PROCEDURE uptodate_wms_epc
1331: (p_action IN VARCHAR2,

Line 1330: PROCEDURE uptodate_wms_epc

1326:
1327: --This procedure Insert / Upadate / Delete in WMS_EPC table with data
1328: --passed based ON action specified
1329:
1330: PROCEDURE uptodate_wms_epc
1331: (p_action IN VARCHAR2,
1332: p_group_id IN NUMBER,
1333: p_cross_ref_type IN NUMBER,
1334: p_EPC_rule_TYPE_id IN NUMBER,

Line 1355: trace('************UPtoDATE WMS_EPC***');

1351:
1352: x_return_status := fnd_api.g_ret_sts_success;
1353:
1354: IF l_debug = 1 THEN
1355: trace('************UPtoDATE WMS_EPC***');
1356: trace('p_action :'|| p_action );
1357: trace('p_group_id :'|| p_group_id);
1358: trace('p_cross_ref_type :'|| p_cross_ref_type);
1359: trace('p_epc_rule_type_id :'|| p_EPC_rule_TYPE_id);

Line 1373: UPDATE wms_epc

1369: IF p_cross_ref_type = 1 THEN --LPN-EPC /* LPN related label*/
1370:
1371: IF p_action = 'UPDATE' THEN
1372:
1373: UPDATE wms_epc
1374: SET epc = p_gen_epc,
1375: cross_ref_type = p_cross_ref_type,
1376: group_id = p_group_id,
1377: last_update_date = Sysdate,

Line 1394: INSERT INTO wms_epc( group_id,

1390: ELSIF p_action = 'INSERT' THEN
1391:
1392: --INSERT NEW EPC RECORD
1393:
1394: INSERT INTO wms_epc( group_id,
1395: cross_ref_type,
1396: epc_rule_type_id,
1397: lpn_id,
1398: serial_number,

Line 1438: DELETE FROM wms_epc WHERE lpn_id = p_lpn_id;

1434:
1435: ELSIF p_action = 'DELETE' THEN
1436:
1437: -- Delete the existing cross -reference
1438: DELETE FROM wms_epc WHERE lpn_id = p_lpn_id;
1439:
1440: END IF;
1441:
1442:

Line 1447: UPDATE wms_epc

1443: ELSIF p_cross_ref_type = 2 THEN -- Item_Serial - EPC /* Serial Label */
1444:
1445: IF p_action = 'UPDATE' THEN
1446:
1447: UPDATE wms_epc
1448: SET epc = p_gen_epc,
1449: cross_ref_type = p_cross_ref_type,
1450: group_id = p_group_id,
1451: last_update_date = Sysdate,

Line 1468: INSERT INTO wms_epc( group_id,

1464: ELSIF p_action = 'INSERT' THEN
1465:
1466: --INSERT NEW EPC RECORD
1467:
1468: INSERT INTO wms_epc( group_id,
1469: cross_ref_type,
1470: epc_rule_type_id,
1471: lpn_id,
1472: serial_number,

Line 1512: DELETE FROM wms_epc

1508:
1509: ELSIF p_action = 'DELETE' THEN
1510:
1511: -- Delete the existing cross -reference
1512: DELETE FROM wms_epc
1513: WHERE inventory_item_id = p_item_id
1514: AND serial_number = p_serial_number;
1515:
1516:

Line 1523: UPDATE wms_epc

1519: ELSIF p_cross_ref_type = 3 THEN --GTIN+GTIN_Serial - EPC /* Material Label */
1520:
1521: IF p_action = 'UPDATE' THEN
1522:
1523: UPDATE wms_epc
1524: SET epc = p_gen_epc,
1525: cross_ref_type = p_cross_ref_type,
1526: group_id = p_group_id,
1527: last_update_date = Sysdate,

Line 1544: INSERT INTO wms_epc( group_id,

1540: ELSIF p_action = 'INSERT' THEN
1541:
1542: --INSERT NEW EPC RECORD
1543:
1544: INSERT INTO wms_epc( group_id,
1545: cross_ref_type,
1546: epc_rule_type_id,
1547: lpn_id,
1548: serial_number,

Line 1588: DELETE FROM wms_epc

1584:
1585: ELSIF p_action = 'DELETE' THEN
1586:
1587: -- Delete the existing cross -reference
1588: DELETE FROM wms_epc
1589: WHERE GTIN = p_gtin
1590: AND GTIN_serial = p_gtin_serial;
1591:
1592: END IF;

Line 1598: --COMMIT THE autonomous txn part of updating record in WMS_EPC

1594:
1595: END IF;
1596:
1597:
1598: --COMMIT THE autonomous txn part of updating record in WMS_EPC
1599: COMMIT;
1600:
1601: EXCEPTION
1602: WHEN OTHERS THEN

Line 1605: TRACE('UPTODATE WMS_EPC: inside exception');

1601: EXCEPTION
1602: WHEN OTHERS THEN
1603: x_return_status := fnd_api.g_ret_sts_error;
1604: IF l_debug = 1 THEN
1605: TRACE('UPTODATE WMS_EPC: inside exception');
1606: TRACE('ERROR CODE = ' || SQLCODE);
1607: TRACE('ERROR MESSAGE = ' || SQLERRM);
1608: END IF;
1609:

Line 1610: END uptodate_wms_epc;

1606: TRACE('ERROR CODE = ' || SQLCODE);
1607: TRACE('ERROR MESSAGE = ' || SQLERRM);
1608: END IF;
1609:
1610: END uptodate_wms_epc;
1611:
1612: --Given EPC_rule_type and company_prefix, calculates the pre-defined
1613: --PARTITION value (specified by EPC global standard)
1614: FUNCTION get_PARTITION_value(p_epc_rule_type IN VARCHAR2,

Line 1968: --will be used but it will be stored in wms_EPC table against the

1964: --Generate EPC for that item for GTIN corresponding to Primary UOM.
1965: --we have p_serial_number + p_item_id + p_cage_code+ p_filter_value
1966:
1967: --P_serial_number will be totally ignored while generating EPC. GTIN_Serial
1968: --will be used but it will be stored in wms_EPC table against the
1969: --Item+p_serial_number
1970:
1971: -- for item_id and qty + UOM, find any set up in GTIN C/R
1972: -- Generate EPC for that GTIN.

Line 2384: FROM wms_license_plate_numbers wlpn, wms_epc we

2380:
2381: BEGIN
2382: SELECT wlpn.parent_lpn_id, wlpn.outermost_lpn_id, we.epc
2383: INTO l_parent_lpn_id, l_outermost_lpn_id, l_epc
2384: FROM wms_license_plate_numbers wlpn, wms_epc we
2385: WHERE wlpn.lpn_id = l_lpn_id
2386: AND wlpn.lpn_id = we.lpn_id(+)
2387: AND ((we.epc is NOT NULL and Nvl(we.cross_ref_type,1) = 1)
2388: or (we.epc is NULL )) ;

Line 2426: FROM wms_epc we

2422:
2423: --Item_id + Serial_number will uniquely mapped to an EPC
2424: BEGIN
2425: SELECT we.epc INTO l_epc
2426: FROM wms_epc we
2427: WHERE INVENTORY_item_id = l_item_id
2428: AND serial_number = l_serial_number
2429: AND we.cross_ref_type = 2;
2430: EXCEPTION

Line 2451: wms_epc_pub.GET_CUSTOM_COMPANY_PREFIX(

2447: END IF;
2448:
2449:
2450: --{{call to see if the custom company_prefix is implemented}}
2451: wms_epc_pub.GET_CUSTOM_COMPANY_PREFIX(
2452: p_org_id => p_org_id,
2453: p_label_request_id => p_label_request_id,
2454: X_company_prefix => l_custom_company_prefix,
2455: X_RETURN_STATUS => l_return_status);

Line 2458: wms_epc_pub.GET_CUSTOM_COMP_PREFIX_INDEX(p_org_id => p_org_id,

2454: X_company_prefix => l_custom_company_prefix,
2455: X_RETURN_STATUS => l_return_status);
2456:
2457: --{{call to see if the custom company_prefix_INDEX is implemented}}
2458: wms_epc_pub.GET_CUSTOM_COMP_PREFIX_INDEX(p_org_id => p_org_id,
2459: p_label_request_id => p_label_request_id,
2460: X_comp_prefix_INDEX => l_CUST_comp_prefix_INDEX,
2461: X_RETURN_STATUS => l_return_status);
2462:

Line 2533: wms_epc_pub.get_custom_epc

2529: --means in ('EPC_GIAI_96','EPC_GRAI_96','EPC_SGLN_96','EPC_GID_96','EPC_GIAI_64','EPC_GRAI_64','EPC_SGLN_64','EPC_GID_64')
2530: THEN
2531:
2532: -- {{ get custom EPC generated }}
2533: wms_epc_pub.get_custom_epc
2534: (p_org_id => p_org_id,
2535: p_category_id => l_epc_category_id,-- In mgd_idencoding_type table
2536: p_epc_rule_type_id => l_epc_rule_type_id, --Rule_type_id IN mgd_idencoding_type table
2537: p_filter_value => l_filter_value,

Line 2634: --old cross-reference RECORD FROM wms_epc for some

2630: fnd_message.set_name('WMS', 'WMS_DB_EPC_GEN_FAIL');
2631: fnd_msg_pub.ADD;
2632:
2633: --Do not raise exception here as we want to delete
2634: --old cross-reference RECORD FROM wms_epc for some
2635: --CASES BELOW
2636: END;
2637:
2638: ELSE

Line 2647: fnd_message.set_name('WMS', 'WMS_EPC_GEN_FAIL');

2643: trace('Error: Components could not be obtained for EPC generation ');
2644: END IF;
2645:
2646:
2647: fnd_message.set_name('WMS', 'WMS_EPC_GEN_FAIL');
2648: fnd_msg_pub.ADD;
2649:
2650: --Do not raise exception here as we want to delete
2651: --old cross-reference RECORD FROM wms_epc for some

Line 2651: --old cross-reference RECORD FROM wms_epc for some

2647: fnd_message.set_name('WMS', 'WMS_EPC_GEN_FAIL');
2648: fnd_msg_pub.ADD;
2649:
2650: --Do not raise exception here as we want to delete
2651: --old cross-reference RECORD FROM wms_epc for some
2652: --CASES BELOW
2653:
2654: END IF; --l_return_status = 'S for get_epc_gen_info()
2655:

Line 2666: fnd_message.set_name('WMS', 'WMS_EPC_DISABLED');

2662: IF l_debug = 1 THEN
2663: trace('EPC generation is NOT enabled at Orgnization level');
2664: END IF;
2665:
2666: fnd_message.set_name('WMS', 'WMS_EPC_DISABLED');
2667: fnd_msg_pub.ADD;
2668: RAISE fnd_api.g_exc_error;
2669:
2670: END IF;

Line 2682: --{{ Get the EPC ENCODING defined with the profile 'WMS_EPC_ENCODING'}}

2678: END IF;
2679:
2680:
2681:
2682: --{{ Get the EPC ENCODING defined with the profile 'WMS_EPC_ENCODING'}}
2683: l_epc_output_rep := NVL(fnd_profile.value('WMS_EPC_ENCODING'), 2);
2684: -- 1 : Binary
2685: -- 2 : Hex
2686: -- 3 : Decimal

Line 2683: l_epc_output_rep := NVL(fnd_profile.value('WMS_EPC_ENCODING'), 2);

2679:
2680:
2681:
2682: --{{ Get the EPC ENCODING defined with the profile 'WMS_EPC_ENCODING'}}
2683: l_epc_output_rep := NVL(fnd_profile.value('WMS_EPC_ENCODING'), 2);
2684: -- 1 : Binary
2685: -- 2 : Hex
2686: -- 3 : Decimal
2687:

Line 2699: uptodate_wms_epc ( p_action => 'UPDATE',

2695:
2696:
2697: IF l_epc IS NOT NULL AND l_gen_epc IS NOT NULL THEN
2698: --{{ EPC c/r already there: UPDATE LAST EPC with new EPC value }}
2699: uptodate_wms_epc ( p_action => 'UPDATE',
2700: p_group_id => p_group_id,
2701: p_cross_ref_type => l_cross_ref_type,
2702: p_EPC_rule_TYPE_id => l_EPC_rule_TYPE_id,
2703: p_lpn_id => l_lpn_id,

Line 2715: trace(' uptodate_wms_epc UPDATE: L_RETURN_STATUS:'||l_return_status);

2711: x_return_status => L_RETURN_STATUS);
2712:
2713:
2714: IF l_debug =1 then
2715: trace(' uptodate_wms_epc UPDATE: L_RETURN_STATUS:'||l_return_status);
2716: END IF;
2717:
2718:
2719: --return new EPC IN THE FORMAT SPECIFIED

Line 2734: uptodate_wms_epc ( p_action => 'DELETE',

2730:
2731: ELSIF l_epc IS NOT NULL AND l_gen_epc IS NULL THEN
2732: -- Delete the existing cross -reference
2733:
2734: uptodate_wms_epc ( p_action => 'DELETE',
2735: p_group_id => p_group_id,
2736: p_cross_ref_type => l_cross_ref_type,
2737: p_EPC_rule_TYPE_id => l_EPC_rule_TYPE_id,
2738: p_lpn_id => l_lpn_id,

Line 2749: trace(' uptodate_wms_epc DELETE: L_RETURN_STATUS:'||l_return_status);

2745: p_filter_VALUE => l_filter_value,
2746: x_return_status => L_RETURN_STATUS);
2747:
2748: IF l_debug =1 then
2749: trace(' uptodate_wms_epc DELETE: L_RETURN_STATUS:'||l_return_status);
2750: END IF;
2751:
2752: RAISE fnd_api.g_exc_error;--COULD NOT OVERIDE THE EPC
2753:

Line 2757: uptodate_wms_epc( p_action => 'INSERT',

2753:
2754:
2755: ELSIF l_epc IS NULL AND l_gen_epc IS NOT NULL THEN
2756:
2757: uptodate_wms_epc( p_action => 'INSERT',
2758: p_group_id => p_group_id,
2759: p_cross_ref_type => l_cross_ref_type,
2760: p_EPC_rule_TYPE_id => l_EPC_rule_TYPE_id,
2761: p_lpn_id => l_lpn_id,

Line 2772: trace(' uptodate_wms_epc INSERT: L_RETURN_STATUS:'||l_return_status);

2768: p_filter_VALUE => l_filter_value,
2769: x_return_status => L_RETURN_STATUS);
2770:
2771: IF l_debug =1 then
2772: trace(' uptodate_wms_epc INSERT: L_RETURN_STATUS:'||l_return_status);
2773: END IF;
2774:
2775: --return new EPC IN THE FORMAT SPECIFIED
2776: IF l_epc_output_rep = 1 THEN

Line 2817: fnd_message.set_name('WMS','WMS_EPC_GEN_FAIL');

2813:
2814: EXCEPTION
2815:
2816: WHEN fnd_api.g_exc_error THEN
2817: fnd_message.set_name('WMS','WMS_EPC_GEN_FAIL');
2818: fnd_msg_pub.ADD;
2819: x_return_status := fnd_api.g_ret_sts_error;
2820: x_epc := NULL;
2821: fnd_msg_pub.count_and_get(p_encoded => 'F',p_count => l_msg_count, p_data => x_return_mesg);

Line 2836: fnd_message.set_name('WMS', 'WMS_EPC_GEN_FAIL');

2832: -- FND_MSG_PUB.initialize; --bug 5178424
2833:
2834:
2835: WHEN fnd_api.g_exc_unexpected_error THEN
2836: fnd_message.set_name('WMS', 'WMS_EPC_GEN_FAIL');
2837: fnd_msg_pub.ADD;
2838: x_return_status := fnd_api.g_ret_sts_unexp_error;
2839: x_epc := NULL;
2840: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data => x_return_mesg);

Line 2876: -- Create Cross-reference in WMS_EPC TABLE

2872:
2873:
2874: --This API will be called while importing ASNs
2875: --Purpose
2876: -- Create Cross-reference in WMS_EPC TABLE
2877: --between EPC and objects from interface tables
2878:
2879: PROCEDURE populate_outside_epc
2880: (p_group_id IN NUMBER , --obtained from WMS_EPC_S2.nextval by calling API

Line 2880: (p_group_id IN NUMBER , --obtained from WMS_EPC_S2.nextval by calling API

2876: -- Create Cross-reference in WMS_EPC TABLE
2877: --between EPC and objects from interface tables
2878:
2879: PROCEDURE populate_outside_epc
2880: (p_group_id IN NUMBER , --obtained from WMS_EPC_S2.nextval by calling API
2881: p_cross_ref_type IN NUMBER, --1: LPN-EPC , 2: ITEM_SERIAL-EPC , 3: GTIN-EPC
2882: p_Lpn_id IN NUMBER DEFAULT NULL, --for p_cross_ref_type =1 only
2883: p_ITEM_ID IN NUMBER DEFAULT NULL, --for p_cross_ref_type = 2 only
2884: p_SERIAL_NUMBER VARCHAR2 DEFAULT NULL, --for p_cross_ref_type = 2 only

Line 2906: x_return_mesg := fnd_message.get_string('WMS','WMS_EPC_MISSING_VALUES');

2902: END IF;
2903:
2904: IF p_group_id IS NULL OR p_cross_ref_type IS NULL OR p_epc IS NULL THEN
2905: x_return_status := fnd_api.g_ret_sts_error;
2906: x_return_mesg := fnd_message.get_string('WMS','WMS_EPC_MISSING_VALUES');
2907: RETURN;
2908:
2909: ELSIF p_lpn_id IS NULL AND
2910: (p_item_id IS NULL OR p_serial_number IS NULL ) AND

Line 2914: x_return_mesg := fnd_message.get_string('WMS','WMS_EPC_MISSING_VALUES');

2910: (p_item_id IS NULL OR p_serial_number IS NULL ) AND
2911: (p_gtin IS NULL OR p_gtin_serial IS NULL) THEN
2912:
2913: x_return_status := fnd_api.g_ret_sts_error;
2914: x_return_mesg := fnd_message.get_string('WMS','WMS_EPC_MISSING_VALUES');
2915: RETURN;
2916: END IF;
2917:
2918: INSERT INTO wms_epc( group_id,

Line 2918: INSERT INTO wms_epc( group_id,

2914: x_return_mesg := fnd_message.get_string('WMS','WMS_EPC_MISSING_VALUES');
2915: RETURN;
2916: END IF;
2917:
2918: INSERT INTO wms_epc( group_id,
2919: cross_ref_type,
2920: epc_rule_type_id,
2921: lpn_id,
2922: serial_number,

Line 3015: END wms_epc_pvt;

3011: END is_epc_enabled;
3012: */
3013:
3014:
3015: END wms_epc_pvt;