DBA Data[Home] [Help]

APPS.MSC_ATP_PROC dependencies on MSC_ATP_SOURCES_TEMP

Line 6418: -- Delete the table MSC_ATP_SOURCES_TEMP

6414: IF PG_DEBUG in ('Y', 'C') THEN
6415: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');
6416: END IF;
6417:
6418: -- Delete the table MSC_ATP_SOURCES_TEMP
6419: DELETE MSC_ATP_SOURCES_TEMP;
6420:
6421: FOR l_counter IN l_dist_level_type.FIRST..l_dist_level_type.LAST LOOP
6422:

Line 6419: DELETE MSC_ATP_SOURCES_TEMP;

6415: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');
6416: END IF;
6417:
6418: -- Delete the table MSC_ATP_SOURCES_TEMP
6419: DELETE MSC_ATP_SOURCES_TEMP;
6420:
6421: FOR l_counter IN l_dist_level_type.FIRST..l_dist_level_type.LAST LOOP
6422:
6423: IF (l_dist_level_type(l_counter) = 1) THEN

Line 6433: -- Find and insert the sources in msc_atp_sources_temp

6429:
6430: -- At first level, visited_flag in table msc_ship_set_temp is 0 for all rows.
6431: -- Therefore no need for clause 'AND msst.visisble_flag = 0'.
6432:
6433: -- Find and insert the sources in msc_atp_sources_temp
6434: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6435: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6436: SELECT
6437: MSST.INVENTORY_ITEM_ID,

Line 6434: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

6430: -- At first level, visited_flag in table msc_ship_set_temp is 0 for all rows.
6431: -- Therefore no need for clause 'AND msst.visisble_flag = 0'.
6432:
6433: -- Find and insert the sources in msc_atp_sources_temp
6434: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6435: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6436: SELECT
6437: MSST.INVENTORY_ITEM_ID,
6438: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 6499: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);

6495:
6496: -- Mark all the items for which sources are/have been found.
6497: UPDATE msc_ship_set_temp
6498: set visited_flag = 1
6499: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);
6500:
6501: l_updated_rows := SQL%ROWCOUNT;
6502:
6503: -- Check if all the items in ship set are processed.

Line 6506: -- Find the common sources from the pool of sources in msc_atp_sources_temp

6502:
6503: -- Check if all the items in ship set are processed.
6504: IF (l_updated_rows = p_ship_set_item_count) THEN
6505:
6506: -- Find the common sources from the pool of sources in msc_atp_sources_temp
6507: SELECT Organization_Id,
6508: Instance_Id,
6509: Supplier_Id,
6510: Supplier_Site_Id,

Line 6528: FROM MSC_ATP_SOURCES_TEMP

6524: x_atp_sources.Preferred,
6525: x_atp_sources.Lead_Time,
6526: x_atp_sources.Ship_Method,
6527: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6528: FROM MSC_ATP_SOURCES_TEMP
6529: GROUP BY
6530: Organization_Id,
6531: Instance_Id,
6532: Supplier_Id,

Line 6640: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp

6636: SET min_region_value = l_min_region_value_arr(i),
6637: visited_flag = 1
6638: WHERE inventory_item_id = l_inventory_item_id_arr(i);
6639:
6640: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
6641: -- This is done by adding clause AND (expr) = msst.min_region_value
6642: -- and removing the clause AND visited_flag = 0
6643:
6644: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

Line 6644: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

6640: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
6641: -- This is done by adding clause AND (expr) = msst.min_region_value
6642: -- and removing the clause AND visited_flag = 0
6643:
6644: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6645: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6646: SELECT
6647: MSST.INVENTORY_ITEM_ID,
6648: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 6733: FROM MSC_ATP_SOURCES_TEMP

6729: x_atp_sources.Preferred,
6730: x_atp_sources.Lead_Time,
6731: x_atp_sources.Ship_Method,
6732: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6733: FROM MSC_ATP_SOURCES_TEMP
6734: GROUP BY
6735: Organization_Id,
6736: Instance_Id,
6737: Supplier_Id,

Line 6782: -- Find and insert the sources in msc_atp_sources_temp

6778: IF PG_DEBUG in ('Y', 'C') THEN
6779: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
6780: END IF;
6781:
6782: -- Find and insert the sources in msc_atp_sources_temp
6783: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6784: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6785: SELECT
6786: MSST.INVENTORY_ITEM_ID,

Line 6783: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

6779: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
6780: END IF;
6781:
6782: -- Find and insert the sources in msc_atp_sources_temp
6783: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6784: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6785: SELECT
6786: MSST.INVENTORY_ITEM_ID,
6787: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 6848: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);

