DBA Data[Home] [Help]

APPS.INV_PHY_INV_LOVS dependencies on MTL_PHYSICAL_ADJUSTMENTS

Line 121: FROM mtl_physical_adjustments

117: AND tag_quantity <> 0
118: AND void_flag = 2
119: AND adjustment_id IN
120: (SELECT adjustment_id
121: FROM mtl_physical_adjustments
122: WHERE physical_inventory_id = p_physical_inventory_id
123: AND organization_id = p_organization_id
124: AND approval_status IS NULL);
125:

Line 208: FROM mtl_physical_adjustments

204: -- AND NVL(cost_group_id, -99999) = NVL(p_cost_group_id, -99999)
205: AND void_flag = 2
206: AND (adjustment_id IN
207: (SELECT adjustment_id
208: FROM mtl_physical_adjustments
209: WHERE physical_inventory_id = p_physical_inventory_id
210: AND organization_id = p_organization_id
211: AND approval_status IS NULL) OR adjustment_id IS NULL); --bug#9772069
212:

Line 227: FROM mtl_physical_adjustments

223: -- AND NVL(cost_group_id, -99999) = NVL(p_cost_group_id, -99999)
224: AND void_flag = 2
225: AND (adjustment_id IN
226: (SELECT adjustment_id
227: FROM mtl_physical_adjustments
228: WHERE physical_inventory_id = p_physical_inventory_id
229: AND organization_id = p_organization_id
230: AND approval_status IS NULL) OR adjustment_id IS NULL); --bug#9772069
231:

Line 249: FROM mtl_physical_adjustments

245: -- AND NVL(cost_group_id, -99999) = NVL(p_cost_group_id, -99999)
246: AND void_flag = 2
247: AND (adjustment_id IN
248: (SELECT adjustment_id
249: FROM mtl_physical_adjustments
250: WHERE physical_inventory_id = p_physical_inventory_id
251: AND organization_id = p_organization_id
252: AND approval_status IS NULL) OR adjustment_id IS NULL);
253:

Line 1263: UPDATE mtl_physical_adjustments

1259: IF (l_debug = 1) THEN
1260: print_debug('Updating the physical adjustment record for adjustment ID: ' || p_adjustment_id);
1261: END IF;
1262: /* Fix for Bug#7591655 . Added secondary_count_qty and secondary_adjustment_qty in following update */
1263: UPDATE mtl_physical_adjustments
1264: SET last_update_date = SYSDATE,
1265: last_updated_by = NVL(p_user_id, -1),
1266: count_quantity = l_adj_count_quantity,
1267: adjustment_quantity = NVL(l_adj_count_quantity, NVL(system_quantity,0))

Line 1286: FROM mtl_physical_adjustments

1282: SELECT inventory_item_id, lot_number, serial_number, parent_lpn_id,
1283: subinventory_name, locator_id, NVL(adjustment_quantity, 0)
1284: INTO l_inventory_item_id, l_lot_number, l_serial_number,
1285: l_lpn_id, l_subinventory, l_locator_id, l_adjustment_quantity
1286: FROM mtl_physical_adjustments
1287: WHERE adjustment_id = p_adjustment_id
1288: AND physical_inventory_id = p_physical_inventory_id
1289: AND organization_id = p_organization_id;
1290:

Line 1440: FROM MTL_PHYSICAL_ADJUSTMENTS

1436: print_debug('Try to find the adjustment ID if it exists');
1437: END IF;
1438: SELECT MIN(ADJUSTMENT_ID)
1439: INTO l_adj_id
1440: FROM MTL_PHYSICAL_ADJUSTMENTS
1441: WHERE ORGANIZATION_ID = p_organization_id
1442: AND PHYSICAL_INVENTORY_ID = p_physical_inventory_id
1443: AND INVENTORY_ITEM_ID = p_inventory_item_id
1444: AND SUBINVENTORY_NAME = p_subinventory

Line 1477: from mtl_physical_adjustments

