DBA Data[Home] [Help]

APPS.CSI_II_RELATIONSHIPS_PVT dependencies on CSI_ITEM_INSTANCES

Line 1300: from CSI_ITEM_INSTANCES csi

1296: where cir.object_id = p_object_id
1297: and cir.relationship_type_code = p_rel_type_code
1298: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1299: and EXISTS (select 'x'
1300: from CSI_ITEM_INSTANCES csi
1301: where csi.instance_id = cir.subject_id
1302: and DECODE(l_active_instances_only,FND_API.G_TRUE,NVL((csi.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate);
1303: --
1304: CURSOR OBJECT_CUR1(c_sysdate IN DATE) IS -- Used when Object ID and Rel Type are passed

Line 1315: from CSI_ITEM_INSTANCES csi

1311: where cir.object_id = p_object_id
1312: and cir.relationship_type_code = p_rel_type_code
1313: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1314: and EXISTS (select 'x'
1315: from CSI_ITEM_INSTANCES csi
1316: where csi.instance_id = cir.subject_id
1317: and csi.config_inst_hdr_id is not null
1318: and csi.config_inst_item_id is not null
1319: and csi.config_inst_rev_num is not null

Line 1332: from CSI_ITEM_INSTANCES csi

1328: from CSI_II_RELATIONSHIPS cir
1329: where cir.object_id = p_object_id
1330: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1331: and EXISTS (select 'x'
1332: from CSI_ITEM_INSTANCES csi
1333: where csi.instance_id = cir.subject_id
1334: and DECODE(l_active_instances_only,FND_API.G_TRUE,NVL((csi.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate);
1335: --
1336: CURSOR SUBJECT_CUR(c_sysdate IN DATE) IS --Used when subject ID and Rel type are passed

Line 1347: from CSI_ITEM_INSTANCES csi

1343: where cir.subject_id = p_subject_id
1344: and cir.relationship_type_code = p_rel_type_code
1345: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1346: and EXISTS (select 'x'
1347: from CSI_ITEM_INSTANCES csi
1348: where csi.instance_id = cir.subject_id
1349: and DECODE(l_active_instances_only,FND_API.G_TRUE,NVL((csi.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate);
1350: --
1351: CURSOR REL_ID_CUR(c_sysdate IN DATE) IS -- Used when only relationship_id is passed

Line 1361: from CSI_ITEM_INSTANCES csi

1357: from CSI_II_RELATIONSHIPS cir
1358: where cir.relationship_id = p_relationship_id
1359: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1360: and EXISTS (select 'x'
1361: from CSI_ITEM_INSTANCES csi
1362: where csi.instance_id = cir.subject_id
1363: and DECODE(l_active_instances_only,FND_API.G_TRUE,NVL((csi.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate);
1364: --
1365: CURSOR OTHER_PARAM_CUR(c_sysdate IN DATE) IS

Line 1378: from CSI_ITEM_INSTANCES csi

1374: and cir.relationship_type_code = NVL(p_rel_type_code,cir.relationship_type_code)
1375: and cir.subject_id = NVL(p_subject_id,cir.subject_id)
1376: and DECODE(l_active_relationship_only,FND_API.G_TRUE,NVL((cir.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate
1377: and EXISTS (select 'x'
1378: from CSI_ITEM_INSTANCES csi
1379: where csi.instance_id = cir.subject_id
1380: and DECODE(l_active_instances_only,FND_API.G_TRUE,NVL((csi.active_end_date),c_sysdate+1),c_sysdate+1) > sysdate);
1381: --
1382: l_ctr NUMBER := 0;

Line 2331: -- Get the last purge date from csi_item_instances table

2327: );
2328:
2329: -- x_relationship_tbl.DELETE ;
2330: --
2331: -- Get the last purge date from csi_item_instances table
2332: --
2333: BEGIN
2334: SELECT last_purge_date
2335: INTO l_last_purge_date

Line 2336: FROM CSI_ITEM_INSTANCES

2332: --
2333: BEGIN
2334: SELECT last_purge_date
2335: INTO l_last_purge_date
2336: FROM CSI_ITEM_INSTANCES
2337: WHERE rownum < 2;
2338: EXCEPTION
2339: WHEN no_data_found THEN
2340: NULL;

Line 2472: from CSI_ITEM_INSTANCES

2468: ELSE -- p_time_stamp is not passed
2469: Begin
2470: Select 'x'
2471: into l_exists
2472: from CSI_ITEM_INSTANCES
2473: where instance_id = l_relationship_tbl(rel_row).subject_id
2474: and nvl(active_end_date,(sysdate+1)) < sysdate;
2475: l_ctr := l_exp_inst_tbl.count;
2476: l_ctr := l_ctr + 1;

Line 2572: -- Get the last purge date from csi_item_instances table

2568: RAISE FND_API.G_EXC_ERROR;
2569: END IF;
2570:
2571: --
2572: -- Get the last purge date from csi_item_instances table
2573: --
2574: BEGIN
2575: SELECT last_purge_date
2576: INTO l_last_purge_date

Line 2577: FROM CSI_ITEM_INSTANCES

2573: --
2574: BEGIN
2575: SELECT last_purge_date
2576: INTO l_last_purge_date
2577: FROM CSI_ITEM_INSTANCES
2578: WHERE rownum < 2;
2579: EXCEPTION
2580: WHEN no_data_found THEN
2581: NULL;

Line 2841: from CSI_ITEM_INSTANCES

2837: ELSE -- p_time_stamp is not passed
2838: Begin
2839: Select 'x'
2840: into l_exists
2841: from CSI_ITEM_INSTANCES
2842: where instance_id = l_relationship_tbl(rel_row).subject_id
2843: and nvl(active_end_date,(sysdate+1)) < sysdate;
2844: l_ctr := l_exp_inst_tbl.count;
2845: FOR v_rec in CHILD_CUR(l_relationship_tbl(rel_row).subject_id) LOOP

Line 3266: FROM csi_item_instances cii

3262: --
3263: BEGIN
3264: SELECT msi.ib_item_instance_class
3265: INTO l_link
3266: FROM csi_item_instances cii
3267: ,mtl_system_items_b msi
3268: WHERE cii.instance_id = p_instance_id
3269: AND msi.inventory_item_id=cii.inventory_item_id
3270: AND msi.organization_id=cii.last_vld_organization_id

Line 4483: FROM csi_item_instances

4479: INTO l_object_version1,
4480: l_instance_rec.config_inst_hdr_id, -- added
4481: l_instance_rec.config_inst_item_id, -- added
4482: l_instance_rec.config_inst_rev_num -- added
4483: FROM csi_item_instances
4484: WHERE instance_id=l_ii_relationship_rec.subject_id;
4485: l_instance_rec.object_version_number:=l_object_version1;
4486: IF p_mode='CREATE' OR p_mode='UPDATE'
4487: THEN

Line 4520: FROM csi_item_instances

4516: l_instance_rec.po_order_line_id,
4517: l_instance_rec.operational_status_code,
4518: l_instance_rec.install_location_id,
4519: l_instance_rec.install_location_type_code
4520: FROM csi_item_instances
4521: WHERE instance_id=l_ii_relationship_rec.object_id;
4522:
4523: --Added for Bug 13831400 -- modified for bug 14004522
4524: IF(p_txn_rec.TRANSACTION_TYPE_ID = 73 OR nvl(FND_PROFILE.VALUE('CSI_CASCADE_STATUS'), 'Y') <> 'N') THEN

Line 4527: FROM csi_item_instances

4523: --Added for Bug 13831400 -- modified for bug 14004522
4524: IF(p_txn_rec.TRANSACTION_TYPE_ID = 73 OR nvl(FND_PROFILE.VALUE('CSI_CASCADE_STATUS'), 'Y') <> 'N') THEN
4525: SELECT instance_status_id
4526: INTO l_instance_rec.instance_status_id
4527: FROM csi_item_instances
4528: WHERE instance_id=l_ii_relationship_rec.object_id;
4529: END IF;
4530:
4531: -- Begin Add Code for Siebel Genesis Project

Line 4613: FROM csi_item_instances

4609: IF l_subject_id IS NOT NULL
4610: THEN
4611: SELECT COUNT(*)
4612: INTO l_dummy
4613: FROM csi_item_instances
4614: WHERE instance_id IN ( SELECT subject_id
4615: FROM csi_ii_relationships
4616: WHERE object_id = l_rel_tbl(j).object_id
4617: AND mandatory_flag = 'Y'

Line 4633: FROM csi_item_instances

4629: INTO l_object_version,
4630: l_instance_rec1.config_inst_hdr_id, --added
4631: l_instance_rec1.config_inst_item_id, --added
4632: l_instance_rec1.config_inst_rev_num --added
4633: FROM csi_item_instances
4634: WHERE instance_id = l_rel_tbl(j).object_id;
4635:
4636: l_instance_rec1:=l_temp_ins_rec;
4637: l_instance_rec1.object_version_number:=l_object_version;

Line 4756: FROM csi_item_instances

4752: SELECT instance_id
4753: ,object_version_number
4754: INTO l_instance_rec.instance_id
4755: ,l_instance_rec.object_version_number
4756: FROM csi_item_instances
4757: WHERE instance_id = p_ii_relationship_rec.subject_id;
4758:
4759: l_party_tbl(1).instance_id := p_ii_relationship_rec.subject_id;
4760: l_account_tbl(1).parent_tbl_index := 1;

Line 5238: FROM csi_item_instances

5234: SELECT object_version_number,
5235: 'Y'
5236: INTO l_instance_rec.object_version_number,
5237: l_instance_rec.cascade_ownership_flag
5238: FROM csi_item_instances
5239: WHERE instance_id=l_instance_rec.instance_id
5240: AND (active_end_date IS NULL OR active_end_date > sysdate);
5241: EXCEPTION
5242: WHEN OTHERS

Line 5245: csi_gen_utility_pvt.put_line( 'The object_id, which you are trying to cascade its ownership, is not found or expired in csi_item_instances table. ');

5241: EXCEPTION
5242: WHEN OTHERS
5243: THEN
5244: csi_gen_utility_pvt.put_line( 'Error from create relationship API.');
5245: csi_gen_utility_pvt.put_line( 'The object_id, which you are trying to cascade its ownership, is not found or expired in csi_item_instances table. ');
5246: RAISE fnd_api.g_exc_error;
5247: END;
5248:
5249: csi_item_instance_pub.update_item_instance

Line 5743: FROM csi_item_instances

5739: IF l_object_id <> l_relship_csr.subject_id THEN
5740: BEGIN
5741: SELECT instance_usage_code
5742: INTO l_ins_usage_code
5743: FROM csi_item_instances
5744: WHERE instance_id=l_object_id;
5745: EXCEPTION
5746: WHEN NO_DATA_FOUND THEN
5747: NULL;

Line 5766: FROM csi_item_instances

5762: l_instance_rec.config_inst_rev_num, --added
5763: l_loc_type_code,
5764: l_item_id,
5765: l_vld_org
5766: FROM csi_item_instances
5767: WHERE instance_id = l_relship_csr.subject_id;
5768: --
5769: -- Bug 4232599. Serialized at SO issue items cannot have usage as IN_INVENTORY
5770: -- as taken from parent. Since relationship can be broken only thru' RMA,

Line 5969: FROM csi_item_instances

5965: --Added for Bug 14163453
5966: BEGIN
5967: SELECT object_version_number
5968: INTO l_obv_number
5969: FROM csi_item_instances
5970: WHERE instance_id = l_relship_csr.subject_id;
5971:
5972: EXCEPTION
5973: WHEN OTHERS THEN

Line 6114: FROM csi_item_instances

6110: SELECT object_version_number,
6111: 'Y'
6112: INTO l_inst_rec.object_version_number,
6113: l_inst_rec.cascade_ownership_flag
6114: FROM csi_item_instances
6115: WHERE instance_id=l_inst_rec.instance_id
6116: AND (active_end_date IS NULL OR active_end_date > sysdate);
6117: EXCEPTION
6118: WHEN OTHERS

Line 6121: csi_gen_utility_pvt.put_line( 'The object_id, which you are trying to cascade its ownership, is not found or expired in csi_item_instances table. ');

6117: EXCEPTION
6118: WHEN OTHERS
6119: THEN
6120: csi_gen_utility_pvt.put_line( 'Error from update relationship API.');
6121: csi_gen_utility_pvt.put_line( 'The object_id, which you are trying to cascade its ownership, is not found or expired in csi_item_instances table. ');
6122: RAISE fnd_api.g_exc_error;
6123: END;
6124:
6125: csi_item_instance_pub.update_item_instance

Line 6376: FROM csi_item_instances

6372: BEGIN
6373: SELECT instance_usage_code,
6374: serial_number
6375: INTO l_ins_usage_code, l_serial_number
6376: FROM csi_item_instances
6377: WHERE instance_id=l_object_id;
6378: EXCEPTION
6379: WHEN NO_DATA_FOUND THEN
6380: NULL;

Line 6400: FROM csi_item_instances

6396: l_item_id,
6397: l_vld_org,
6398: l_loc_type_code,
6399: l_instance_status_id
6400: FROM csi_item_instances
6401: WHERE instance_id = l_relship_csr.subject_id;
6402: --
6403: -- Bug 4232599. Serialized at SO issue items cannot have usage as IN_INVENTORY
6404: -- as taken from parent. Since relationship can be broken only thru' RMA,

Line 6911: FROM csi_item_instances cii

6907: -- The following code has been added by sguthiva for bug 2416144.
6908: BEGIN
6909: SELECT 'x'
6910: INTO l_active
6911: FROM csi_item_instances cii
6912: WHERE cii.instance_id=p_object_id
6913: AND (SYSDATE BETWEEN NVL(cii.active_start_date, SYSDATE) AND NVL(cii.active_end_date, SYSDATE));
6914: EXCEPTION
6915: WHEN NO_DATA_FOUND THEN

Line 6936: FROM csi_item_instances

6932: ,l_quantity
6933: ,l_location_type_code
6934: ,l_inventory_item_id
6935: ,l_vld_org_id
6936: FROM csi_item_instances
6937: WHERE instance_id=p_object_id;
6938: IF l_quantity IS NOT NULL THEN
6939: IF l_quantity<>1 THEN
6940: fnd_message.set_name('CSI', 'CSI_QTY_NOTEQUAL_TO_ONE');

Line 7033: FROM csi_item_instances

7029: ,l_quantity
7030: ,l_location_type_code
7031: ,l_inventory_item_id
7032: ,l_vld_org_id
7033: FROM csi_item_instances
7034: WHERE instance_id=p_object_id;
7035:
7036: IF l_quantity IS NOT NULL THEN
7037: IF l_quantity<>1 THEN

Line 7157: FROM csi_item_instances cii

7153: THEN
7154: BEGIN
7155: SELECT 'x'
7156: INTO l_active
7157: FROM csi_item_instances cii
7158: WHERE cii.instance_id=p_subject_id
7159: AND (SYSDATE BETWEEN NVL(cii.active_start_date, SYSDATE) AND NVL(cii.active_end_date, SYSDATE));
7160: EXCEPTION
7161: WHEN NO_DATA_FOUND THEN

Line 7173: FROM csi_item_instances

7169: -- End of addition for bug 2416144.
7170: BEGIN
7171: SELECT instance_id,location_type_code
7172: INTO l_instance_id,l_location_type_code
7173: FROM csi_item_instances
7174: WHERE instance_id=p_subject_id;
7175: /* commented by sk for bug 2151750
7176: IF l_location_type_code IS NOT NULL THEN
7177: IF UPPER(l_location_type_code) = 'INVENTORY' THEN

Line 7414: FROM csi_item_instances

7410: (p_rel_history_tbl(tab_row).OLD_SUBJECT_ID <> FND_API.G_MISS_NUM) ) THEN
7411: BEGIN
7412: SELECT instance_number
7413: INTO p_rel_history_tbl(tab_row).old_subject_number
7414: FROM csi_item_instances
7415: WHERE instance_id = p_rel_history_tbl(tab_row).old_subject_id;
7416: EXCEPTION
7417: WHEN OTHERS THEN
7418: NULL;

Line 7427: FROM csi_item_instances

7423: (p_rel_history_tbl(tab_row).NEW_SUBJECT_ID <> FND_API.G_MISS_NUM) ) THEN
7424: BEGIN
7425: SELECT instance_number
7426: INTO p_rel_history_tbl(tab_row).new_subject_number
7427: FROM csi_item_instances
7428: WHERE instance_id = p_rel_history_tbl(tab_row).new_subject_id;
7429: EXCEPTION
7430: WHEN OTHERS THEN
7431: NULL;