6844:
6845: -- Mark all the items for which sources are/have been found.
6846: UPDATE msc_ship_set_temp
6847: set visited_flag = 1
6848: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);
6849:
6850: l_updated_rows := SQL%ROWCOUNT;
6851:
6852: -- Check if all the items in ship set are processed.

Line 6855: -- Find the common sources from the pool of sources in msc_atp_sources_temp

6851:
6852: -- Check if all the items in ship set are processed.
6853: IF (l_updated_rows = p_ship_set_item_count) THEN
6854:
6855: -- Find the common sources from the pool of sources in msc_atp_sources_temp
6856: SELECT Organization_Id,
6857: Instance_Id,
6858: Supplier_Id,
6859: Supplier_Site_Id,

Line 6877: FROM MSC_ATP_SOURCES_TEMP

6873: x_atp_sources.Preferred,
6874: x_atp_sources.Lead_Time,
6875: x_atp_sources.Ship_Method,
6876: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6877: FROM MSC_ATP_SOURCES_TEMP
6878: GROUP BY
6879: Organization_Id,
6880: Instance_Id,
6881: Supplier_Id,

Line 6926: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

6922: IF PG_DEBUG in ('Y', 'C') THEN
6923: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');
6924: END IF;
6925: -- Bug 2931266. No need for customer_site_id join at this level
6926: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6927: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
6928: SELECT
6929: MSST.INVENTORY_ITEM_ID,
6930: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 6991: where inventory_item_id in (select distinct(inventory_item_id) from msc_atp_sources_temp);

6987:
6988: -- Mark all the items for which sources are/have been found.
6989: UPDATE msc_ship_set_temp
6990: set visited_flag = 1
6991: where inventory_item_id in (select distinct(inventory_item_id) from msc_atp_sources_temp);
6992:
6993: l_updated_rows := SQL%ROWCOUNT;
6994:
6995: -- Check if all the items in ship set are processed.

Line 6998: -- Find the common sources from the pool of sources in msc_atp_sources_temp

6994:
6995: -- Check if all the items in ship set are processed.
6996: IF (l_updated_rows = p_ship_set_item_count) THEN
6997:
6998: -- Find the common sources from the pool of sources in msc_atp_sources_temp
6999: SELECT Organization_Id,
7000: Instance_Id,
7001: Supplier_Id,
7002: Supplier_Site_Id,

Line 7020: FROM MSC_ATP_SOURCES_TEMP

7016: x_atp_sources.Preferred,
7017: x_atp_sources.Lead_Time,
7018: x_atp_sources.Ship_Method,
7019: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7020: FROM MSC_ATP_SOURCES_TEMP
7021: GROUP BY
7022: Organization_Id,
7023: Instance_Id,
7024: Supplier_Id,

Line 7129: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp

7125: SET min_region_value = l_min_region_value_arr(i),
7126: visited_flag = 1
7127: WHERE inventory_item_id = l_inventory_item_id_arr(i);
7128:
7129: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
7130: -- This is done by adding clause AND (expr) = msst.min_region_value
7131: -- and removing the clause AND visited_flag = 0
7132:
7133: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

Line 7133: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

7129: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
7130: -- This is done by adding clause AND (expr) = msst.min_region_value
7131: -- and removing the clause AND visited_flag = 0
7132:
7133: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7134: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
7135: SELECT
7136: MSST.INVENTORY_ITEM_ID,
7137: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 7223: FROM MSC_ATP_SOURCES_TEMP

7219: x_atp_sources.Preferred,
7220: x_atp_sources.Lead_Time,
7221: x_atp_sources.Ship_Method,
7222: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7223: FROM MSC_ATP_SOURCES_TEMP
7224: GROUP BY
7225: Organization_Id,
7226: Instance_Id,
7227: Supplier_Id,

Line 7258: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

7254: IF PG_DEBUG in ('Y', 'C') THEN
7255: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');
7256: END IF;
7257: -- Bug 2931266. No need for customer_site_id join at this level
7258: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7259: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
7260: SELECT
7261: MSST.INVENTORY_ITEM_ID,
7262: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 7324: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);

7320:
7321: -- Mark all the items for which sources are/have been found.
7322: UPDATE msc_ship_set_temp
7323: set visited_flag = 1
7324: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);
7325:
7326: l_updated_rows := SQL%ROWCOUNT;
7327:
7328: -- Check if all the items in ship set are processed.

Line 7331: -- Find the common sources from the pool of sources in msc_atp_sources_temp

