DBA Data[Home] [Help]

APPS.CTO_OSS_SOURCE_PK dependencies on BOM_CTO_OSS_ORGSLIST_GT

Line 644: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */

640: delete /*+ INDEX (bom_cto_oss_source_gt BOM_CTO_OSS_SOURCE_GT_N1) */
641: from bom_cto_oss_source_gt
642: where ato_line_id = p_ato_line_id;
643:
644: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */
645: from bom_cto_oss_orgslist_gt
646: where ato_line_id = p_ato_line_id;
647:
648: /* Make a call to an API which will process this order for OSS */

Line 645: from bom_cto_oss_orgslist_gt

641: from bom_cto_oss_source_gt
642: where ato_line_id = p_ato_line_id;
643:
644: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */
645: from bom_cto_oss_orgslist_gt
646: where ato_line_id = p_ato_line_id;
647:
648: /* Make a call to an API which will process this order for OSS */
649:

Line 970: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */

966: g_pg_level := g_pg_level + 3;
967: x_return_status := FND_API.G_RET_STS_SUCCESS;
968: x_exp_error_code := 0;
969:
970: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */
971: from bom_cto_oss_orgslist_gt
972: where ato_line_id = p_ato_line_id;
973:
974: /* The following sql will find out how manny componets in this

Line 971: from bom_cto_oss_orgslist_gt

967: x_return_status := FND_API.G_RET_STS_SUCCESS;
968: x_exp_error_code := 0;
969:
970: delete /*+ INDEX (bom_cto_oss_orgslist_gt BOM_CTO_OSS_ORGSLIST_GT_N1) */
971: from bom_cto_oss_orgslist_gt
972: where ato_line_id = p_ato_line_id;
973:
974: /* The following sql will find out how manny componets in this
975: configuration has OSS definition

Line 1011: Insert into bom_cto_oss_orgslist_gt

1007: */
1008:
1009: l_stmt_num := 20;
1010:
1011: Insert into bom_cto_oss_orgslist_gt
1012: (
1013: line_id, /* Model Line id */
1014: inventory_item_id,/* Model item id */
1015: organization_id, /* Organization Id */

Line 1056: Insert into bom_cto_oss_orgslist_gt(

1052: */
1053:
1054: l_stmt_num := 30;
1055:
1056: Insert into bom_cto_oss_orgslist_gt(
1057: line_id,
1058: inventory_item_id,
1059: vendor_id,
1060: vendor_site_code,

Line 1174: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

1170: bom_cto_oss_source_gt oss_src
1171: set oss_src.valid_flag = 'Y'
1172: where oss_src.line_id = p_model_line_id
1173: and ((oss_src.source_org_id in
1174: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1175: organization_id
1176: from bom_cto_oss_orgslist_gt oss_lis
1177: where oss_lis.line_id = p_model_line_id)
1178: or (nvl(oss_src.vendor_id,-1),nvl(oss_src.vendor_site_code,-1)) in

Line 1176: from bom_cto_oss_orgslist_gt oss_lis

1172: where oss_src.line_id = p_model_line_id
1173: and ((oss_src.source_org_id in
1174: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1175: organization_id
1176: from bom_cto_oss_orgslist_gt oss_lis
1177: where oss_lis.line_id = p_model_line_id)
1178: or (nvl(oss_src.vendor_id,-1),nvl(oss_src.vendor_site_code,-1)) in
1179: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1180: nvl(vendor_id,-99),vendor_site_code

Line 1179: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

1175: organization_id
1176: from bom_cto_oss_orgslist_gt oss_lis
1177: where oss_lis.line_id = p_model_line_id)
1178: or (nvl(oss_src.vendor_id,-1),nvl(oss_src.vendor_site_code,-1)) in
1179: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1180: nvl(vendor_id,-99),vendor_site_code
1181: from bom_cto_oss_orgslist_gt oss_lis
1182: where oss_lis.line_id = p_model_line_id)
1183: )

Line 1181: from bom_cto_oss_orgslist_gt oss_lis

1177: where oss_lis.line_id = p_model_line_id)
1178: or (nvl(oss_src.vendor_id,-1),nvl(oss_src.vendor_site_code,-1)) in
1179: (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1180: nvl(vendor_id,-99),vendor_site_code
1181: from bom_cto_oss_orgslist_gt oss_lis
1182: where oss_lis.line_id = p_model_line_id)
1183: )
1184: )
1185: and (oss_src.rcv_org_id is null or

Line 1187: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

1183: )
1184: )
1185: and (oss_src.rcv_org_id is null or
1186: oss_src.rcv_org_id in (
1187: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1188: organization_id
1189: from bom_cto_oss_orgslist_gt oss_lis
1190: where line_id = p_model_line_id)
1191: );

