2142: l_commit_size NUMBER := 500;
2143: l_srl_ctl_code mtl_system_items.serial_number_control_code%type;
2144: l_lot_ctl_code mtl_system_items.lot_control_code%type;
2145: l_ib_flag mtl_system_items.comms_nl_trackable_flag%type;
2146: l_instance_id csi_item_instances.instance_id%type;
2147: l_prod_txn_status csd_product_transactions.prod_txn_status%type;
2148:
2149: -- activity record
2150: l_activity_rec activity_rec_type;
2720: IF NVL(l_ib_flag,'N') = 'Y' THEN
2721: BEGIN
2722: Select instance_id
2723: into l_instance_id
2724: from csi_item_instances
2725: where inventory_item_id = I.inventory_item_id
2726: and serial_number = l_st_serial_num; --bug#8261344
2727: --and instance_usage_code = 'IN_INVENTORY';
2728: EXCEPTION
3706: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
3707: BEGIN
3708: Select instance_id
3709: into l_instance_id
3710: from csi_item_instances
3711: where inventory_item_id = RCV.item_id
3712: and serial_number = l_serial_num;
3713: Exception
3714: When NO_DATA_FOUND THEN
4074: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
4075: BEGIN
4076: Select instance_id
4077: into l_instance_id
4078: from csi_item_instances
4079: where inventory_item_id = RCV.item_id
4080: and serial_number = l_serial_num;
4081: Exception
4082: When NO_DATA_FOUND THEN
4351: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
4352: BEGIN
4353: Select instance_id
4354: into l_instance_id
4355: from csi_item_instances
4356: where inventory_item_id = RCV.item_id
4357: and serial_number = l_serial_num;
4358: Exception
4359: When NO_DATA_FOUND THEN
5122: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
5123: BEGIN
5124: Select instance_id
5125: into l_instance_id
5126: from csi_item_instances
5127: where inventory_item_id = RCV.item_id
5128: and serial_number = l_serial_num;
5129: Exception
5130: When NO_DATA_FOUND THEN
5495: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
5496: BEGIN
5497: Select instance_id
5498: into l_instance_id
5499: from csi_item_instances
5500: where inventory_item_id = RCV.item_id
5501: and serial_number = l_serial_num;
5502: Exception
5503: When NO_DATA_FOUND THEN
5785: IF NVL(RCV.ib_flag,'N') = 'Y' THEN
5786: BEGIN
5787: Select instance_id
5788: into l_instance_id
5789: from csi_item_instances
5790: where inventory_item_id = RCV.item_id
5791: and serial_number = l_serial_num;
5792: Exception
5793: When NO_DATA_FOUND THEN
6596: --Bug#6779806
6597: CURSOR cur_get_instance_id(p_order_line_id number, p_inventory_item_id number)
6598: IS
6599: SELECT instance_id
6600: FROM csi_item_instances
6601: WHERE last_oe_order_line_id = p_order_line_id
6602: AND inventory_item_id = p_inventory_item_id;
6603:
6604: --Bug#6779806
6615: l_result_ship_qty NUMBER;
6616: l_total_records NUMBER;
6617: l_dummy varchar2(30);
6618: l_commit_size NUMBER := 500;
6619: l_instance_id csi_item_instances.instance_id%type;
6620: l_ib_flag mtl_system_items.comms_nl_trackable_flag%type;
6621: l_srl_ctl_code mtl_system_items.serial_number_control_code%type;
6622:
6623: -- activity record
6933: nvl(l_ib_flag,'N') = 'Y' THEN
6934: Begin
6935: Select instance_id
6936: into l_instance_id
6937: from csi_item_instances
6938: where inventory_item_id = I.inventory_item_id
6939: and serial_number = I.shipped_serial_num; --bug#8261344
6940: --and serial_number = 'SWTEST'; --swai: bug 12547701 comment this to debug IB instance missing
6941: Exception
7077: IF (NOT(l_serialized) and (nvl(l_ib_flag,'N') = 'Y')
7078: and (l_instance_id is null)
7079: and (l_enable_update_instance ='Y')) then
7080: --do nothing
7081: --due to csi_item_instances has not update the instance id yet
7082: --It is update by the concurent program.
7083: --if there is not instance id yet, we don't want to
7084: --update the history table
7085: null;