1473:
1474: IF l_adj_id IS NOT NULL THEN
1475: select approval_status
1476: into l_approval_status
1477: from mtl_physical_adjustments
1478: where adjustment_id = l_adj_id
1479: and physical_inventory_id = p_physical_inventory_id;
1480:
1481: if (nvl(l_approval_status,0) = 3) then

Line 1545: SELECT mtl_physical_adjustments_s.NEXTVAL

1541: END IF;
1542: END IF;
1543:
1544: -- Get a valid adjustment ID for the new record
1545: SELECT mtl_physical_adjustments_s.NEXTVAL
1546: INTO l_adj_id
1547: FROM dual;
1548: IF (l_debug = 1) THEN
1549: print_debug('New adjustment ID: ' || l_adj_id);

Line 1612: INSERT INTO mtl_physical_adjustments

1608: END IF;
1609:
1610: /* Fix for Bug#7591655. Added secondary_count_qty and secondary_adjustment_qty in insert */
1611:
1612: INSERT INTO mtl_physical_adjustments
1613: ( adjustment_id,
1614: organization_id,
1615: physical_inventory_id,
1616: inventory_item_id,

Line 2034: l_subinv MTL_PHYSICAL_ADJUSTMENTS.SUBINVENTORY_NAME%TYPE;

2030: l_adjustment_id NUMBER;
2031: l_new_tag VARCHAR2(1);
2032: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2033: /* Added below variables for bug 15926209, start */
2034: l_subinv MTL_PHYSICAL_ADJUSTMENTS.SUBINVENTORY_NAME%TYPE;
2035: l_locator NUMBER;
2036: l_update BOOLEAN;
2037: l_sys_qty NUMBER;
2038: l_sec_sys_qty NUMBER;

Line 2063: FROM MTL_PHYSICAL_ADJUSTMENTS

2059:
2060: BEGIN
2061: -- check if the adjustment_Id passed is a New Tag , otherwise exit from api
2062: SELECT 'Y', subinventory_name, locator_id INTO l_new_tag, l_subinv, l_locator -- added subinv, locator for bug 15926209
2063: FROM MTL_PHYSICAL_ADJUSTMENTS
2064: WHERE adjustment_id = p_adjustment_id
2065: AND approval_status IS NULL
2066: AND system_quantity = 0;
2067: --AND (count_quantity = adjustment_quantity OR count_quantity > 0);

Line 2080: FROM mtl_physical_adjustments

2076:
2077: BEGIN
2078: -- Get the old adjustment id
2079: SELECT NULLIF(MIN(adjustment_id),MAX(adjustment_id)) INTO l_adjustment_id
2080: FROM mtl_physical_adjustments
2081: WHERE organization_id = p_organization_id
2082: AND physical_inventory_id = p_physical_inventory_id
2083: AND inventory_item_id = p_inventory_item_id
2084: AND parent_lpn_id = p_parent_lpn_id

Line 2151: UPDATE mtl_physical_adjustments

2147: l_update := false;
2148: END;
2149:
2150: IF l_update THEN
2151: UPDATE mtl_physical_adjustments
2152: SET system_quantity = l_sys_qty,
2153: adjustment_quantity = Nvl(count_quantity,0) - Nvl(l_sys_qty,0),
2154: secondary_system_qty = l_sec_sys_qty,
2155: secondary_adjustment_qty = nvl(secondary_count_qty,0) - nvl(l_sec_sys_qty,0)

Line 2167: DELETE FROM mtl_physical_adjustments

2163: IF (l_debug = 1) THEN
2164: print_debug('PI_ER.. Count of deleted recs for mtl_physical_inventory_tags >>> '||SQL%ROWCOUNT||' for LPN Id, Adj Id '||p_parent_lpn_id ||' , '||l_adjustment_id);
2165: END IF;
2166:
2167: DELETE FROM mtl_physical_adjustments
2168: WHERE adjustment_id = l_adjustment_id;
2169:
2170: IF (l_debug = 1) THEN
2171: print_debug('PI_ER.. Count of deleted recs for mtl_physical_adjustments >>> '||SQL%ROWCOUNT||' for LPN Id, Adj Id '||p_parent_lpn_id ||' , '||l_adjustment_id);

Line 2171: print_debug('PI_ER.. Count of deleted recs for mtl_physical_adjustments >>> '||SQL%ROWCOUNT||' for LPN Id, Adj Id '||p_parent_lpn_id ||' , '||l_adjustment_id);

2167: DELETE FROM mtl_physical_adjustments
2168: WHERE adjustment_id = l_adjustment_id;
2169:
2170: IF (l_debug = 1) THEN
2171: print_debug('PI_ER.. Count of deleted recs for mtl_physical_adjustments >>> '||SQL%ROWCOUNT||' for LPN Id, Adj Id '||p_parent_lpn_id ||' , '||l_adjustment_id);
2172: END IF;
2173: END IF;
2174:
2175: IF (l_debug = 1) THEN

Line 2250: FROM wms_license_plate_numbers wlp, mtl_physical_adjustments mpa, wms_lpn_contents wlc

2246: wlc.secondary_quantity,
2247: wlc.serial_summary_entry,
2248: wlc.revision,
2249: wlc.cost_group_id
2250: FROM wms_license_plate_numbers wlp, mtl_physical_adjustments mpa, wms_lpn_contents wlc
2251: WHERE wlp.lpn_id = wlc.parent_lpn_id
2252: AND mpa.parent_lpn_id = wlp.lpn_id
2253: AND mpa.organization_id = p_org_id
2254: AND mpa.physical_inventory_id = p_phy_inv_id

Line 2280: FROM mtl_physical_adjustments mpa, mtl_parameters mp

2276: AND Nvl(wms.lot_number,'@#@#@') = Nvl(msn.lot_number(+),'@#@#@')
2277: AND Nvl(wms.lot_number,'@#@#@') = Nvl(mln.lot_number(+),'@#@#@')
2278: ) mpa_sys,
2279: (SELECT mpa.*
2280: FROM mtl_physical_adjustments mpa, mtl_parameters mp
2281: WHERE mpa.organization_id= mp.organization_id
2282: and mpa.organization_id = p_org_id
2283: AND physical_inventory_id = p_phy_inv_id
2284: AND system_quantity = 0

Line 2328: l_prev_lpn_id mtl_physical_adjustments.parent_lpn_id%TYPE;

2324:
2325: l_result NUMBER;
2326: l_proc_msg VARCHAR2(300);
2327: l_first_rec BOOLEAN :=TRUE;
2328: l_prev_lpn_id mtl_physical_adjustments.parent_lpn_id%TYPE;
2329: l_prev_subinv mtl_physical_adjustments.subinventory_name%TYPE;
2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;
2331: l_rec_count NUMBER:=0;
2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;

Line 2329: l_prev_subinv mtl_physical_adjustments.subinventory_name%TYPE;

2325: l_result NUMBER;
2326: l_proc_msg VARCHAR2(300);
2327: l_first_rec BOOLEAN :=TRUE;
2328: l_prev_lpn_id mtl_physical_adjustments.parent_lpn_id%TYPE;
2329: l_prev_subinv mtl_physical_adjustments.subinventory_name%TYPE;
2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;
2331: l_rec_count NUMBER:=0;
2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;
2333: l_process_enabled_flag mtl_parameters.process_enabled_flag%TYPE;

Line 2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;

2326: l_proc_msg VARCHAR2(300);
2327: l_first_rec BOOLEAN :=TRUE;
2328: l_prev_lpn_id mtl_physical_adjustments.parent_lpn_id%TYPE;
2329: l_prev_subinv mtl_physical_adjustments.subinventory_name%TYPE;
2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;
2331: l_rec_count NUMBER:=0;
2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;
2333: l_process_enabled_flag mtl_parameters.process_enabled_flag%TYPE;
2334: l_actual_cost mtl_physical_adjustments.actual_cost%TYPE;

Line 2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;

2328: l_prev_lpn_id mtl_physical_adjustments.parent_lpn_id%TYPE;
2329: l_prev_subinv mtl_physical_adjustments.subinventory_name%TYPE;
2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;
2331: l_rec_count NUMBER:=0;
2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;
2333: l_process_enabled_flag mtl_parameters.process_enabled_flag%TYPE;
2334: l_actual_cost mtl_physical_adjustments.actual_cost%TYPE;
2335:
2336: /* Procedure to log the debug mesages */

Line 2334: l_actual_cost mtl_physical_adjustments.actual_cost%TYPE;

2330: l_prev_loctor mtl_physical_adjustments.locator_id%TYPE;
2331: l_rec_count NUMBER:=0;
2332: l_adj_id mtl_physical_adjustments.adjustment_id%TYPE;
2333: l_process_enabled_flag mtl_parameters.process_enabled_flag%TYPE;
2334: l_actual_cost mtl_physical_adjustments.actual_cost%TYPE;
2335:
2336: /* Procedure to log the debug mesages */
2337: PROCEDURE Mydebug (p_msg VARCHAR2)
2338: IS

Line 2549: UPDATE mtl_physical_adjustments

2545: IF i.xfr_adjustment_id IS NOT NULL THEN
2546:
2547: mydebug(' Updating MPA with adjustment_id : '||i.xfr_adjustment_id );
2548:
2549: UPDATE mtl_physical_adjustments
2550: set locator_id = nvl(i.to_locator, l_prev_loctor)
2551: , subinventory_name = nvl(i.xfr_subinventory_name,l_prev_subinv)
2552: , system_quantity = i.system_quantity --bug 14778466
2553: , adjustment_quantity = i.adjustment_quantity

Line 2604: SELECT mtl_physical_adjustments_s.nextval INTO l_adj_id FROM dual;

2600: End;*/
2601:
2602: ELSE
2603:
2604: SELECT mtl_physical_adjustments_s.nextval INTO l_adj_id FROM dual;
2605:
2606: mydebug(' Creating a new adjustment : '||l_adj_id );
2607:
2608: SELECT NVL(process_enabled_flag, 'N')

Line 2633: INSERT INTO mtl_physical_adjustments

2629: END IF;
2630: END IF;
2631: mydebug(' Inserting MPA with adjustment_id : '||l_adj_id );
2632:
2633: INSERT INTO mtl_physical_adjustments
2634: ( adjustment_id,
2635: organization_id,
2636: physical_inventory_id,
2637: inventory_item_id,

Line 2710: FROM mtl_physical_adjustments

2706: --So, while launch adj, we will insert a new adj rec for LPN1A with IT2 as -ve adj from Loc2, and delete adj tag which is there for Loc1.
2707: BEGIN
2708: -- Get the old adjustment id
2709: SELECT NULLIF(MIN(adjustment_id),MAX(adjustment_id)) INTO l_adj_id
2710: FROM mtl_physical_adjustments
2711: WHERE organization_id = p_organization_id
2712: AND physical_inventory_id = p_physical_inv_id
2713: AND inventory_item_id = i.inventory_item_id
2714: AND parent_lpn_id = i.parent_lpn_id

Line 2750: DELETE FROM mtl_physical_adjustments

2746: and organization_id = p_organization_id;
2747:
2748: mydebug('Recs deleted from MPA >>> '||SQL%ROWCOUNT);
2749:
2750: DELETE FROM mtl_physical_adjustments
2751: WHERE adjustment_id = l_adj_id
2752: and physical_inventory_id = p_physical_inv_id
2753: and organization_id = p_organization_id;
2754:

Line 2764: UPDATE mtl_physical_adjustments

2760: END IF;
2761:
2762: ELSE
2763: mydebug(' Updating MPA with approval_status = 3 (Posted) for adjustment_id : '||i.xfr_adjustment_id );
2764: UPDATE mtl_physical_adjustments
2765: set approval_status = 3
2766: , system_quantity = i.system_quantity --bug 14778466
2767: , adjustment_quantity = i.adjustment_quantity --bug 14778466
2768: , secondary_adjustment_qty = i.secondary_adjustment_qty --bug 14778466