Line 1189: from bom_cto_oss_orgslist_gt oss_lis

1185: and (oss_src.rcv_org_id is null or
1186: oss_src.rcv_org_id in (
1187: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1188: organization_id
1189: from bom_cto_oss_orgslist_gt oss_lis
1190: where line_id = p_model_line_id)
1191: );
1192:
1193:

Line 1229: Select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

1225: source_type,
1226: valid_flag,
1227: leaf_node
1228: )
1229: Select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1230: p_model_item_id,
1231: p_model_line_id,
1232: p_config_item_id,
1233: oss_lis.organization_id,

Line 1245: from bom_cto_oss_orgslist_gt oss_lis,

1241: 'N',
1242: 2, /* Make at source type */
1243: 'Y', /* Valid flag */
1244: 'Y' /* Leaf node */
1245: from bom_cto_oss_orgslist_gt oss_lis,
1246: mtl_system_items msi
1247: where oss_lis.organization_id not in
1248: (select /*+ INDEX (oss_src BOM_CTO_OSS_SOURCE_GT_N2) */
1249: nvl(rcv_org_id,-1)

Line 1333: -- Delete from bom_cto_oss_orgslist_gt;

1329: and re-use the code later
1330: */
1331:
1332: l_stmt_num := 100;
1333: -- Delete from bom_cto_oss_orgslist_gt;
1334: /* Renga: Is it required to have delete here
1335: */
1336:
1337: /* Renga: Things about match and re-use case for parent configs

Line 1493: The above commenting is done while inserting into bom_cto_oss_orgslist_gt

1489: The above sql would properly prune model2 using OSS of model3 but would skip
1490: pruning model1 using pruned tree for model2 and model3 combined. This results
1491: in wrong sourcing results being returned.
1492:
1493: The above commenting is done while inserting into bom_cto_oss_orgslist_gt
1494: also.
1495: */
1496:
1497: /* Get the intersection org from all the child oss configurations and

Line 1498: load it to bom_cto_oss_orgslist_gt table

1494: also.
1495: */
1496:
1497: /* Get the intersection org from all the child oss configurations and
1498: load it to bom_cto_oss_orgslist_gt table
1499: */
1500:
1501:
1502: If PG_DEBUG <> 0 Then

Line 1510: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */

1506: l_stmt_num := 20;
1507: If l_oss_child_count > 0 then
1508:
1509: l_stmt_num := 30;
1510: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */
1511: from bom_cto_oss_orgslist_gt oss_lis
1512: where ato_line_id = p_ato_line_id;
1513: l_stmt_num := 40;
1514:

Line 1511: from bom_cto_oss_orgslist_gt oss_lis

1507: If l_oss_child_count > 0 then
1508:
1509: l_stmt_num := 30;
1510: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */
1511: from bom_cto_oss_orgslist_gt oss_lis
1512: where ato_line_id = p_ato_line_id;
1513: l_stmt_num := 40;
1514:
1515: insert into bom_cto_oss_orgslist_gt(

Line 1515: insert into bom_cto_oss_orgslist_gt(

1511: from bom_cto_oss_orgslist_gt oss_lis
1512: where ato_line_id = p_ato_line_id;
1513: l_stmt_num := 40;
1514:
1515: insert into bom_cto_oss_orgslist_gt(
1516: Inventory_item_id,
1517: line_id,
1518: organization_id,
1519: ato_line_id )

Line 1705: source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

1701: where line_id = p_model_line_id
1702: and leaf_node = 'Y'
1703: and nvl(valid_flag,'Y') <> 'N'
1704: and (source_type = 3 or
1705: source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1706: organization_id
1707: from bom_cto_oss_orgslist_gt oss_list
1708: where line_id = p_model_line_id
1709: )

Line 1707: from bom_cto_oss_orgslist_gt oss_list

1703: and nvl(valid_flag,'Y') <> 'N'
1704: and (source_type = 3 or
1705: source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
1706: organization_id
1707: from bom_cto_oss_orgslist_gt oss_list
1708: where line_id = p_model_line_id
1709: )
1710: )
1711: Returning rcv_org_id,source_org_id Bulk collect into l_source_org_tbl,l_rcv_org_tbl;

Line 1791: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) INDEX(bcol BOM_CTO_ORDER_LINES_GT_U1*/

1787: valid_flag,
1788: leaf_node
1789: )
1790:
1791: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) INDEX(bcol BOM_CTO_ORDER_LINES_GT_U1*/
1792: p_model_item_id,
1793: p_model_line_id,
1794: oss_lis.organization_id,
1795: oss_lis.organization_id,

Line 1806: from bom_cto_oss_orgslist_gt oss_lis,

1802: null,
1803: 2,
1804: 'Y',
1805: 'Y'
1806: from bom_cto_oss_orgslist_gt oss_lis,
1807: mtl_system_items msi,
1808: bom_cto_order_lines_gt bcol
1809: where
1810: bcol.line_id = p_model_line_id

Line 3600: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

3596: and nvl(valid_flag,'Y') <> 'N'
3597: and
3598: (source_type = 3
3599: or ( Source_type = 2
3600: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3601: organization_id
3602: from bom_cto_oss_orgslist_gt OSS_LIS
3603: where line_id = p_model_line_id)
3604: )

Line 3602: from bom_cto_oss_orgslist_gt OSS_LIS

3598: (source_type = 3
3599: or ( Source_type = 2
3600: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3601: organization_id
3602: from bom_cto_oss_orgslist_gt OSS_LIS
3603: where line_id = p_model_line_id)
3604: )
3605: or ( source_type = 1
3606: and source_org_id not in

Line 3805: --and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

3801: and source_org_id = p_source_org_id
3802: and rcv_org_id = p_rcv_org_id
3803: and nvl(valid_flag,'Y') <> 'N'
3804: --Bugfix 13540153-FP(13360098)
3805: --and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3806: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3807: --Bugfix 13540153-FP(13360098): Adding an nvl.
3808: nvl(organization_id, -9999)
3809: from bom_cto_oss_orgslist_gt oss_lis

Line 3806: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

3802: and rcv_org_id = p_rcv_org_id
3803: and nvl(valid_flag,'Y') <> 'N'
3804: --Bugfix 13540153-FP(13360098)
3805: --and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3806: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3807: --Bugfix 13540153-FP(13360098): Adding an nvl.
3808: nvl(organization_id, -9999)
3809: from bom_cto_oss_orgslist_gt oss_lis
3810: where line_id = p_model_line_id);

Line 3809: from bom_cto_oss_orgslist_gt oss_lis

3805: --and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3806: and source_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3807: --Bugfix 13540153-FP(13360098): Adding an nvl.
3808: nvl(organization_id, -9999)
3809: from bom_cto_oss_orgslist_gt oss_lis
3810: where line_id = p_model_line_id);
3811:
3812: --Bugfix 13540153-FP(13360098)
3813: l_cnt := sql%rowcount;