7327:
7328: -- Check if all the items in ship set are processed.
7329: IF (l_updated_rows = p_ship_set_item_count) THEN
7330:
7331: -- Find the common sources from the pool of sources in msc_atp_sources_temp
7332: SELECT Organization_Id,
7333: Instance_Id,
7334: Supplier_Id,
7335: Supplier_Site_Id,

Line 7353: FROM MSC_ATP_SOURCES_TEMP

7349: x_atp_sources.Preferred,
7350: x_atp_sources.Lead_Time,
7351: x_atp_sources.Ship_Method,
7352: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7353: FROM MSC_ATP_SOURCES_TEMP
7354: GROUP BY
7355: Organization_Id,
7356: Instance_Id,
7357: Supplier_Id,

Line 7402: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

7398: IF PG_DEBUG in ('Y', 'C') THEN
7399: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');
7400: END IF;
7401:
7402: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7403: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
7404: SELECT
7405: MSST.INVENTORY_ITEM_ID,
7406: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 7466: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);

7462:
7463: -- Mark all the items for which sources are/have been found.
7464: UPDATE msc_ship_set_temp
7465: set visited_flag = 1
7466: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);
7467:
7468: l_updated_rows := SQL%ROWCOUNT;
7469:
7470: -- Check if all the items in ship set are processed.

Line 7473: -- Find the common sources from the pool of sources in msc_atp_sources_temp

7469:
7470: -- Check if all the items in ship set are processed.
7471: IF (l_updated_rows = p_ship_set_item_count) THEN
7472:
7473: -- Find the common sources from the pool of sources in msc_atp_sources_temp
7474: SELECT Organization_Id,
7475: Instance_Id,
7476: Supplier_Id,
7477: Supplier_Site_Id,

Line 7495: FROM MSC_ATP_SOURCES_TEMP

7491: x_atp_sources.Preferred,
7492: x_atp_sources.Lead_Time,
7493: x_atp_sources.Ship_Method,
7494: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7495: FROM MSC_ATP_SOURCES_TEMP
7496: GROUP BY
7497: Organization_Id,
7498: Instance_Id,
7499: Supplier_Id,

Line 7602: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp

7598: SET min_region_value = l_min_region_value_arr(i),
7599: visited_flag = 1
7600: WHERE inventory_item_id = l_inventory_item_id_arr(i);
7601:
7602: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
7603: -- This is done by adding clause AND (expr) = msst.min_region_value
7604: -- and removing the clause AND visited_flag = 0
7605:
7606: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

Line 7606: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

7602: -- Step2: For the updated items find all the sources and store them in msc_atp_sources_temp
7603: -- This is done by adding clause AND (expr) = msst.min_region_value
7604: -- and removing the clause AND visited_flag = 0
7605:
7606: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7607: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
7608: SELECT
7609: MSST.INVENTORY_ITEM_ID,
7610: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 7695: FROM MSC_ATP_SOURCES_TEMP

7691: x_atp_sources.Preferred,
7692: x_atp_sources.Lead_Time,
7693: x_atp_sources.Ship_Method,
7694: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7695: FROM MSC_ATP_SOURCES_TEMP
7696: GROUP BY
7697: Organization_Id,
7698: Instance_Id,
7699: Supplier_Id,

Line 7730: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

7726: IF PG_DEBUG in ('Y', 'C') THEN
7727: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');
7728: END IF;
7729: -- Bug 2931266. No need for customer_site_id join at this level
7730: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7731: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)
7732: SELECT
7733: MSST.INVENTORY_ITEM_ID,
7734: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 7795: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);

7791:
7792: -- Mark all the items for which sources are/have been found.
7793: UPDATE msc_ship_set_temp
7794: set visited_flag = 1
7795: where inventory_item_id in (select inventory_item_id from msc_atp_sources_temp);
7796:
7797: l_updated_rows := SQL%ROWCOUNT;
7798:
7799: -- Check if all the items in ship set are processed.

Line 7802: -- Find the common sources from the pool of sources in msc_atp_sources_temp

7798:
7799: -- Check if all the items in ship set are processed.
7800: IF (l_updated_rows = p_ship_set_item_count) THEN
7801:
7802: -- Find the common sources from the pool of sources in msc_atp_sources_temp
7803: SELECT Organization_Id,
7804: Instance_Id,
7805: Supplier_Id,
7806: Supplier_Site_Id,

Line 7824: FROM MSC_ATP_SOURCES_TEMP

7820: x_atp_sources.Preferred,
7821: x_atp_sources.Lead_Time,
7822: x_atp_sources.Ship_Method,
7823: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
7824: FROM MSC_ATP_SOURCES_TEMP
7825: GROUP BY
7826: Organization_Id,
7827: Instance_Id,
7828: Supplier_Id,