188: l_from_cg_id NUMBER;
189: l1 VARCHAR2(30);
190: l2 NUMBER;
191: l3 NUMBER;
192: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
193: l_sec_qty NUMBER; -- Added for OPM convergance
194: l_sec_uom VARCHAR2(3); -- Added for OPM convergance
195: BEGIN
196: --Get Max line number
500: l1 VARCHAR2(30);
501: l2 NUMBER;
502: l3 NUMBER;
503: l_project_comingle NUMBER;
504: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
505: l_sec_qty NUMBER;
506: l_sec_uom VARCHAR2(3);
507: l_lpn_id_chk number;
508:
1266: -- used for inventory move by rules's engine
1267: l_quick_pick_flag VARCHAR2(1) := 'N';
1268: -- End GRAO
1269:
1270: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
1271:
1272: -- Added for OPM convergance
1273: l_sec_qty NUMBER;
1274: l_sec_uom VARCHAR2(3);
3149: l_false VARCHAR2(1) := inv_rcv_integration_apis.G_FALSE;
3150: l_return_status VARCHAR2(1);
3151: l_msg_count NUMBER;
3152: l_msg_data VARCHAR2(10000);
3153: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3154: BEGIN
3155: --Get the required columns from MLN first
3156: SELECT expiration_date
3157: , status_id
3234: l_false VARCHAR2(1) := inv_rcv_integration_apis.G_FALSE;
3235: l_return_status VARCHAR2(1);
3236: l_msg_count NUMBER;
3237: l_msg_data VARCHAR2(10000);
3238: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3239: BEGIN
3240:
3241: --Get the serial status
3242: SELECT status_id
3288: l_errCode VARCHAR2(1);
3289: l_errMsg VARCHAR2(241);
3290: l_cst_ret NUMBER(1):=0;
3291: l_primary_cost_method NUMBER;
3292: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3293: BEGIN
3294: select primary_cost_method
3295: into l_primary_cost_method
3296: from mtl_parameters
3539: content_lpn_id NUMBER;
3540: lpn_id NUMBER;
3541: temp_count NUMBER;
3542: l_emp_id NUMBER;
3543: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
3544:
3545: -- ER 7307189 changes start
3546:
3547: res_count NUMBER :=0;
5940: l_qty NUMBER;
5941: l_qty_diff NUMBER;
5942: l_qty_diff_prim NUMBER;
5943: l_cnt1 NUMBER;
5944: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
5945: BEGIN
5946: l_temp_id := p_temp_id;
5947: l_org_id := p_org_id;
5948: l_uom := p_uom;
6063: -- Need to trap the error returned when
6064: -- unable to lock the lpn record.
6065: record_locked EXCEPTION;
6066: PRAGMA EXCEPTION_INIT(record_locked, -54);
6067: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
6068:
6069: -- Following variables added in ATF_J
6070:
6071: -- end variables added in ATF_J
6561: l_mmtt_line_id NUMBER;
6562: l_mmtt_qty NUMBER;
6563: l_transaction_batch_id NUMBER;
6564: l_transaction_batch_seq NUMBER;
6565: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
6566: BEGIN
6567: IF (l_debug = 1) THEN
6568: mydebug('In archive task..' || p_temp_id || ':' || p_org_id);
6569: END IF;
6682: l_msg_count NUMBER;
6683: l_msg_data VARCHAR2(2000);
6684: l_transaction_batch_id NUMBER;
6685: l_transaction_batch_seq NUMBER;
6686: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
6687: BEGIN
6688: IF (l_debug = 1) THEN
6689: mydebug('archive_task: In archive task..' || p_temp_id || ':' || p_org_id);
6690: END IF;
6830: l_demand_source_header_id NUMBER := -1;
6831: l_repetitive_line_id NUMBER := -1;
6832: l_operation_seq_num NUMBER := -1;
6833: l_primary_qty NUMBER := -1;
6834: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
6835: -- Following variables added in ATF_J4
6836:
6837:
6838: l_secondary_quantity NUMBER; --OPM Convergence
7119: l_count NUMBER;
7120: l_to_lpn_id NUMBER;
7121: l_lpn_context NUMBER;
7122: l_quantity NUMBER;
7123: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7124:
7125: -- Bug 4411792
7126: l_lpn_update WMS_CONTAINER_PUB.LPN;
7127: l_return_status VARCHAR2(1);
7464: AND inventory_item_id = l_item_id
7465: AND current_organization_id = l_org_id
7466: AND NVL(lot_number, -999) = NVL(l_lot_number, -999);
7467:
7468: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7469: BEGIN
7470: IF (l_debug = 1) THEN
7471: mydebug('in check_mmtt_mtl_status api');
7472: mydebug('p_temp_id => ' || p_temp_id);
7666: , p_lpn_id IN NUMBER
7667: ) IS
7668: l_lpn_context NUMBER;
7669: PRAGMA AUTONOMOUS_TRANSACTION;
7670: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7671:
7672: -- Following variables added in ATF_J3
7673:
7674: -- End variables added in ATF_J3
7734: l_return_status VARCHAR2(1);
7735: l_msg_count NUMBER;
7736: l_msg_data VARCHAR2(2000);
7737: l_lpn_cg_id NUMBER;
7738: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7739: l_project_id NUMBER;
7740: l_task_id NUMBER;
7741:
7742: l_m_sec_qty NUMBER; --BUG12796808
7954: l_number_of_rows NUMBER;
7955: l_return_status VARCHAR2(1);
7956: l_crossdock VARCHAR2(3);
7957: l_fully_allocated BOOLEAN := TRUE;
7958: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
7959: l_is_content_lpn VARCHAR2(1) := 'N';
7960: l_is_mo_there VARCHAR2(1) := 'N';
7961: l_lpn_context NUMBER;
7962: l_lpn_id NUMBER;
8457: )
8458: AND mol.line_status = 7
8459: AND mol.lpn_id = l_current_lpn_id;
8460:
8461: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
8462: l_emp_id NUMBER;
8463:
8464:
8465:
9041: WHERE inventory_item_id = l_item_id
9042: AND current_organization_id = p_organization_id
9043: AND lpn_id = p_lpn_id;
9044:
9045: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
9046: BEGIN
9047: IF (l_debug = 1) THEN
9048: mydebug('***Calling validate_lot_serial_status***');
9049: mydebug('Org ID: => ' || p_organization_id);
9251: l_item_id NUMBER;
9252: l_locator_id NUMBER;
9253: l_quantity NUMBER;
9254: l_uom_code VARCHAR2(3);
9255: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
9256: l_parent_line_id NUMBER; --6962664
9257: l_txn_header_id NUMBER; --6962664
9258:
9259: -- Bug# 3434940 - Performance Fixes
9438: l_api_name CONSTANT VARCHAR2(30) := 'check_for_crossdock';
9439: l_progress VARCHAR2(10);
9440: l_cross_dock_flag NUMBER;
9441: l_ret_crossdock NUMBER;
9442: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
9443: BEGIN
9444: IF (l_debug = 1) THEN
9445: mydebug('***Calling check_for_crossdock***');
9446: mydebug('Org ID: => ' || p_organization_id);