Line 3855: and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

3851: and nvl(valid_flag,'Y') <> 'N'
3852: -- Not touching this rcv_org_id value as was done in the if block. The piece of code
3853: -- is fragile and we would take the issues as and when they come. This sql might be
3854: -- a potential red flag in the future.
3855: and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3856: --Bugfix 13540153-FP(13360098): Adding an nvl.
3857: nvl(organization_id, -9999)
3858: from bom_cto_oss_orgslist_gt oss_lis
3859: where line_id = p_model_line_id);

Line 3858: from bom_cto_oss_orgslist_gt oss_lis

3854: -- a potential red flag in the future.
3855: and rcv_org_id in (select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
3856: --Bugfix 13540153-FP(13360098): Adding an nvl.
3857: nvl(organization_id, -9999)
3858: from bom_cto_oss_orgslist_gt oss_lis
3859: where line_id = p_model_line_id);
3860:
3861: --Bugfix 13540153-FP(13360098)
3862: l_cnt := sql%rowcount;

Line 4025: delete from bom_cto_oss_orgslist_gt;

4021: oe_debug_pub.add(lpad(' ',g_pg_level)||'GET_OSS_ORGS_LIST: Number of records delete in source_gt = '
4022: ||sql%rowcount,5);
4023: end if;
4024:
4025: delete from bom_cto_oss_orgslist_gt;
4026:
4027: If PG_DEBUG <> 0 Then
4028: oe_debug_pub.add(lpad(' ',g_pg_level)||'GET_OSS_ORGS_LIST: Number of records delete in source_gt = '
4029: ||sql%rowcount,5);

Line 4175: from bom_cto_oss_orgslist_gt;

