DBA Data[Home] [Help]

APPS.INV_CYC_LOVS dependencies on MTL_SERIAL_NUMBERS

Line 3687: FROM MTL_SERIAL_NUMBERS

3683: l_current_status,
3684: l_msn_subinv,
3685: l_msn_locator_id,
3686: l_msn_lpn_id
3687: FROM MTL_SERIAL_NUMBERS
3688: WHERE SERIAL_NUMBER = l_serial_number
3689: AND INVENTORY_ITEM_ID = g_cc_entry.inventory_item_id
3690: AND CURRENT_ORGANIZATION_ID = g_cc_entry.organization_id;
3691:

Line 4331: UPDATE mtl_serial_numbers

4327: -- If the entry is a multiple serial entry,
4328: -- unmark the serial explicitly here since it was marked
4329: -- through a different process compared to single serial
4330: IF (l_serial_count_option = 3) THEN
4331: UPDATE mtl_serial_numbers
4332: SET group_mark_id = NULL
4333: WHERE inventory_item_id = l_inventory_item_id
4334: AND current_organization_id = l_org_id
4335: AND serial_number IN

Line 4744: FROM mtl_serial_numbers

4740: FROM
4741: (SELECT serial_number,
4742: inventory_item_id,
4743: current_organization_id
4744: FROM mtl_serial_numbers
4745: WHERE serial_number = NVL(l_serial_number, serial_number)
4746: AND inventory_item_id = l_item_id
4747: AND current_organization_id = l_org_id
4748: AND current_subinventory_code = l_sub

Line 4795: -- added index hint /*+ index(MSN MTL_SERIAL_NUMBERS_N2) */ in below SQL query, for Bug 12608056

4791: -- in SERIAL_NUMBERS also
4792: -- Bug# 2386909
4793: -- Match against the LPN ID also when performing this insert statement
4794:
4795: -- added index hint /*+ index(MSN MTL_SERIAL_NUMBERS_N2) */ in below SQL query, for Bug 12608056
4796: INSERT INTO MTL_CC_SERIAL_NUMBERS
4797: ( CYCLE_COUNT_ENTRY_ID,
4798: SERIAL_NUMBER,
4799: LAST_UPDATE_DATE,

Line 4805: SELECT /*+ index(MSN MTL_SERIAL_NUMBERS_N2) */

4801: CREATION_DATE,
4802: CREATED_BY,
4803: LAST_UPDATE_LOGIN
4804: )
4805: SELECT /*+ index(MSN MTL_SERIAL_NUMBERS_N2) */
4806: l_cycle_count_entry_id,
4807: SERIAL_NUMBER,
4808: SYSDATE,
4809: l_last_updated_by,

Line 4813: FROM mtl_serial_numbers msn

4809: l_last_updated_by,
4810: SYSDATE,
4811: l_last_updated_by,
4812: l_last_update_login
4813: FROM mtl_serial_numbers msn
4814: WHERE msn.inventory_item_id = l_item_id
4815: AND msn.current_organization_id = l_org_id
4816: AND msn.current_subinventory_code = l_sub
4817: AND NVL ( msn.lot_number, 'XX' ) = NVL ( l_lot, 'XX' )

Line 5160: FROM mtl_serial_numbers_temp s,

5156: IF l_lot_control_code = 1 THEN -- no lot control code
5157: -- just check with msnt
5158: SELECT COUNT ( * )
5159: INTO l_serial_count
5160: FROM mtl_serial_numbers_temp s,
5161: wms_loaded_quantities_v wl
5162: WHERE s.transaction_temp_id = wl.transaction_temp_id
5163: AND wl.inventory_item_id = p_inventory_item_id -- Bug 13652899
5164: AND wl.organization_id = p_organization_id -- Bug 13796753

Line 5177: FROM mtl_serial_numbers_temp s,

5173:
5174: ELSE -- have to join mtlt also
5175: SELECT COUNT ( * )
5176: INTO l_serial_count
5177: FROM mtl_serial_numbers_temp s,
5178: wms_loaded_quantities_v wl,
5179: mtl_transaction_lots_temp l
5180: WHERE wl.transaction_temp_id = l.transaction_temp_id
5181: AND wl.organization_id = p_organization_id -- Bug 13796753

Line 5199: FROM mtl_serial_numbers s,

5195:
5196: -- Modified for opp cyc count 9248808
5197: SELECT COUNT ( * )
5198: INTO l_serial_count
5199: FROM mtl_serial_numbers s,
5200: wms_loaded_quantities_v wl
5201: WHERE s.lpn_id = p_lpn_id
5202: -- AND NVL ( wl.content_lpn_id, NVL ( wl.lpn_id, -1 ) ) = s.lpn_id -- Modified for opp cyc count 9248808
5203: AND NVL ( wl.content_lpn_id, -1 ) = s.lpn_id

Line 5215: FROM mtl_serial_numbers_temp msnt, mtl_material_transactions_temp mmtt,

5211: ELSE
5212:
5213: SELECT Count(DISTINCT msn.serial_number)
5214: INTO l_serial_count
5215: FROM mtl_serial_numbers_temp msnt, mtl_material_transactions_temp mmtt,
5216: mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn, wms_dispatched_tasks wdt
5217: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id (+)
5218: AND ((msnt.transaction_temp_id = mmtt.transaction_temp_id and
5219: mtlt.lot_number is null) or

Line 5216: mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn, wms_dispatched_tasks wdt

5212:
5213: SELECT Count(DISTINCT msn.serial_number)
5214: INTO l_serial_count
5215: FROM mtl_serial_numbers_temp msnt, mtl_material_transactions_temp mmtt,
5216: mtl_transaction_lots_temp mtlt, mtl_serial_numbers msn, wms_dispatched_tasks wdt
5217: WHERE mmtt.transaction_temp_id = mtlt.transaction_temp_id (+)
5218: AND ((msnt.transaction_temp_id = mmtt.transaction_temp_id and
5219: mtlt.lot_number is null) or
5220: (msnt.transaction_temp_id = mtlt.serial_transaction_temp_id

Line 5527: -- inserted into MTL_SERIAL_NUMBERS table (If needed).

5523: END IF;
5524:
5525: IF ( l_success = FALSE ) THEN
5526: -- mtl_serial_check.inv_qtybetwn approved our Serial_Number and
5527: -- inserted into MTL_SERIAL_NUMBERS table (If needed).
5528: -- Now we need to perform necessary adjustment transactions.
5529:
5530: IF ( l_debug = 1 ) THEN
5531: print_debug ( 'Serial count option: ' || l_serial_count_option );

Line 5733: FROM mtl_serial_numbers

5729: FROM
5730: (SELECT serial_number,
5731: inventory_item_id,
5732: current_organization_id
5733: FROM mtl_serial_numbers
5734: WHERE serial_number = g_cc_serial_entry.serial_number
5735: AND inventory_item_id = g_cc_entry.inventory_item_id
5736: AND current_organization_id = g_cc_entry.organization_id
5737: AND current_subinventory_code = g_cc_entry.subinventory

Line 5762: FROM mtl_serial_numbers

5758: (SELECT serial_number,
5759: inventory_item_id,
5760: current_organization_id,
5761: lpn_id
5762: FROM mtl_serial_numbers
5763: WHERE serial_number = g_cc_serial_entry.serial_number
5764: AND inventory_item_id = g_cc_entry.inventory_item_id
5765: AND current_organization_id = g_cc_entry.organization_id
5766: AND NVL(lot_number, 'XX') = NVL(g_cc_entry.lot_number, 'XX')

Line 6272: FROM MTL_SERIAL_NUMBERS

6268: SELECT CURRENT_SUBINVENTORY_CODE,
6269: NVL ( CURRENT_LOCATOR_ID, 0 )
6270: INTO l_msn_subinv,
6271: l_msn_locator_id
6272: FROM MTL_SERIAL_NUMBERS
6273: WHERE SERIAL_NUMBER = u1
6274: AND INVENTORY_ITEM_ID = g_cc_entry.inventory_item_id
6275: AND CURRENT_ORGANIZATION_ID = g_cc_entry.organization_id;
6276:

Line 6340: FROM MTL_SERIAL_NUMBERS

6336: SELECT 1,
6337: current_status
6338: INTO serial_count,
6339: l_current_status
6340: FROM MTL_SERIAL_NUMBERS
6341: WHERE SERIAL_NUMBER = l_serial_number
6342: AND INVENTORY_ITEM_ID = l_item_id
6343: AND CURRENT_ORGANIZATION_ID = l_org_id
6344: AND CURRENT_STATUS IN ( 1, 3 );

Line 6758: FROM MTL_SERIAL_NUMBERS

6754: l_current_status,
6755: l_msn_subinv,
6756: l_msn_locator_id,
6757: l_msn_lpn_id
6758: FROM MTL_SERIAL_NUMBERS
6759: WHERE SERIAL_NUMBER = l_serial_number
6760: AND INVENTORY_ITEM_ID = g_cc_entry.inventory_item_id
6761: AND CURRENT_ORGANIZATION_ID = g_cc_entry.organization_id;
6762:

Line 7221: -- instead since these are the primary keys for MTL_SERIAL_NUMBERS

7217: --g6 := NULL;
7218:
7219: -- New call to serial_check.inv_unmark_serial
7220: -- For performance reasons, pass the serial number and item id
7221: -- instead since these are the primary keys for MTL_SERIAL_NUMBERS
7222: IF ( l_serial_number_ctrl_code IN ( 2, 5 ) ) THEN
7223: IF ( l_serial_count_option = 2 ) THEN
7224: g1 := l_current_serial;
7225: g2 := l_current_serial;

Line 7382: FROM MTL_SERIAL_NUMBERS

7378:
7379: CURSOR lpn_serial_contents_cursor
7380: IS
7381: SELECT *
7382: FROM MTL_SERIAL_NUMBERS
7383: WHERE lpn_id = l_current_lpn;
7384:
7385: CURSOR lpn_multiple_serial_cursor
7386: IS

Line 7946: FROM mtl_serial_numbers

7942:
7943: IF ( p_serial_number IS NOT NULL ) THEN
7944: SELECT NVL ( cost_group_id, -999 )
7945: INTO l_cost_group_id
7946: FROM mtl_serial_numbers
7947: WHERE serial_number = p_serial_number
7948: AND inventory_item_id = p_inventory_item_id
7949: AND NVL ( revision, '@@@@@' ) = NVL ( p_revision, '@@@@@' )
7950: AND NVL ( lot_number, '@@@@@' ) = NVL ( p_lot_number, '@@@@@' )

Line 8070: FROM mtl_serial_numbers

8066: -- serial number's group mark ID to determine if it was
8067: -- counted as present or not
8068: SELECT group_mark_id
8069: INTO l_group_mark_id
8070: FROM mtl_serial_numbers
8071: WHERE serial_number = g_cc_serial_entry.serial_number
8072: AND current_organization_id = g_cc_entry.organization_id
8073: AND inventory_item_id = g_cc_entry.inventory_item_id;
8074:

Line 8221: FROM mtl_serial_numbers

8217: -- the updating in the same cursor used previously does not save
8218: -- and we do not want to necessarily do a commit yet.
8219: SELECT group_mark_id
8220: INTO l_group_mark_id
8221: FROM mtl_serial_numbers
8222: WHERE serial_number = g_cc_serial_entry.serial_number
8223: AND current_organization_id = g_cc_entry.organization_id
8224: AND inventory_item_id = g_cc_entry.inventory_item_id;
8225:

Line 8316: UPDATE mtl_serial_numbers

8312: || g_cc_serial_entry.serial_number
8313: );
8314: END IF;
8315:
8316: UPDATE mtl_serial_numbers
8317: SET group_mark_id = NULL
8318: WHERE serial_number = g_cc_serial_entry.serial_number
8319: AND current_organization_id = g_cc_entry.organization_id
8320: AND inventory_item_id = g_cc_entry.inventory_item_id;

Line 8677: -- total number of serials inserted into mtl_serial_numbers

8673: l_temp_prefix,
8674: l_from_ser_number
8675: );
8676: l_progress := '40';
8677: -- total number of serials inserted into mtl_serial_numbers
8678: l_range_numbers := l_to_ser_number - l_from_ser_number + 1;
8679: l_serial_num_length := LENGTH ( p_from_serial_number );
8680: l_prefix_length := LENGTH ( l_temp_prefix );
8681:

Line 8694: UPDATE mtl_serial_numbers

8690: '0'
8691: );
8692: l_progress := '50';
8693:
8694: UPDATE mtl_serial_numbers
8695: SET previous_status = current_status,
8696: current_status = p_current_status,
8697: lot_number = p_lot_number,
8698: current_organization_id = p_organization_id

Line 9182: FROM mtl_serial_numbers

9178: END IF;
9179:
9180: SELECT NVL ( SUM ( DECODE ( current_status, 3, 1, 0 ) ), 0 )
9181: INTO x_system_quantity
9182: FROM mtl_serial_numbers
9183: WHERE lpn_id IS NULL
9184: AND inventory_item_id = p_inventory_item_id
9185: AND current_organization_id = p_organization_id
9186: AND current_subinventory_code = p_subinventory

Line 9196: from mtl_serial_numbers_temp msnt, wms_loaded_quantities_v wl

9192: AND NVL ( revision, 'XXX' ) = NVL ( p_revision, 'XXX' );
9193:
9194: select count(*)
9195: into l_loaded_sys_qty
9196: from mtl_serial_numbers_temp msnt, wms_loaded_quantities_v wl
9197: where ((msnt.transaction_temp_id = wl.transaction_temp_id
9198: and wl.lot_number is null) or
9199: (msnt.transaction_temp_id = wl.serial_transaction_temp_id
9200: and wl.lot_number is not null)

Line 9220: FROM mtl_serial_numbers

9216: END IF;
9217:
9218: SELECT COUNT ( * )
9219: INTO x_system_quantity
9220: FROM mtl_serial_numbers
9221: WHERE lpn_id = p_parent_lpn_id
9222: AND inventory_item_id = p_inventory_item_id
9223: AND current_organization_id = p_organization_id
9224: AND ( NVL ( lot_number, 'XX' ) = NVL ( p_lot_number, 'XX' )

Line 9233: from mtl_serial_numbers_temp msnt, mtl_serial_numbers msn, wms_loaded_quantities_v wl

9229:
9230: --Bug#12645638
9231: SELECT Count(DISTINCT msn.serial_number)
9232: into l_loaded_sys_qty
9233: from mtl_serial_numbers_temp msnt, mtl_serial_numbers msn, wms_loaded_quantities_v wl
9234: where msn.lpn_id = nvl(wl.content_lpn_id,nvl(wl.lpn_id,-1))
9235: AND ((msnt.transaction_temp_id = wl.transaction_temp_id and wl.lot_number is null)
9236: or (msnt.transaction_temp_id = wl.serial_transaction_temp_id and wl.lot_number is not null))
9237: and wl.containerized_flag = 1

Line 9252: from mtl_serial_numbers msn, wms_loaded_quantities_v wl

9248: AND NVL ( wl.revision, 'XXX' ) = NVL ( p_revision, 'XXX' );
9249:
9250: /*SELECT SUM(NVL( wl.quantity,0)) --9452528
9251: into l_loaded_sys_qty
9252: from mtl_serial_numbers msn, wms_loaded_quantities_v wl
9253: where msn.lpn_id = nvl(wl.content_lpn_id,nvl(wl.lpn_id,-1))
9254: and wl.containerized_flag = 1
9255: and msn.inventory_item_id = wl.inventory_item_id
9256: and msn.current_organization_id = wl.ORGANIZATION_ID

Line 9360: FROM mtl_serial_numbers msn, mtl_cc_serial_numbers mcsn,

9356: /*
9357: print_debug('Checking schduled serial CCs..' );
9358: SELECT COUNT(*)
9359: INTO x_scheduled_qty
9360: FROM mtl_serial_numbers msn, mtl_cc_serial_numbers mcsn,
9361: mtl_material_statuses_vl mms, mtl_cycle_count_entries mcce
9362: WHERE msn.inventory_item_id = p_inventory_item_id
9363: AND msn.current_organization_id = p_organization_id
9364: AND msn.current_status IN (1, 3)

Line 10104: l_current_organization_id mtl_serial_numbers.current_organization_id%TYPE;

10100: RETURN BOOLEAN
10101: IS
10102:
10103: serial_unique_exp EXCEPTION;
10104: l_current_organization_id mtl_serial_numbers.current_organization_id%TYPE;
10105: l_inventory_item_id mtl_serial_numbers.inventory_item_id%TYPE;
10106: l_current_status mtl_serial_numbers.current_status%TYPE;
10107: l_organization_code mtl_parameters.organization_code%TYPE;
10108: l_serial_number_type mtl_parameters.serial_number_type%TYPE;

Line 10105: l_inventory_item_id mtl_serial_numbers.inventory_item_id%TYPE;

10101: IS
10102:
10103: serial_unique_exp EXCEPTION;
10104: l_current_organization_id mtl_serial_numbers.current_organization_id%TYPE;
10105: l_inventory_item_id mtl_serial_numbers.inventory_item_id%TYPE;
10106: l_current_status mtl_serial_numbers.current_status%TYPE;
10107: l_organization_code mtl_parameters.organization_code%TYPE;
10108: l_serial_number_type mtl_parameters.serial_number_type%TYPE;
10109: l_exp_case NUMBER;

Line 10106: l_current_status mtl_serial_numbers.current_status%TYPE;

10102:
10103: serial_unique_exp EXCEPTION;
10104: l_current_organization_id mtl_serial_numbers.current_organization_id%TYPE;
10105: l_inventory_item_id mtl_serial_numbers.inventory_item_id%TYPE;
10106: l_current_status mtl_serial_numbers.current_status%TYPE;
10107: l_organization_code mtl_parameters.organization_code%TYPE;
10108: l_serial_number_type mtl_parameters.serial_number_type%TYPE;
10109: l_exp_case NUMBER;
10110: l_nothing VARCHAR2(1);

Line 10114: FROM mtl_serial_numbers msn,mtl_parameters mp

10110: l_nothing VARCHAR2(1);
10111:
10112: CURSOR c_serials ( p_fserial_num VARCHAR2 ) IS
10113: SELECT msn.current_organization_id, msn.inventory_item_id, msn.current_status, mp.organization_code
10114: FROM mtl_serial_numbers msn,mtl_parameters mp
10115: WHERE msn.serial_number = p_fserial_num
10116: AND msn.current_organization_id IS NOT NULL
10117: AND msn.inventory_item_id IS NOT NULL
10118: AND msn.current_organization_id = mp.organization_id;

Line 10132: FROM MTL_SERIAL_NUMBERS S, MTL_PARAMETERS P

10128:
10129: BEGIN
10130: SELECT 'x'
10131: INTO l_nothing
10132: FROM MTL_SERIAL_NUMBERS S, MTL_PARAMETERS P
10133: WHERE S.CURRENT_ORGANIZATION_ID = P.ORGANIZATION_ID
10134: AND S.SERIAL_NUMBER = p_from_serial
10135: AND P.SERIAL_NUMBER_TYPE = 3
10136: AND P.ORGANIZATION_ID <> p_organization_id;

Line 10262: l_temp_serial mtl_serial_numbers.serial_number%TYPE;

10258: p_serial_prefix IN VARCHAR2,
10259: x_return_status OUT NOCOPY VARCHAR2
10260: )
10261: IS
10262: l_temp_serial mtl_serial_numbers.serial_number%TYPE;
10263: l_num_serial NUMBER;
10264: l_num_serial_final NUMBER;
10265: BEGIN
10266: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 10336: mtl_serial_numbers, mtl_cycle_count_entries will be updated and the out parameter x_return_result will

10332: This procedure will do the processing for a cycle count with header details as "Multiple Per Request"
10333: Count and "Quantity Only" Detail in which the count quantity is equal to system quantity.
10334:
10335: If count quantity is equal to system quantity, the relevant tables like mtl_cc_serial_numbers,
10336: mtl_serial_numbers, mtl_cycle_count_entries will be updated and the out parameter x_return_result will
10337: have the value 1.
10338:
10339: In case count quantity is not equal to system quantity (or there are other discrepancies), this procedure
10340: will not perform any logic and x_return_result will be set equal to 2.

Line 10390: FROM mtl_serial_numbers msn,

10386: BEGIN
10387:
10388: SELECT COUNT(*)
10389: INTO l_count_present_qty
10390: FROM mtl_serial_numbers msn,
10391: mtl_cc_serial_numbers mccsn
10392: WHERE mccsn.cycle_count_entry_id = g_cc_entry.cycle_count_entry_id
10393: AND msn.serial_number = mccsn.serial_number
10394: AND msn.current_organization_id = g_cc_entry.organization_id

Line 10461: UPDATE mtl_serial_numbers msn

10457: print_debug('Number of records updated in MTL_CC_SERIAL_NUMBERS table: ' || SQL%ROWCOUNT);
10458: END IF;
10459:
10460: -- Unmarking the serials that are marked as present
10461: UPDATE mtl_serial_numbers msn
10462: SET msn.group_mark_id = NULL
10463: WHERE msn.current_organization_id = g_cc_entry.organization_id
10464: AND msn.inventory_item_id = g_cc_entry.inventory_item_id
10465: AND EXISTS

Line 10474: print_debug('Number of records updated in MTL_SERIAL_NUMBERS table: ' || SQL%ROWCOUNT);

10470: )
10471: AND msn.group_mark_id = 1;
10472:
10473: IF l_debug = 1 THEN
10474: print_debug('Number of records updated in MTL_SERIAL_NUMBERS table: ' || SQL%ROWCOUNT);
10475: END IF;
10476:
10477: EXCEPTION
10478: WHEN OTHERS THEN