11: BEGIN
12: -- Check subinventories
13: select 1
14: into count_assigned
15: from dual
16: where exists (select 1
17: from mtl_secondary_inventories
18: where status_id = p_status_id);
19:
26: BEGIN
27: -- Check locator
28: select 1
29: into count_assigned
30: from dual
31: where exists (select 1
32: from mtl_item_locations
33: where status_id = p_status_id);
34:
40: BEGIN
41: -- Check lot
42: select 1
43: into count_assigned
44: from dual
45: where exists (select 1
46: from mtl_lot_numbers
47: where status_id = p_status_id);
48:
54: BEGIN
55: -- Check serial /* Added first_rows hint for bug 14125147 */
56: select 1
57: into count_assigned
58: from dual
59: where exists (select /*+ first_rows(1) */ 1
60: from mtl_serial_numbers
61: where status_id = p_status_id);
62:
68: BEGIN
69: -- Check Onhand -- Bug 6842219
70: select 1
71: into count_assigned
72: from dual
73: where exists (select 1
74: from mtl_onhand_quantities_detail moqd, mtl_parameters mp
75: where moqd.organization_id = mp.organization_id
76: and mp.default_status_id is not null
277: l_multiple_app := NVL(FND_PROFILE.VALUE('INV_ERES_MULTIPLE_SIGNATURE'),0);--ERES Deferred
278: --BEGIN SCHANDRU INVERES
279: Select MTL_MATERIAL_STATUS_HISTORY_S.nextval
280: Into l_status_update_id
281: From dual;
282: -- END SCHANDRU INVERES
283: l_status_rec := p_status_rec;
284:
285: --ERES Deferred
284:
285: --ERES Deferred
286: IF ((l_multiple_app <> 2) AND (l_status_rec.group_id = -999)) THEN
287: Select mtl_onhand_status_group_s.NEXTVAL
288: Into l_status_group_id FROM dual;
289: l_status_rec.group_id := l_status_group_id;
290: END IF;
291: --ERES Deferred
292: INV_MATERIAL_STATUS_PKG.Initialize_status_rec(l_status_rec);
411: FOR cc IN cur_serial_number LOOP
412: -- BEGIN SCHANDRU INVERES
413: Select MTL_MATERIAL_STATUS_HISTORY_S.nextval
414: Into l_status_update_id
415: From dual;
416:
417: -- END SCHANDRU INVERES
418: INSERT INTO MTL_MATERIAL_STATUS_HISTORY
419: (