4171: x_oss_orgs_list.org_id,
4172: x_oss_orgs_list.vendor_id,
4173: x_oss_orgs_list.vendor_site,
4174: x_oss_orgs_list.make_flag
4175: from bom_cto_oss_orgslist_gt;
4176:
4177:
4178: If PG_DEBUG <> 0 Then
4179: If x_oss_orgs_list.line_id.count <> 0 Then

Line 4403: delete from bom_cto_oss_orgslist_gt;

4399: End if;
4400:
4401: END LOOP;
4402:
4403: delete from bom_cto_oss_orgslist_gt;
4404:
4405: l_stmt_no := 30;
4406: update bom_cto_oss_source_gt ossgt1
4407: set reuse_flag = 'N'

Line 4433: INSERT into bom_cto_oss_orgslist_gt(

4429: and ossgt2.valid_flag = 'Y');
4430:
4431:
4432: l_stmt_no := 50;
4433: INSERT into bom_cto_oss_orgslist_gt(
4434: Inventory_item_id,
4435: line_id,
4436: ato_line_id,
4437: organization_id,

Line 4592: INSERT into bom_cto_oss_orgslist_gt(

4588:
4589:
4590:
4591:
4592: INSERT into bom_cto_oss_orgslist_gt(
4593: Inventory_item_id,
4594: line_id,
4595: ato_line_id,
4596: organization_id,

Line 5552: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */

5548: End if;
5549:
5550: l_stmt_num := 20;
5551:
5552: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */
5553: from bom_cto_oss_orgslist_gt oss_lis
5554: where ato_line_id = p_ato_line_id;
5555:
5556: For oss_model_rec in oss_models

Line 5553: from bom_cto_oss_orgslist_gt oss_lis

5549:
5550: l_stmt_num := 20;
5551:
5552: delete /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N1) */
5553: from bom_cto_oss_orgslist_gt oss_lis
5554: where ato_line_id = p_ato_line_id;
5555:
5556: For oss_model_rec in oss_models
5557: Loop

Line 5867: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */

5863: and config_creation <> '3'
5864: order by plan_level;
5865:
5866: Cursor mfg_orgs_cur(p_line_id Number) is
5867: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
5868: organization_id
5869: from bom_cto_oss_orgslist_gt oss_lis
5870: where line_id = p_line_id;
5871:

Line 5869: from bom_cto_oss_orgslist_gt oss_lis

5865:
5866: Cursor mfg_orgs_cur(p_line_id Number) is
5867: select /*+ INDEX (oss_lis BOM_CTO_OSS_ORGSLIST_GT_N2) */
5868: organization_id
5869: from bom_cto_oss_orgslist_gt oss_lis
5870: where line_id = p_line_id;
5871:
5872: x_assg_list assg_rec;
5873: l_stmt_num Number;

Line 5890: into bom_cto_oss_orgslist_gt(

5886: oe_debug_pub.add(lpad(' ',g_pg_level)||'GET_ORDER_SOURCNIG_DATA: Inside GET_ORDER_SOURCING_DATA API',5);
5887: End if;
5888:
5889: Insert
5890: into bom_cto_oss_orgslist_gt(
5891: line_id,
5892: organization_id,
5893: ato_line_id
5894: )

Line 6297: insert into bom_cto_oss_orgslist_gt(

6293: l_assg_id := src_rec.assignment_id;
6294: If src_rec.source_type in (2,3) Then
6295: l_stmt_num := 50;
6296: oe_debug_pub.add(lpad(' ',g_pg_level)||'TRAVERSE_SOURCING_CHAIN: End org = '||src_rec.organization_id,1);
6297: insert into bom_cto_oss_orgslist_gt(
6298: line_id,
6299: organization_id,
6300: ato_line_id
6301: )

Line 6333: insert into bom_cto_oss_orgslist_gt(

6329: If PG_DEBUG <> 0 Then
6330: oe_debug_pub.add(lpad(' ',g_pg_level)||'TRAVERSE_SOURCING_CHAIN: End of source chain',5);
6331: End if;
6332:
6333: insert into bom_cto_oss_orgslist_gt(
6334: line_id,
6335: organization_id,
6336: ato_line_id
6337: )

Line 6635: from bom_cto_oss_orgslist_gt;

6631: organization_id,
6632: vendor_id,
6633: vendor_site_code,
6634: make_flag
6635: from bom_cto_oss_orgslist_gt;
6636: --where line_id = p_line_id;
6637: begin
6638: oe_debug_pub.add('================PRINTING BOM_CTO_ORGSLIST_GT==================',5);
6639: --oe_debug_pub.add('================ Line id = '||p_line_id||'======================',5);